]> git.decadent.org.uk Git - dak.git/commitdiff
Include all files (except directories) in bin_contents table.
authorTorsten Werner <twerner@debian.org>
Mon, 7 Mar 2011 20:46:00 +0000 (21:46 +0100)
committerTorsten Werner <twerner@debian.org>
Mon, 7 Mar 2011 20:46:00 +0000 (21:46 +0100)
Signed-off-by: Torsten Werner <twerner@debian.org>
daklib/dbconn.py

index 6827891d555445adfc357f1a1addfcd1c1a1f28b..9b757d13487887382595daa0cb23b55742301411 100755 (executable)
@@ -515,9 +515,8 @@ class DBBinary(ORMObject):
         fullpath = self.poolfile.fullpath
         dpkg = Popen(['dpkg-deb', '--fsys-tarfile', fullpath], stdout = PIPE)
         tar = TarFile.open(fileobj = dpkg.stdout, mode = 'r|')
-        anything_yielded = False
         for member in tar.getmembers():
-            if member.isfile():
+            if not member.isdir():
                 name = normpath(member.name)
                 # enforce proper utf-8 encoding
                 try:
@@ -525,9 +524,6 @@ class DBBinary(ORMObject):
                 except UnicodeDecodeError:
                     name = name.decode('iso8859-1').encode('utf-8')
                 yield name
-                anything_yielded = True
-        if not anything_yielded:
-            yield ' <EMPTY PACKAGE>'
         tar.close()
         dpkg.stdout.close()
         dpkg.wait()