1
0
mirror of https://github.com/openSUSE/osc.git synced 2024-11-09 22:36:14 +01:00

Handle uncompressed Debian packages

Debian packages can also be uncompressed in which case the archive
contains a control.tar file.
This commit is contained in:
Rainer Müller 2022-08-12 13:32:34 +02:00
parent b92f9f76ef
commit 5a13baf2ab

View File

@ -75,6 +75,11 @@ class DebQuery(packagequery.PackageQuery, packagequery.PackageQueryResult):
decompressed = reader.read()
tar = tarfile.open(name="control.tar.zst",
fileobj=BytesIO(decompressed))
else:
control = arfile.get_file(b'control.tar')
if control:
tar = tarfile.open(name="control.tar",
fileobj=control)
if control is None:
raise DebError(self.__path, 'missing control.tar')
try: