Skip to content

Commit

Permalink
deb: fix extraction of uncompressed data.tar (#21)
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 authored Nov 30, 2024
1 parent 699be47 commit 666b317
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 666b317

Please sign in to comment.