summaryrefslogtreecommitdiff
path: root/Debian
diff options
context:
space:
mode:
authorNiels Thykier <niels@thykier.net>2014-11-16 21:27:00 +0100
committerNiels Thykier <niels@thykier.net>2014-12-21 21:20:24 +0100
commit97993b514bfbcc84c213e9e5d68c1b1c3a833ce7 (patch)
treef4df1fc160d96c804cb290925f10ff51f85f68ce /Debian
parent93d8ba917f5bcb972cc1c791d4ba892277554fb3 (diff)
downloaddebhelper-97993b514bfbcc84c213e9e5d68c1b1c3a833ce7.tar.gz
dh_installdocs: Error out on unsafe binNMUs with --link-doc
Detect during a binNMU when an call to dh_installdocs (with --link-doc) is unsafe by also looking at packages that dh_installdocs /would/ process during an "full" build. Signed-off-by: Niels Thykier <niels@thykier.net>
Diffstat (limited to 'Debian')
-rw-r--r--Debian/Debhelper/Dh_Getopt.pm17
1 files changed, 16 insertions, 1 deletions
diff --git a/Debian/Debhelper/Dh_Getopt.pm b/Debian/Debhelper/Dh_Getopt.pm
index e4f3e471..3468071a 100644
--- a/Debian/Debhelper/Dh_Getopt.pm
+++ b/Debian/Debhelper/Dh_Getopt.pm
@@ -182,7 +182,7 @@ sub split_options_string {
sub parseopts {
my %params=@_;
- my @ARGV_extra;
+ my (@ARGV_extra, %internal_excluded);
# DH_INTERNAL_OPTIONS is used to pass additional options from
# dh through an override target to a command.
@@ -199,6 +199,7 @@ sub parseopts {
foreach my $package (getpackages()) {
if (! grep { $_ eq $package } @{$dh{DOPACKAGES}}) {
$exclude_package{$package}=1;
+ $internal_excluded{$package}=1;
}
}
}
@@ -260,6 +261,14 @@ sub parseopts {
$packages_seen{$package}=1;
push @package_list, $package;
}
+ } elsif ($internal_excluded{$package}) {
+ # Record packages we would have processed if not for
+ # DH_INTERNAL_OPTIONS.
+ # We need this for dh_installdocs to check for broken
+ # binNMUs with --link-doc
+ push @{$dh{_INTERNAL_EXCL_DOPACKAGES}}, $package;
+ # Remove it to avoid duplicates
+ delete $internal_excluded{$package};
}
}
@{$dh{DOPACKAGES}}=@package_list;
@@ -286,3 +295,9 @@ sub parseopts {
}
1
+
+# Local Variables:
+# indent-tabs-mode: t
+# tab-width: 4
+# cperl-indent-level: 4
+# End: