Bug#521258: dh_installchangelogs: search likely subdirectories for upstream changelogs

2009-03-26 Thread Ben Finney
package debhelper
tags 521258 + patch
thanks

My Perl is atrocious, but this patch (generated from ‘git diff’
against the current public branch for ‘debhelper’) should show the
intent of this report at least.

-- 
 \  “I like my dental hygenist, I think she's very pretty; so when |
  `\I go to have my teeth cleaned, while I'm in the waiting room I |
_o__)eat an entire box of cookies.” —Steven Wright |
Ben Finney b...@benfinney.id.au
diff --git a/dh_installchangelogs b/dh_installchangelogs
index 3749d52..1919e55 100755
--- a/dh_installchangelogs
+++ b/dh_installchangelogs
@@ -73,13 +73,16 @@ my $changelog_name=changelog.Debian;
 if (! defined $upstream) {
 	if (! isnative($dh{MAINPACKAGE})  !compat(6)) {
 		my @files=sort glob(*);
-		foreach my $name (qw{changelog changes changelog.txt changes.txt}) {
-			my @matches=grep {
-lc $_ eq $name  -s $_  ! excludefile($_)
-			} @files;
-			if (@matches) {
-$upstream=shift @matches;
-last;
+		foreach my $dir (qw{. doc docs}) {
+			foreach my $name
+(qw{changelog changes changelog.txt changes.txt}) {
+my @matches=grep {
+	lc $_ eq $dir/$name  -s $_  ! excludefile($_)
+} @files;
+if (@matches) {
+	$upstream=shift @matches;
+	last;
+}
 			}
 		}
 	}


signature.asc
Description: Digital signature


Bug#521258: dh_installchangelogs: search likely subdirectories for upstream changelogs

2009-03-26 Thread Ben Finney
Package: debhelper
Version: 7.0.17
Severity: wishlist

Many upstreams maintain a changelog as documentation, and keep the
documentation in a separate subdirectory.

‘dh_installchangelogs’ should search likely subdirectories for the
upstream changelog files, in addition to the top-level directory.

-- 
 \  “Holy priceless collection of Etruscan snoods, Batman!” —Robin |
  `\   |
_o__)  |
Ben Finney b...@benfinney.id.au


signature.asc
Description: Digital signature