[debhelper-devel] [debhelper] 01/01: dh: Support pkgfile and pkgfile-logged PROMISE hints
Niels Thykier
nthykier at moszumanska.debian.org
Wed Jul 5 10:25:31 UTC 2017
This is an automated email from the git hooks/post-receive script.
nthykier pushed a commit to branch bug-867246-dh-optimize-logging-helpers
in repository debhelper.
commit 480bfd180c393422e0f3a063098e22165df33bfa
Author: Niels Thykier <niels at thykier.net>
Date: Wed Jul 5 10:24:40 2017 +0000
dh: Support pkgfile and pkgfile-logged PROMISE hints
Signed-off-by: Niels Thykier <niels at thykier.net>
---
dh | 11 +++++++++++
dh_installman | 2 +-
2 files changed, 12 insertions(+), 1 deletion(-)
diff --git a/dh b/dh
index 4200af2..f0467f2 100755
--- a/dh
+++ b/dh
@@ -1037,6 +1037,7 @@ sub can_skip {
}
my @skipinfo=@{$skipinfo{$command}};
return 0 unless @skipinfo;
+ my $all_pkgs;
foreach my $skipinfo (@skipinfo) {
if ($skipinfo=~/^([a-zA-Z0-9-_]+)\((.*)\)$/) {
@@ -1047,6 +1048,16 @@ sub can_skip {
my $tmp = tmpdir($package);
return 0 if -e "$tmp/$need";
}
+ } elsif ($type eq 'pkgfile' or $type eq 'pkgfile-logged') {
+ my $pkgs;
+ if ($type eq 'pkgfile') {
+ $pkgs = \@packages;
+ } else {
+ $all_pkgs //= [getpackages()];
+ $pkgs = $all_pkgs;
+ }
+ # Use the secret bulk check call
+ return 0 if pkgfile($pkgs, $need) ne '';
} else {
# Unknown hint - make no assumptions
return 0;
diff --git a/dh_installman b/dh_installman
index ead1752..f87422e 100755
--- a/dh_installman
+++ b/dh_installman
@@ -134,7 +134,7 @@ init(options => {
});
-# PROMISE: DH NOOP WITHOUT manpages tmp(usr/share/man)
+# PROMISE: DH NOOP WITHOUT pkgfile-logged(manpages) tmp(usr/share/man)
my (@sofiles, @sodests);
my @all_packages = getpackages();
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/debhelper/debhelper.git
More information about the debhelper-devel
mailing list