diff options
| author | Michael Vogt <michael.vogt@ubuntu.com> | 2008-05-28 11:57:55 +0200 |
|---|---|---|
| committer | Michael Vogt <michael.vogt@ubuntu.com> | 2008-05-28 11:57:55 +0200 |
| commit | 5bd807b1a1b05d8ba44a6c330cd55222b9fe9a46 (patch) | |
| tree | 9f2d607df057e211bf58eff1dab0a039acca717a | |
| parent | 8ada71a45a165cd0a4731a890a8a281b6188098e (diff) | |
| download | python-apt-5bd807b1a1b05d8ba44a6c330cd55222b9fe9a46.tar.gz | |
* aptsources/distinfo.py:
- support arch specific BaseURI and MatchURI in the distinfo
template
| -rw-r--r-- | aptsources/distinfo.py | 10 | ||||
| -rw-r--r-- | data/templates/Ubuntu.info.in | 4 | ||||
| -rw-r--r-- | debian/changelog | 3 |
3 files changed, 15 insertions, 2 deletions
diff --git a/aptsources/distinfo.py b/aptsources/distinfo.py index fdd063a5..5c8f7782 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,10 +188,13 @@ 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': if not map_mirror_sets.has_key(value): diff --git a/data/templates/Ubuntu.info.in b/data/templates/Ubuntu.info.in index 5561862d..30cbaa5e 100644 --- a/data/templates/Ubuntu.info.in +++ b/data/templates/Ubuntu.info.in @@ -3,6 +3,8 @@ _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/ubuntu/ +MatchURI-powerpc: ports.ubuntu.com MatchURI: archive.ubuntu.com/ubuntu MirrorsFile: /usr/share/python-apt/templates/Ubuntu.mirrors _Description: Ubuntu 8.10 'Intrepid Ibex' @@ -56,6 +58,8 @@ Suite: hardy RepositoryType: deb BaseURI: http://archive.ubuntu.com/ubuntu/ MatchURI: archive.ubuntu.com/ubuntu +BaseURI-powerpc: http://ports.ubuntu.com/ubuntu/ +MatchURI-powerpc: ports.ubuntu.com MirrorsFile: /usr/share/python-apt/templates/Ubuntu.mirrors _Description: Ubuntu 8.04 'Hardy Heron' Component: main diff --git a/debian/changelog b/debian/changelog index b370e53a..b2ee0469 100644 --- a/debian/changelog +++ b/debian/changelog @@ -18,6 +18,9 @@ python-apt (0.7.5) UNRELEASED; urgency=low - added ubuntu 'intrepid' * debian/README.source: - added (basic) documentation how to build python-apt + * aptsources/distinfo.py: + - support arch specific BaseURI and MatchURI in the distinfo + template -- Michael Vogt <michael.vogt@ubuntu.com> Fri, 04 Jan 2008 21:17:00 +0100 |
