]> git.donarmstrong.com Git - debhelper.git/commitdiff
r378: * dh_movefiles: fixed a regexp quoting problem with --sourcedir.
authorjoey <joey>
Mon, 23 Oct 2000 22:36:18 +0000 (22:36 +0000)
committerjoey <joey>
Mon, 23 Oct 2000 22:36:18 +0000 (22:36 +0000)
Closes: #75434
   * Whoops, I think I overwrote bod's NMU with 2.2.15. Let's merge those
     in:
     .
     debhelper (2.1.14-0.1) unstable; urgency=low
     .
       * Non-maintainer upload (thanks Joey).
       * dh_installchangelogs, dh_installdocs: allow dangling symlinks for
         $TMP/usr/share/doc/$PACKAGE (useful for multi-binary packages).
Closes: #53381
     .
     -- Brendan O'Dea <bod@debian.org>  Fri, 20 Oct 2000 18:11:59 +1100
     .
     I also added some documentation to debhelper.1 about this, and removed
     the TODO entry about it.

debhelper.1
debian/changelog
dh_installchangelogs
dh_installdocs
dh_movefiles
doc/TODO

index 91aabb4cf434be1261f35827ba540680ca18659d..aedecd729a98aad66c89324e822021add90f274c 100644 (file)
@@ -196,6 +196,18 @@ notice, and so may break packages that use it. See the file
 changes.
 .RE
 .TP
+.B Doc directory symlinks
+.RS
+Sometimes it is useful to make a package not contain a /usr/share/doc/package
+directory at all, instead placing just a dangling symlink in the binary
+package, that points to some other doc directory. Policy says this is ok if
+your package depends on the package whose doc directory it uses. To
+accomplish this, just don't tell debhelper to install any documentation
+files into the package, and use dh_link to set up the symlink (or do it by
+hand), and debhelper should do the right thing: notice it is a dangling
+symlink and not try to install a copyright file or changelog.
+.RE
+.TP
 .B Other notes
 .RS
 In general, if any debhelper program needs a directory to exist under
index 589eacb99faa67d6940872867a121f52505549f4..633263e133bf78a8ede60915c18699ee988183db 100644 (file)
@@ -1,3 +1,24 @@
+debhelper (2.1.16) unstable; urgency=low
+
+  * dh_movefiles: fixed a regexp quoting problem with --sourcedir. 
+    Closes: #75434
+  * Whoops, I think I overwrote bod's NMU with 2.2.15. Let's merge those
+    in:
+    .
+    debhelper (2.1.14-0.1) unstable; urgency=low
+    .
+      * Non-maintainer upload (thanks Joey).
+      * dh_installchangelogs, dh_installdocs: allow dangling symlinks for
+        $TMP/usr/share/doc/$PACKAGE (useful for multi-binary packages).
+        Closes: #53381
+    .
+    -- Brendan O'Dea <bod@debian.org>  Fri, 20 Oct 2000 18:11:59 +1100
+    .
+    I also added some documentation to debhelper.1 about this, and removed
+    the TODO entry about it.
+
+ -- Joey Hess <joeyh@debian.org>  Mon, 23 Oct 2000 15:14:49 -0700
+
 debhelper (2.1.15) unstable; urgency=low
 
   * dh_installwm: patched a path in some backwards compatability code.
index 89b6ff6b448ea271a5d987f6ce13ebb1a1429873..e14eba68b3f700e8e706c95a726c3a1a590c326f 100755 (executable)
@@ -36,6 +36,11 @@ foreach $PACKAGE (@{$dh{DOPACKAGES}}) {
        }
 
        if (! -d "$TMP/usr/share/doc/$PACKAGE") {
+               # If it is a dangling symlink, then don't do anything.
+               # Think multi-binary packages that depend on each other and
+               # want to link doc dirs.
+               next if -l "$TMP/usr/share/doc/$PACKAGE";
+
                doit("install","-d","$TMP/usr/share/doc/$PACKAGE");
        }
        doit("install","-o",0,"-g",0,"-p","-m644",$changelog,
index 5a3ef709b1f17a1e593ef20b7871843cf879a5ff..7af380947bd1a27853ea870896b286052c3dca76 100755 (executable)
@@ -57,16 +57,21 @@ foreach $PACKAGE (@{$dh{DOPACKAGES}}) {
                }
        }
 
-       # Support debian/package.copyright, but if not present, fall back
-       # on debian/copyright for all packages, not just the main binary
-       # package.
-       $copyright=pkgfile($PACKAGE,'copyright');
-       if (! $copyright && -e "debian/copyright") {
-               $copyright="debian/copyright";
-       }
-       if ($copyright) {
-                       doit("install","-g",0,"-o",0,"-m","644","-p",$copyright,
-                               "$TMP/usr/share/doc/$PACKAGE/copyright");
+       # If the "directory" is a dangling symlink, then don't install
+       # the copyright file. This is useful for multibinary packages 
+       # that share a doc directory.
+       if (-d "$TMP/usr/share/doc/$PACKAGE") {
+               # Support debian/package.copyright, but if not present, fall
+               # back on debian/copyright for all packages, not just the 
+               # main binary package.
+               $copyright=pkgfile($PACKAGE,'copyright');
+               if (! $copyright && -e "debian/copyright") {
+                       $copyright="debian/copyright";
+               }
+               if ($copyright) {
+                               doit("install","-g",0,"-o",0,"-m","644","-p",$copyright,
+                                       "$TMP/usr/share/doc/$PACKAGE/copyright");
+               }
        }
 
        # Add in the /usr/doc compatability symlinks code.
index ad9add28b2edbd978f255aaebc9f08389063dcef..60e16f12d2799e1ede99ddc6dae1c5546b2f1be1 100755 (executable)
@@ -60,13 +60,13 @@ foreach $PACKAGE (@{$dh{DOPACKAGES}}) {
                foreach (@filelist) {
                        $file=$_;
                        $ret=1 if (! -e $file && ! -l $file);
-                       $file=~s:^$sourcedir/+::;
+                       $file=~s:^\Q$sourcedir\E/+::;
                        complex_doit("(cd $sourcedir >/dev/null ; find $file ! -type d -and ! -type l -print || true) >> debian/movelist");
                }
                foreach (@filelist) {
                        $file=$_;
                        $ret=1 if (! -e $file && ! -l $file);
-                       $file=~s:^$sourcedir/+::;
+                       $file=~s:^\Q$sourcedir\E/+::;
                        complex_doit("(cd $sourcedir >/dev/null ; find $file ! -type d -and -type l -print || true) >> debian/movelist");
                }
                complex_doit("(cd $sourcedir >/dev/null ; tar --create --remove-files --files-from=../movelist --file -) | (cd $TMP >/dev/null ;tar xpf -)");
index 4cd098457298c337f115edc28d1ea8b249dcebe1..9277132e60a93623c05413ff514a7476c752cab1 100644 (file)
--- a/doc/TODO
+++ b/doc/TODO
@@ -48,12 +48,6 @@ Wishlist items:
   postinst.in before debhelper gets it's hands on it... (#25235)
 * objdump -p can get the soname of a library, try using that in dh_shlibs
   instead of parsing filenames.
-* to suport foo-doc -> foo symlinks in /usr/share/doc, make
-  dh_installdocs/changelogs check to see if the doc dir is a symlink to a
-  directory. If so, dh_installdocs does not install copyright, and
-  dh_installchangelogs does nothing, but everything else dh_installdocs would
-  do is still done. This means that you need to use dh_link and dh_installdirs
-  to set up the link and directory.
 
 Deprecated: