Skip to content

Commit

Permalink
deb: fix extraction of uncompressed data.tar
Browse files Browse the repository at this point in the history
In some debian packages the data.tar is not compressed
and named only data.tar without any extension.
  • Loading branch information
MofX committed Nov 21, 2024
1 parent 35c6dd4 commit d46dc33
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion ebcl/common/deb.py
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,12 @@ def extract(self, location: Optional[str] = None,
return None

# find data.tar
tar_files = list(Path(deb_content_location).glob('data.tar.*'))
data_tar = Path(deb_content_location) / 'data.tar'
if data_tar.exists():
tar_files = [data_tar]
else: # find compressed data.tar
tar_files = list(Path(deb_content_location).glob('data.tar.*'))

if not tar_files:
logging.error('No tar content found in package %s!', self)
return None
Expand Down

0 comments on commit d46dc33

Please sign in to comment.