diff options
author | Nirbheek Chauhan <nirbheek@centricular.com> | 2022-10-12 14:35:27 +0530 |
---|---|---|
committer | GStreamer Marge Bot <gitlab-merge-bot@gstreamer-foundation.org> | 2022-12-08 16:32:25 +0000 |
commit | 9345e5fe15ddd9ae68601743d2f864f3719fb9c3 (patch) | |
tree | 7465c9426bbedd4283f36ae64c5330ff824b0806 | |
parent | b27b057b5030217685f463e6978afb2f9b2f3738 (diff) |
package: Pass -cf as the last argument to tar
Old tar versions and bsdtar do not accept any further arguments after
-f so everything passed after -f <file> will be interpreted as
archive contents, and bsdtar will silently ignore non-existing files.
Part-of: <https://gitlab.freedesktop.org/gstreamer/cerbero/-/merge_requests/999>
-rw-r--r-- | cerbero/packages/disttarball.py | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/cerbero/packages/disttarball.py b/cerbero/packages/disttarball.py index 898ead93..57511a8f 100644 --- a/cerbero/packages/disttarball.py +++ b/cerbero/packages/disttarball.py @@ -175,7 +175,7 @@ class DistTarball(PackagerBase): shell.new_call(compress_cmd) def _write_tar(self, filename, package_prefix, files): - tar_cmd = ['tar', '-C', self.prefix, '-cf', filename] + tar_cmd = ['tar', '-C', self.prefix] # ensure we provide a unique list of files to tar to avoid # it creating hard links/copies files = sorted(set(files)) @@ -192,6 +192,7 @@ class DistTarball(PackagerBase): tar_cmd += ['--use-compress-program=xz --threads=0'] elif self.compress != 'none': raise AssertionError("Unknown tar compression: {}".format(self.compress)) + tar_cmd += ['-cf', filename] try: shell.new_call(tar_cmd + files) except FatalError: |