my %logged;
my %startpoint;
foreach my $package (@packages) {
- my @log=loadlog($package);
+ my @log=load_log($package, \%logged);
if ($dh{AFTER}) {
# Run commands in the sequence that come after the
# specified command.
# no commands remain to run after it, communicating to
# future dh instances that the specified command should not
# be run again.
- writelog($sequence[$startpoint{$package}-1], $package);
+ write_log($sequence[$startpoint{$package}-1], $package);
}
elsif ($dh{REMAINING}) {
# Start at the beginning so all remaining commands will get
my @exclude=@{shift()};
my @options=@_;
+ # If some packages are excluded, add flags
+ # to prevent them from being acted on.
+ push @options, map { "-N$_" } @exclude;
+
# Check for override targets in debian/rules and
# run them instead of running the command directly.
my $override_command;
$command="debian/rules";
@options="override_".$override_command;
}
- else {
- # If some packages are excluded, add flags
- # to prevent them from being acted on.
- push @options, map { "-N$_" } @exclude;
- }
# 3 space indent lines the command being run up under the
# sequence name after "dh ".
# been run by the rules file target.
my %packages=map { $_ => 1 } @packages;
map { delete $packages{$_} } @exclude;
- writelog($override_command, keys %packages);
+ write_log($override_command, keys %packages);
}
}
}
-sub loadlog {
- my $package=shift;
- my $ext=pkgext($package);
-
- my @log;
- open(LOG, "<", "debian/${ext}debhelper.log") || return;
- while (<LOG>) {
- chomp;
- push @log, $_;
- $logged{$package}{$_}=1;
- }
- close LOG;
- return @log;
-}
-
-sub writelog {
- Debian::Debhelper::Dh_Lib::write_log(@_);
-}
-
{
my %targets;
my $rules_parsed;