summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Dh_Getopt.pm1
-rw-r--r--Dh_Lib.pm2
-rw-r--r--autoscripts/postinst-doc-base2
-rw-r--r--autoscripts/prerm-doc-base2
-rw-r--r--debian/changelog10
-rwxr-xr-xdh_compress2
-rwxr-xr-xdh_installdocs47
-rw-r--r--dh_installdocs.16
-rw-r--r--doc/README2
-rw-r--r--doc/TODO16
10 files changed, 68 insertions, 22 deletions
diff --git a/Dh_Getopt.pm b/Dh_Getopt.pm
index e0b3896d..5f43496b 100644
--- a/Dh_Getopt.pm
+++ b/Dh_Getopt.pm
@@ -84,6 +84,7 @@ sub parseopts {
"d" => \$options{D_FLAG},
"remove-d" => \$options{D_FLAG},
+ "dirs-only" => \$options{D_FLAG},
"r" => \$options{R_FLAG},
"no-restart-on-upgrade" => \$options{R_FLAG},
diff --git a/Dh_Lib.pm b/Dh_Lib.pm
index fb02a5dd..f20cd5db 100644
--- a/Dh_Lib.pm
+++ b/Dh_Lib.pm
@@ -261,7 +261,7 @@ sub filearray { my $file=shift;
my @ret;
open (DH_FARRAY_IN,"<$file") || error("cannot read $file: $1");
while (<DH_FARRAY_IN>) {
- push @ret,split(/\s/,$_);
+ push @ret,split(' ',$_);
}
close DH_FARRAY_IN;
diff --git a/autoscripts/postinst-doc-base b/autoscripts/postinst-doc-base
index a53ed7bf..c3653bed 100644
--- a/autoscripts/postinst-doc-base
+++ b/autoscripts/postinst-doc-base
@@ -1,3 +1,3 @@
if command -v install-docs >/dev/null 2>&1; then
- install-docs -i /usr/share/doc-base/#PACKAGE#
+ install-docs -i /usr/share/doc-base/#DOC-ID#
fi
diff --git a/autoscripts/prerm-doc-base b/autoscripts/prerm-doc-base
index 339361a5..9678003e 100644
--- a/autoscripts/prerm-doc-base
+++ b/autoscripts/prerm-doc-base
@@ -1,3 +1,3 @@
if command -v install-docs >/dev/null 2>&1; then
- install-docs -r #PACKAGE#
+ install-docs -r #DOC-ID#
fi
diff --git a/debian/changelog b/debian/changelog
index 9e0179ca..cf51a7ca 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,13 @@
+debhelper (1.2.34) unstable; urgency=low
+
+ * dh_clean: added -d flag (also --dirs-only) that will make it clean only
+ tmp dirs. (closes: #30807)
+ * dh_installdocs: to support packages that need multiple doc-base files,
+ will now look for debian/<package>.doc-base.<doc-id>.
+ * dh_compress: removed warning message (harmless).
+
+ -- Joey Hess <joeyh@master.debian.org> Sat, 6 Feb 1999 17:48:33 -0800
+
debhelper (1.2.33) unstable; urgency=low
* dh_compress: verbose_print() cd's.
diff --git a/dh_compress b/dh_compress
index 673f9102..caffc11e 100755
--- a/dh_compress
+++ b/dh_compress
@@ -59,7 +59,7 @@ foreach $PACKAGE (@{$dh{DOPACKAGES}}) {
# we can preserve the hard link across the compression and save
# space in the end.
my @f=();
- my %hardlinks={};
+ my %hardlinks;
foreach (@files) {
($dev, $inode, undef, $nlink)=stat($_);
if ($nlink > 1) {
diff --git a/dh_installdocs b/dh_installdocs
index 1d051819..bc8fb8f5 100755
--- a/dh_installdocs
+++ b/dh_installdocs
@@ -62,17 +62,52 @@ foreach $PACKAGE (@{$dh{DOPACKAGES}}) {
doit("install","-m","644","-p",$copyright,"$TMP/usr/doc/$PACKAGE/copyright");
}
- # Handle doc-base files.
+ # Handle doc-base files. There are two filename formats, the usual plus
+ # an extended format (debian/package.doc-base.<doc-id>). Have to
+ # come up with good document-id's too.
+ my %doc_ids;
+
+ opendir(DEB,"debian/") || error("can't read debian directory: $!");
+ foreach (grep {/^$PACKAGE\.doc-base\..*$/} readdir(DEB)) {
+ $id=$_;
+ $id=~s/\.doc-base\./-/;
+ $doc_ids{$id}="debian/$_";
+ }
+ closedir(DEB);
+
+ # These next lines handle the format debian/doc-base.<doc-id>,
+ # which is in for completeness.
+ if ($PACKAGE eq $dh{MAINPACKAGE}) {
+ opendir(DEB,"debian/") || error("can't read debian directory: $!");
+ foreach (grep {/^doc-base\..*$/} readdir(DEB)) {
+ $id=$_;
+ $id=~s/doc-base\./$PACKAGE-/;
+ $doc_ids{$id}="debian/$_";
+ }
+ closedir(DEB);
+ }
+
+ # And this handles the normal format of course.
$file=pkgfile($PACKAGE,"doc-base");
- if ($file) {
+ if ($file ne '') {
+ $doc_ids{$PACKAGE}=$file;
+ }
+
+ if (%doc_ids) {
if (! -d "$TMP/usr/share/doc-base/") {
doit("install","-d","$TMP/usr/share/doc-base/");
}
- doit("install","-p","-m644",$file,
- "$TMP/usr/share/doc-base/$PACKAGE");
+ }
+ foreach $doc_id (keys %doc_ids) {
+ doit("install","-m644","-p",$doc_ids{$doc_id},
+ "$TMP/usr/share/doc-base/$doc_id");
if (! $dh{NOSCRIPTS}) {
- autoscript($PACKAGE,"postinst","postinst-doc-base");
- autoscript($PACKAGE,"prerm","prerm-doc-base")
+ autoscript($PACKAGE,"postinst","postinst-doc-base",
+ "s/#DOC-ID#/$doc_id/",
+ );
+ autoscript($PACKAGE,"prerm","prerm-doc-base",
+ "s/#DOC-ID#/$doc_id/",
+ );
}
}
}
diff --git a/dh_installdocs.1 b/dh_installdocs.1
index abdef780..50f07e1f 100644
--- a/dh_installdocs.1
+++ b/dh_installdocs.1
@@ -38,6 +38,12 @@ interface with the doc-base package. See
.BR dh_installdeb (1)
for an explanation of how this works. Note that the package name will be
used as the doc-base document id.
+.PP
+If your package needs to register more
+than one document, you need multiple files. To accomplish this, you can use
+files named debian/package.doc-base.docid. The "docid" on the end is a
+string that is combined with the package name to generate a unique doc-base
+document id.
.SH OPTIONS
.TP
.B debhelper options
diff --git a/doc/README b/doc/README
index b283af20..30f2a2cf 100644
--- a/doc/README
+++ b/doc/README
@@ -12,7 +12,7 @@ Starting a new package:
----------------------
You can just use the example rules files and do the rest of the new package
-set up by hand, or you could try the new dh-make package, which contains a
+set up by hand, or you could try the dh-make package, which contains a
"dh_make" command that is similar to debmake, and tries to automate the
process.
diff --git a/doc/TODO b/doc/TODO
index 27b5055a..b926737c 100644
--- a/doc/TODO
+++ b/doc/TODO
@@ -1,12 +1,6 @@
This is the TODO for debhelper. As more and more people use debhelper, this
list grows - I welcome patches to fix items on it!
-Bugs:
-
-* all commands should print a warning message if non-cumulative parameters
- are given more than once (ie, two -u's to dh_gencontrol). (#22588)
- (Bug currently under dispute, I think this is bogus).
-
Wishlist items:
* Make dh_* "use strict".
@@ -54,8 +48,8 @@ Wishlist items:
Deprecated:
-* remove dh_installdebfiles, dh_du.
- - need to wait a reasonable length of time. I'm currently planning
- on doing this after slink is released or one year after they were
- deprecated, whichever comes first. Be sure to grep whole debian
- archive for all of them before removing them, though!
+* remove dh_installdebfiles, dh_du.
+ - need to wait a reasonable length of
+ time. I'm currently planning on doing this after slink is released or
+ one year after they were deprecated, whichever comes first. Be sure to
+ grep whole debian archive for all of them before removing them, though!