diff options
| author | Michael Vogt <michael.vogt@ubuntu.com> | 2008-05-28 12:21:28 +0200 |
|---|---|---|
| committer | Michael Vogt <michael.vogt@ubuntu.com> | 2008-05-28 12:21:28 +0200 |
| commit | 32859490d228ab2bc234c48ad27fb0d727dbb108 (patch) | |
| tree | 9b842e2e26fb356b342721a5996d68ad308c83e7 | |
| parent | d92a8e975e83e24c2aa2609bbb76d2347ce6ee03 (diff) | |
| parent | 35d1d39728f6e2ef5e025b2359ee6d53911f9cc1 (diff) | |
| download | python-apt-32859490d228ab2bc234c48ad27fb0d727dbb108.tar.gz | |
* aptsources/distinfo.py:
- support arch specific BaseURI, MatchURI and MirrosFile fields
in the distinfo template (LP: #220890)
| -rw-r--r-- | aptsources/distinfo.py | 13 | ||||
| -rw-r--r-- | data/templates/Ubuntu.info.in | 12 | ||||
| -rw-r--r-- | debian/changelog | 8 |
3 files changed, 28 insertions, 5 deletions
diff --git a/aptsources/distinfo.py b/aptsources/distinfo.py index fdd063a5..9b438701 100644 --- a/aptsources/distinfo.py +++ b/aptsources/distinfo.py @@ -28,6 +28,7 @@ import gettext from os import getenv import ConfigParser import string +import apt_pkg #from gettext import gettext as _ import gettext @@ -126,6 +127,8 @@ class DistInfo: base_dir = "/usr/share/python-apt/templates"): self.metarelease_uri = '' self.templates = [] + apt_pkg.init() + self.arch = apt_pkg.Config.Find("APT::Architecture") location = None match_loc = re.compile(r"^#LOC:(.+)$") @@ -185,12 +188,16 @@ class DistInfo: template.available = value elif field == 'RepositoryType': template.type = value - elif field == 'BaseURI': + elif field == 'BaseURI' and not template.base_uri: template.base_uri = value + elif field == 'BaseURI-%s' % self.arch: + template.base_uri = value + elif field == 'MatchURI' and not template.match_uri: template.match_uri = value - elif field == 'MatchURI': + elif field == 'MatchURI-%s' % self.arch: template.match_uri = value - elif field == 'MirrorsFile': + elif (field == 'MirrorsFile' or + field == 'MirrorsFile-%s' % self.arch): if not map_mirror_sets.has_key(value): mirror_set = {} try: diff --git a/data/templates/Ubuntu.info.in b/data/templates/Ubuntu.info.in index 5561862d..c3cfe6df 100644 --- a/data/templates/Ubuntu.info.in +++ b/data/templates/Ubuntu.info.in @@ -3,8 +3,11 @@ _ChangelogURI: http://changelogs.ubuntu.com/changelogs/pool/%s/%s/%s/%s_%s/chang Suite: intrepid RepositoryType: deb BaseURI: http://archive.ubuntu.com/ubuntu/ +BaseURI-powerpc: http://ports.ubuntu.com/ +MatchURI-powerpc: ports.ubuntu.com MatchURI: archive.ubuntu.com/ubuntu -MirrorsFile: /usr/share/python-apt/templates/Ubuntu.mirrors +MirrorsFile-amd64: /usr/share/python-apt/templates/Ubuntu.mirrors +MirrorsFile-i386: /usr/share/python-apt/templates/Ubuntu.mirrors _Description: Ubuntu 8.10 'Intrepid Ibex' Component: main _CompDescription: Officially supported @@ -56,7 +59,10 @@ Suite: hardy RepositoryType: deb BaseURI: http://archive.ubuntu.com/ubuntu/ MatchURI: archive.ubuntu.com/ubuntu -MirrorsFile: /usr/share/python-apt/templates/Ubuntu.mirrors +BaseURI-powerpc: http://ports.ubuntu.com/ +MatchURI-powerpc: ports.ubuntu.com +MirrorsFile-amd64: /usr/share/python-apt/templates/Ubuntu.mirrors +MirrorsFile-i386: /usr/share/python-apt/templates/Ubuntu.mirrors _Description: Ubuntu 8.04 'Hardy Heron' Component: main _CompDescription: Officially supported @@ -86,6 +92,8 @@ ParentSuite: hardy RepositoryType: deb BaseURI: http://security.ubuntu.com/ubuntu/ MatchURI: archive.ubuntu.com/ubuntu|security.ubuntu.com +BaseURI-powerpc: http://ports.ubuntu.com/ +MatchURI-powerpc: ports.ubuntu.com/ubuntu _Description: Important security updates Suite: hardy-updates diff --git a/debian/changelog b/debian/changelog index 602afa89..54a04f37 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,11 @@ +python-apt (0.7.4ubuntu9) intrepid; urgency=low + + * aptsources/distinfo.py: + - support arch specific BaseURI, MatchURI and MirrosFile fields + in the distinfo template (LP: #220890) + + -- Michael Vogt <michael.vogt@ubuntu.com> Wed, 28 May 2008 12:20:23 +0200 + python-apt (0.7.4ubuntu8) intrepid; urgency=low * data/templates/Ubuntu.info.in: |
