提交 e3544ea0 编写于 作者: T Torsten Werner

Include all files (except directories) in bin_contents table.

Signed-off-by: NTorsten Werner <twerner@debian.org>
上级 e5a63995
......@@ -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()
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册