[debhelper-devel] [Git][debian/debhelper][master] 2 commits: dh_installdocs: Make -A neuter main-doc package auto-detection

Niels Thykier gitlab at salsa.debian.org
Sun Jan 28 08:50:52 UTC 2018


Niels Thykier pushed to branch master at Debian / debhelper


Commits:
75518fac by Niels Thykier at 2018-01-24T19:58:40+00:00
dh_installdocs: Make -A neuter main-doc package auto-detection

Signed-off-by: Niels Thykier <niels at thykier.net>

- - - - -
91baecba by Niels Thykier at 2018-01-24T20:19:22+00:00
Dh_Lib: Fix regression in handling of "foo{bar}" globs

Signed-off-by: Niels Thykier <niels at thykier.net>

- - - - -


3 changed files:

- debian/changelog
- dh_installdocs
- lib/Debian/Debhelper/Dh_Lib.pm


Changes:

=====================================
debian/changelog
=====================================
--- a/debian/changelog
+++ b/debian/changelog
@@ -3,6 +3,13 @@ debhelper (11.1.4) UNRELEASED; urgency=medium
   * qmake.pm/qmake4.pm: Avoid global state in the build systems.
   * dh_makeshlibs: Fix --no-act, which could still cause writes
     to the shlibs file.  Thanks to Sven Joachim for reporting it.
+  * dh_installdocs: Discard auto-detected main doc package when
+    passed -A/--all as it causes file-conflicts.
+    (Closes: #886108, #888294)
+  * Dh_Lib: Fix regression where "foo{bar}" would not be matched
+    when the pattern was handled as a glob.  The bug was
+    introduced in debhelper/10.6.  Thanks to Wouter Verhelst for
+    finding the bug.  (Closes: #888251)
 
  -- Niels Thykier <niels at thykier.net>  Sun, 21 Jan 2018 08:18:20 +0000
 


=====================================
dh_installdocs
=====================================
--- a/dh_installdocs
+++ b/dh_installdocs
@@ -289,6 +289,9 @@ foreach my $package (getpackages()) {
 		if (not defined($target_package)) {
 			warning("Cannot auto-detect main package for ${package}.  If the default is wrong, please use --doc-main-package");
 			$target_package = $package;
+		} elsif ($dh{PARAMS_ALL} and $package ne $target_package and not $dh{DOC_MAIN_PACKAGE}) {
+			warning("Not using auto-detected $target_package as main doc package for $package: With -A/--all, this would cause file-conflicts.");
+			$target_package = $package;
 		}
 		if ($dh{EXCLUDE_FIND}) {
 			$exclude .= ' -and ! \( '.$dh{EXCLUDE_FIND}.' \)';


=====================================
lib/Debian/Debhelper/Dh_Lib.pm
=====================================
--- a/lib/Debian/Debhelper/Dh_Lib.pm
+++ b/lib/Debian/Debhelper/Dh_Lib.pm
@@ -1187,8 +1187,14 @@ sub glob_expand {
 	for my $pattern (@patterns) {
 		my @m;
 		for my $dir (@dirs) {
-			@m = bsd_glob("$dir/$pattern", GLOB_CSH & ~(GLOB_NOMAGIC|GLOB_TILDE));
-			last if @m;# > 1 or (@m and (-l $m[0] or -e _));
+			my $full_pattern = "$dir/$pattern";
+			@m = bsd_glob($full_pattern, GLOB_CSH & ~(GLOB_NOMAGIC|GLOB_TILDE));
+			last if @m;
+			# Handle "foo{bar}" pattern (#888251)
+			if (-l $full_pattern or -e _) {
+				push(@m, $full_pattern);
+				last;
+			}
 		}
 		if (not @m) {
 			$error_handler //= \&glob_expand_error_handler_reject;



View it on GitLab: https://salsa.debian.org/debian/debhelper/compare/7b0fadbc6cc9f938116b2da5ed0e440edaeb49e4...91baecbabc338c3713262260d99c16a5db7ecc70

---
View it on GitLab: https://salsa.debian.org/debian/debhelper/compare/7b0fadbc6cc9f938116b2da5ed0e440edaeb49e4...91baecbabc338c3713262260d99c16a5db7ecc70
You're receiving this email because of your account on salsa.debian.org.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.alioth.debian.org/pipermail/debhelper-devel/attachments/20180128/10d06a19/attachment-0001.html>


More information about the debhelper-devel mailing list