summaryrefslogtreecommitdiff
path: root/Debian/Debhelper/Dh_Lib.pm
diff options
context:
space:
mode:
authorModestas Vainius <modestas@vainius.eu>2009-03-23 02:23:17 +0200
committerJoey Hess <joey@gnu.kitenet.net>2009-03-23 14:59:13 -0400
commit66c68aa531bc5a1739be40c25483f036022de7a1 (patch)
tree4eb57b19e070a427bdffdf94a7308c45c62aa8b8 /Debian/Debhelper/Dh_Lib.pm
parentce53a5276c9f3a388dce10f442c3c1659e3bccdb (diff)
Add a global --remaining-packages option.
Add a global --remaining-packages option which allows to skip the command on the packages which it has already been run on (i.e. if the command helper is already present in the package debhelper log). Signed-off-by: Modestas Vainius <modestas@vainius.eu>
Diffstat (limited to 'Debian/Debhelper/Dh_Lib.pm')
-rw-r--r--Debian/Debhelper/Dh_Lib.pm19
1 files changed, 17 insertions, 2 deletions
diff --git a/Debian/Debhelper/Dh_Lib.pm b/Debian/Debhelper/Dh_Lib.pm
index d481128..23e81a6 100644
--- a/Debian/Debhelper/Dh_Lib.pm
+++ b/Debian/Debhelper/Dh_Lib.pm
@@ -15,7 +15,7 @@ use vars qw(@ISA @EXPORT %dh);
&filedoublearray &getpackages &basename &dirname &xargs %dh
&compat &addsubstvar &delsubstvar &excludefile &package_arch
&is_udeb &udeb_filename &debhelper_script_subst &escape_shell
- &inhibit_log);
+ &inhibit_log &load_log);
my $max_compat=7;
@@ -102,7 +102,22 @@ sub END {
if ($? == 0 && $write_log) {
write_log(basename($0), @{$dh{DOPACKAGES}});
}
-}
+}
+
+sub load_log {
+ my ($package, $db)=@_;
+ my $ext=pkgext($package);
+
+ my @log;
+ open(LOG, "<", "debian/${ext}debhelper.log") || return;
+ while (<LOG>) {
+ chomp;
+ push @log, $_;
+ $db->{$package}{$_}=1 if (defined $db);
+ }
+ close LOG;
+ return @log;
+}
sub write_log {
my $cmd=shift;