* scripts/Dpkg/Source/Archive.pm (create): Offer possibility to chdir
before calling tar. This is required to create tar achives that do not
encode the full path to the location of the directory that we want to
integrate.
* scripts/Dpkg/Source/Patch.pm (apply): Make sure to remove
POSIXLY_CORRECT while calling patch to avoid unexpected changes
in his behaviour.
my ($self, %opts) = @_;
$opts{"options"} ||= [];
my %fork_opts;
+ # Possibly run tar from another directory
+ $fork_opts{"chdir"} = $opts{"chdir"} if $opts{"chdir"};
# Redirect input/output appropriately
$fork_opts{"to_handle"} = $self->open_for_write();
$fork_opts{"from_pipe"} = \$self->{'tar_input'};
'exec' => [ 'patch', @{$opts{"options"}} ],
'chdir' => $destdir,
'env' => { LC_ALL => 'C', LANG => 'C' },
+ 'delete_env' => [ 'POSIXLY_CORRECT' ], # ensure expected patch behaviour
'wait_child' => 1,
'from_handle' => $diff_handle
);