Example code like "dpkg-info" not working on .deb packages KeyError:'control.tar.gz'

Schreiber, Guenter Guenter.Schreiber at Kuka.com
Thu Jul 29 13:03:10 BST 2021


Hello everybody,
I've tried several versions of python3-debian (or python-debian)...
... always with the very same result:



Always the following error message is printed:

(dbInspVirtEnv) kuka at dev-gschreiber:~/projekte/3rdparty/python-debian $ /usr/share/doc/python3-debian/examples/debfile/dpkg-info /var/cache/apt/archives/python3.9_3.9.2-1_amd64.deb
Traceback (most recent call last):
  File "/usr/share/doc/python3-debian/examples/debfile/dpkg-info", line 31, in <module>
    os.stat(fname)[stat.ST_SIZE], deb['control.tar.gz'].size))
  File "/usr/lib/python3/dist-packages/debian/arfile.py", line 202, in __getitem__
    return self.getmember(name)
  File "/usr/lib/python3/dist-packages/debian/arfile.py", line 137, in getmember
    return self.__members_dict[name]
KeyError: 'control.tar.gz'


Buster &  python3-debian 0.1.35
Bullseye & Python3-debian 0.1.39
buster & python3 & python-debian from master


Any clue?
My usecase: I'd like to parse the copyright infos from the deb packages for license clearance on my project,
And I'd like to use a library already able to perform that job.

Thanks in Advance,
Günter


Internal
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://alioth-lists.debian.net/pipermail/pkg-python-debian-maint/attachments/20210729/a7e9f3ec/attachment.htm>


More information about the pkg-python-debian-maint mailing list