summaryrefslogtreecommitdiff
path: root/scripts/Dpkg/Source/Archive.pm
diff options
context:
space:
mode:
authorGuillem Jover <guillem@debian.org>2015-01-20 21:46:24 +0100
committerGuillem Jover <guillem@debian.org>2016-10-30 05:28:56 +0100
commit062ee4500fc879735c5b453a8b9e7c6c3cd4be4a (patch)
tree529e8240e00054d6aa87f9c54be8cfbfb57f92aa /scripts/Dpkg/Source/Archive.pm
parentc3a9a82fcf58df34077638cdbfd7bb752624629e (diff)
downloaddpkg-062ee4500fc879735c5b453a8b9e7c6c3cd4be4a.tar.gz
Dpkg: Add new Dpkg::PROGTAR variable to store GNU tar command name
Diffstat (limited to 'scripts/Dpkg/Source/Archive.pm')
-rw-r--r--scripts/Dpkg/Source/Archive.pm5
1 files changed, 3 insertions, 2 deletions
diff --git a/scripts/Dpkg/Source/Archive.pm b/scripts/Dpkg/Source/Archive.pm
index bb2a40df4..ba377c045 100644
--- a/scripts/Dpkg/Source/Archive.pm
+++ b/scripts/Dpkg/Source/Archive.pm
@@ -26,6 +26,7 @@ use File::Basename qw(basename);
use File::Spec;
use Cwd;
+use Dpkg ();
use Dpkg::Gettext;
use Dpkg::ErrorHandling;
use Dpkg::IPC;
@@ -50,7 +51,7 @@ sub create {
my $mtime = $opts{source_date} // $ENV{SOURCE_DATE_EPOCH} // time;
# Call tar creation process
$spawn_opts{delete_env} = [ 'TAR_OPTIONS' ];
- $spawn_opts{exec} = [ 'tar', '-cf', '-', '--format=gnu', '--sort=name',
+ $spawn_opts{exec} = [ $Dpkg::PROGTAR, '-cf', '-', '--format=gnu', '--sort=name',
'--mtime', "\@$mtime", '--clamp-mtime', '--null',
'--numeric-owner', '--owner=0', '--group=0',
@{$opts{options}}, '-T', '-' ];
@@ -129,7 +130,7 @@ sub extract {
# Call tar extraction process
$spawn_opts{delete_env} = [ 'TAR_OPTIONS' ];
- $spawn_opts{exec} = [ 'tar', '-xf', '-', '--no-same-permissions',
+ $spawn_opts{exec} = [ $Dpkg::PROGTAR, '-xf', '-', '--no-same-permissions',
'--no-same-owner', @{$opts{options}} ];
spawn(%spawn_opts);
$self->close();