Skip to content

Commit

Permalink
Explicitly set the tar format to GNU. (#601)
Browse files Browse the repository at this point in the history
This means that:
1. you'll get the same format no matter what version of Python you have.
   At Python 3.8 the default changed from GNU to PAX.
2. The default will be suitable for building Debian packages containing
   long file names.

A followup PR may add the capability to allow PAX tar writing, but I
do not know the urgency of that at this time, so that is a future
feature request.

Fixes #216
  • Loading branch information
aiuto committed Jul 19, 2022
1 parent 157dcfd commit ad67925
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion pkg/private/tar/tar_writer.py
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,8 @@ def __init__(self,
self.fileobj = self.compressor_proc.stdin
self.name = name

self.tar = tarfile.open(name=name, mode=mode, fileobj=self.fileobj)
self.tar = tarfile.open(name=name, mode=mode, fileobj=self.fileobj,
format=tarfile.GNU_FORMAT)
self.members = set()
self.directories = set()
# Preseed the added directory list with things we should not add. If we
Expand Down

0 comments on commit ad67925

Please sign in to comment.