[SCM] dpkg's main repository branch, master, updated. 1.15.2-3-gbbb33e5

2009-05-28 Thread Raphael Hertzog
The following commit has been merged in the master branch:
commit bbb33e5b828a2b237399def5ff15cd818245f4d3
Author: Raphael Hertzog 
Date:   Thu May 28 15:31:32 2009 +0200

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.

diff --git a/debian/changelog b/debian/changelog
index b8d3a44..91619da 100644
--- a/debian/changelog
+++ b/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   Tue, 26 May 2009 01:26:04 +0200
 
 dpkg (1.15.2) unstable; urgency=low
diff --git a/scripts/Dpkg/Source/Archive.pm b/scripts/Dpkg/Source/Archive.pm
index 4b7362d..c82dfe7 100644
--- a/scripts/Dpkg/Source/Archive.pm
+++ b/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);

-- 
dpkg's main repository


-- 
To UNSUBSCRIBE, email to debian-dpkg-cvs-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org



[SCM] dpkg's main repository branch, master, updated. 1.15.2-2-g24f7107

2009-05-28 Thread Guillem Jover
The following commit has been merged in the master branch:
commit 24f7107e9815e90931fbccd1299757494431dd75
Author: Guillem Jover 
Date:   Thu May 28 14:33:53 2009 +0200

Unset TAR_OPTIONS when extracting .deb archives

We don't want the extraction to be affected by user settable environment
variables either. The command line tool is considered an interface for
which we want as much control as possible to guarantee no unintentional
behaviour changes to the format or they way it's being handled.

Closes: #530860

diff --git a/debian/changelog b/debian/changelog
index 2b59d74..b8d3a44 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,6 +1,6 @@
 dpkg (1.15.3) UNRELEASED; urgency=low
 
-  *
+  * Unset TAR_OPTIONS when extracting .deb archives. Closes: #530860
 
  -- Guillem Jover   Tue, 26 May 2009 01:26:04 +0200
 
diff --git a/dpkg-deb/extract.c b/dpkg-deb/extract.c
index d7be0de..5cc6660 100644
--- a/dpkg-deb/extract.c
+++ b/dpkg-deb/extract.c
@@ -312,6 +312,9 @@ void extracthalf(const char *debar, const char *directory,
   strcat(buffer, "f");
   m_dup2(p2[0],0);
   close(p2[0]);
+
+  unsetenv("TAR_OPTIONS");
+
   execlp(TAR, "tar", buffer, "-", NULL);
   ohshite(_("failed to exec tar"));
 }

-- 
dpkg's main repository


-- 
To UNSUBSCRIBE, email to debian-dpkg-cvs-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org