From 062ee4500fc879735c5b453a8b9e7c6c3cd4be4a Mon Sep 17 00:00:00 2001 From: Guillem Jover Date: Tue, 20 Jan 2015 21:46:24 +0100 Subject: Dpkg: Add new Dpkg::PROGTAR variable to store GNU tar command name --- scripts/Dpkg/Source/Archive.pm | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'scripts/Dpkg/Source') 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(); -- cgit v1.2.3