problem with ghost entries not showing up in primary.xml even if they matched
authorSeth Vidal <skvidal@linux.duke.edu>
Thu, 21 Oct 2004 07:40:45 +0000 (07:40 +0000)
committerSeth Vidal <skvidal@linux.duke.edu>
Thu, 21 Oct 2004 07:40:45 +0000 (07:40 +0000)
the regex strings.

dumpMetadata.py

index 0d37d3c96a8b4ed0ae5e4426999b5f7abc4bb017..d2e51bbbc544f9fc352cacab46f5c1b011df6d29 100644 (file)
@@ -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):