1
0
Fork 0

maintain catalog: Mirror URLs generated

This commit is contained in:
James Turner 2015-07-11 22:23:05 +01:00
parent 548de8bd2d
commit cf1afee705

View file

@ -179,10 +179,10 @@ class PackageData:
self._node.getChild("scm-revision", create = True).value = self.scmRevision self._node.getChild("scm-revision", create = True).value = self.scmRevision
for m in mirrorUrls: for m in mirrorUrls:
self._node.addChild("url", m + "/" + self.id + ".zip") self._node.addChild("url").value = m + "/" + self.id + ".zip"
for t in self._thumbnails: for t in self._thumbnails:
self._node.addChild("thumbnail", thumbnailUrl + "/" + self.id + "_" + t) self._node.addChild("thumbnail").value = thumbnailUrl + "/" + self.id + "_" + t
for pr in self._variants: for pr in self._variants:
for vr in self._variants[pr]: for vr in self._variants[pr]:
@ -274,6 +274,8 @@ print "Output path is:" + outPath
thumbnailPath = os.path.join(outPath, config.getValue('thumbnail-dir', "thumbnails")) thumbnailPath = os.path.join(outPath, config.getValue('thumbnail-dir', "thumbnails"))
thumbnailUrl = config.getValue('thumbnail-url') thumbnailUrl = config.getValue('thumbnail-url')
print "Thumbnail url is:", thumbnailUrl
mirrorUrls = [] mirrorUrls = []
# contains existing catalog # contains existing catalog
@ -306,6 +308,7 @@ else:
catalogNode = sgprops.Node("catalog") catalogNode = sgprops.Node("catalog")
sgprops.copy(config.getChild("template"), catalogNode) sgprops.copy(config.getChild("template"), catalogNode)
mirrorUrls = (m.value for m in config.getChildren("mirror"))
packagesToGenerate = [] packagesToGenerate = []
for p in packages.values(): for p in packages.values():