Преглед изворни кода

Unset TAR_OPTIONS when handling tar archives for source packages

The command line interface is the only way that should control tar's
behaviour in its usage by dpkg as we want the same behaviour for
everybody.
Raphael Hertzog пре 17 година
родитељ
комит
bbb33e5b82
2 измењених фајлова са 7 додато и 0 уклоњено
  1. 5 0
      debian/changelog
  2. 2 0
      scripts/Dpkg/Source/Archive.pm

+ 5 - 0
debian/changelog

@@ -1,7 +1,12 @@
 dpkg (1.15.3) UNRELEASED; urgency=low
 
+  [ Guillem Jover ]
   * Unset TAR_OPTIONS when extracting .deb archives. Closes: #530860
 
+  [ Raphael Hertzog ]
+  * Unset TAR_OPTIONS when creating/extracting tar archives for source
+    packages. Closes: #530860
+
  -- Guillem Jover <guillem@debian.org>  Tue, 26 May 2009 01:26:04 +0200
 
 dpkg (1.15.2) unstable; urgency=low

+ 2 - 0
scripts/Dpkg/Source/Archive.pm

@@ -45,6 +45,7 @@ sub create {
     $fork_opts{"to_handle"} = $self->open_for_write();
     $fork_opts{"from_pipe"} = \$self->{'tar_input'};
     # Call tar creation process
+    $fork_opts{"delete_env"} = [ "TAR_OPTIONS" ];
     $fork_opts{'exec'} = [ 'tar', '--null', '-T', '-', '--numeric-owner',
                            '--owner', '0', '--group', '0',
 			   @{$opts{"options"}}, '-cf', '-' ];
@@ -117,6 +118,7 @@ sub extract {
     $fork_opts{"from_handle"} = $self->open_for_read();
 
     # Call tar extraction process
+    $fork_opts{"delete_env"} = [ "TAR_OPTIONS" ];
     $fork_opts{'exec'} = [ 'tar', '--no-same-owner', '--no-same-permissions',
                            @{$opts{"options"}}, '-xkf', '-' ];
     fork_and_exec(%fork_opts);