From: Dennis Gregorovic Date: Wed, 6 Jan 2010 20:26:58 +0000 (-0500) Subject: Change baseurl of "old" packages on update, when baseurl specified X-Git-Tag: upstream/0.9.9~35 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=044f521cadd42df029cfd75070defe699fe7f432;p=tools%2Fcreaterepo.git Change baseurl of "old" packages on update, when baseurl specified --- diff --git a/createrepo/__init__.py b/createrepo/__init__.py index 77a03ee..0ffe6cb 100644 --- a/createrepo/__init__.py +++ b/createrepo/__init__.py @@ -543,6 +543,17 @@ class MetaDataGenerator: (othernode, self.otherfile)): if node is None: break + + if self.conf.baseurl: + anode = node.children + while anode is not None: + if anode.type != "element": + anode = anode.next + continue + if anode.name == "location": + anode.setProp('xml:base', self.conf.baseurl) + anode = anode.next + output = node.serialize('UTF-8', self.conf.pretty) if output: outfile.write(output)