summary |
shortlog |
log |
commit | commitdiff |
tree
raw |
patch |
inline | side by side (from parent 1:
7fd4808)
Fall back to system implementation if command line options are
requested that we don't understand. This is a bit fiddly - we need to
strip the stunt entry out of PATH and also out of PERLLIB.
Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
use base qw(Exporter);
our @EXPORT = qw(changelog_parse);
use base qw(Exporter);
our @EXPORT = qw(changelog_parse);
+die +(join " ", %ENV)." ?" if $ENV{'DGIT_NO_TSTUNT_CLPARSE'};
+
sub changelog_parse {
my (%options) = @_; # ignored
sub changelog_parse {
my (%options) = @_; # ignored
my $infile = "debian/changelog";
my $infile = "debian/changelog";
if (@ARGV && $ARGV[0] =~ s/^-l//) {
$infile = shift @ARGV;
}
if (@ARGV && $ARGV[0] =~ s/^-l//) {
$infile = shift @ARGV;
}
+if (@ARGV) {
+ my $strip = $0;
+ $strip =~ s#/[^/]+$## or die "$0 ?";
+ foreach my $k (qw(PATH PERLLIB)) {
+ my @opath = split /\:/, $ENV{$k};
+ my @npath = grep { $_ ne $strip } @opath;
+ @npath != @opath or die "$0 $k $ENV{$k} ?";
+ $ENV{$k} = join ':', @npath;
+ }
+ die if $ENV{'DGIT_NO_TSTUNT_CLPARSE'}++;
+ exec 'dpkg-parsechangelog', @orgargv;
+}
use strict;
open C, $infile or die $!;
use strict;
open C, $infile or die $!;