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:
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()
table = Table(table_name, self.db_meta, autoload=True)
setattr(self, 'tbl_%s' % table_name, table)
- # bin_contents needs special attention until update #41 has been
- # applied
+ # bin_contents needs special attention until the SERIAL type is
+ # correctly detected and the workaround has been removed; see comment
+ # above
self.tbl_bin_contents = Table('bin_contents', self.db_meta, \
Column('file', Text, primary_key = True),
Column('binary_id', Integer, ForeignKey('binaries.id'), \