]> git.donarmstrong.com Git - debhelper.git/commitdiff
r170: Initial Import
authorjoey <joey>
Tue, 17 Aug 1999 05:09:33 +0000 (05:09 +0000)
committerjoey <joey>
Tue, 17 Aug 1999 05:09:33 +0000 (05:09 +0000)
Dh_Getopt.pm
Dh_Lib.pm
autoscripts/postinst-doc-base
autoscripts/prerm-doc-base
debian/changelog
dh_compress
dh_installdocs
dh_installdocs.1
doc/README
doc/TODO

index e0b3896dc2b0eb1da8785615265c86223b21c975..5f43496bb7b6373df74aa649f600809d6931bf60 100644 (file)
@@ -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},
index fb02a5dd8aed3dab4d66141b4ff458c2a344969a..f20cd5db8d29be024edcb1241646fa9e780fd53f 100644 (file)
--- 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;
        
index a53ed7bfaca0ba9e5a8a3fdb9bd8f1c60d6e735d..c3653beddaa527255eb36cb45c0085b6c5cd3cd7 100644 (file)
@@ -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
index 339361a54db4df149e0f1ac763616d7e68afe553..9678003ece922a60539bac1655d9165e08b72166 100644 (file)
@@ -1,3 +1,3 @@
 if command -v install-docs >/dev/null 2>&1; then
-       install-docs -r #PACKAGE#
+       install-docs -r #DOC-ID#
 fi
index 9e0179ca4fe587b0621e1f8a69982f7001259dd6..cf51a7cac6888d68051b44763b3214e4b1d60b83 100644 (file)
@@ -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.
index 673f9102eeac722e071b0bf05bae64bfc83741c0..caffc11e9f158b73f03deb2fde2a20a67c1deec9 100755 (executable)
@@ -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) {
index 1d05181966cfc48188b46aef60a2acf57c86e4a4..bc8fb8f59684efcaad20e0c8dea25e96cc5c2528 100755 (executable)
@@ -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/",
+                       );
                }
        }
 }
index abdef780367ccf57603ea8d7acb6bc41fea3fed6..50f07e1f3e8c5b59b9966606e219a06c6412f392 100644 (file)
@@ -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
index b283af206b69e195b73dce871a144f9f87b8c9e7..30f2a2cf4af02e4da466cc6e97943c0c0ee08726 100644 (file)
@@ -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.
 
index 27b5055a55de95827b95cb2732503013fa1230d9..b926737c387f24794333171f90a22ae1a19344dd 100644 (file)
--- 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!