diff options
-rw-r--r-- | Lib/plat-mac/pimp.py | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/Lib/plat-mac/pimp.py b/Lib/plat-mac/pimp.py index 625e388..255b57c 100644 --- a/Lib/plat-mac/pimp.py +++ b/Lib/plat-mac/pimp.py @@ -402,18 +402,21 @@ class PimpDatabase: self._maintainer = plistdata.get('Maintainer', '') self._description = plistdata.get('Description', '').strip() self._url = url - self._appendPackages(plistdata['Packages']) + self._appendPackages(plistdata['Packages'], url) others = plistdata.get('Include', []) - for url in others: - self.appendURL(url, included=1) + for o in others: + o = urllib.basejoin(url, o) + self.appendURL(o, included=1) - def _appendPackages(self, packages): + def _appendPackages(self, packages, url): """Given a list of dictionaries containing package descriptions create the PimpPackage objects and append them to our internal storage.""" for p in packages: p = dict(p) + if p.has_key('Download-URL'): + p['Download-URL'] = urllib.basejoin(url, p['Download-URL']) flavor = p.get('Flavor') if flavor == 'source': pkg = PimpPackage_source(self, p) |