From: Seth Vidal Date: Thu, 21 Oct 2004 07:40:45 +0000 (+0000) Subject: problem with ghost entries not showing up in primary.xml even if they matched X-Git-Tag: upstream/0.9.9~278 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=ff50aa59107b9b50f486886260b70b40d35558b9;p=tools%2Fcreaterepo.git problem with ghost entries not showing up in primary.xml even if they matched the regex strings. --- diff --git a/dumpMetadata.py b/dumpMetadata.py index 0d37d3c..d2e51bb 100644 --- a/dumpMetadata.py +++ b/dumpMetadata.py @@ -423,7 +423,18 @@ class RpmMetaData: returns[item] = 1 return returns - + def usefulGhosts(self): + """search for useful ghost file names""" + returns = {} + for item in self.ghostnames: + if item is None: + continue + for glob in self.filerc: + if glob.match(item): + returns[item] = 1 + return returns + + def usefulDirs(self): """search for good dirs""" returns = {} @@ -588,7 +599,12 @@ def generateXML(doc, node, formatns, rpmObj, sumtype): directory = utf8String(directory) files.addContent(directory) files.newProp('type', 'dir') - + for directory in rpmObj.usefulGhosts(): + files = format.newChild(None, 'file', None) + directory = utf8String(directory) + files.addContent(directory) + files.newProp('type', 'ghost') + return pkgNode def fileListXML(doc, node, rpmObj):