]> git.donarmstrong.com Git - debhelper.git/commitdiff
r221: Initial Import
authorjoey <joey>
Tue, 17 Aug 1999 05:16:02 +0000 (05:16 +0000)
committerjoey <joey>
Tue, 17 Aug 1999 05:16:02 +0000 (05:16 +0000)
debian/changelog
dh_installinit.1
dh_link
t/dh_link

index 8d402a7350b8d39ccc3ee496a54b6a00aefed5a6..e80107c13faaf0b683ef0b8e1e0c870bb3806f6a 100644 (file)
@@ -1,3 +1,10 @@
+debhelper (1.2.81) unstable; urgency=low
+
+  * dh_link: fixed bug #40159 and added a regression test for it. It was
+    failing if it was given absolute filenames.
+
+ -- Joey Hess <joeyh@master.debian.org>  Fri, 25 Jun 1999 10:12:44 -0700
+
 debhelper (1.2.80) unstable; urgency=low
 
   * Changed perl version detection.
index 5ec55fcdd0a4e774519802671fb94521502bd7ad..cbb4b4446470361acee67ca01c4a2da47e6ed369 100644 (file)
@@ -45,7 +45,12 @@ If not specified, "defaults" will be passed to
 .B \--init-script=scriptname
 Use "scriptname" as for the filename the init script is installed as in
 etc/init.d/ . This is useful if you need to have an init script with a name
-different from the package's name.
+different from the package's name. Note that if you use this parameter,
+dh_installinit will look to see if a file in the debian/ directory exists
+that looks like "scriptname" or "package.scriptname" and if so will install
+it as the inist script in preference to the files it normally installs. This
+feature is really only useful if you need a single package to install more
+than one init script.
 .SH ENVIRONMENT
 See
 .BR debhelper (1)
diff --git a/dh_link b/dh_link
index f99aab73728e375f239789f2d5dd2c35d2aabfe7..919dc524a7035863833963b38ccdba68ce3b9b30 100755 (executable)
--- a/dh_link
+++ b/dh_link
@@ -35,6 +35,10 @@ foreach $PACKAGE (@{$dh{DOPACKAGES}}) {
                $dest=pop @links;
                $src=pop @links;
 
+               # Relivatize src and dest.
+               $src=~s:^/::;
+               $dest=~s:^/::;
+
                # Make sure the directory the link will be in exists.
                $basedir=Dh_Lib::dirname("$TMP/$dest");
                if (! -e $basedir) {
@@ -50,7 +54,6 @@ foreach $PACKAGE (@{$dh{DOPACKAGES}}) {
                        # Figure out how much of a path $src and $dest
                        # share in common.
                        for ($x=0; $x<$#src_dirs && $src_dirs[$x] eq $dest_dirs[$x]; $x++) {}
-
                        # Build up the new src.
                        $src="";
                        for (1..$#dest_dirs - $x) {
index 9f644e78e4def6066139878ce86885bc44949014..8c7bfeee93e20b021af4b742ae04ddf46c42d1b3 100644 (file)
--- a/t/dh_link
+++ b/t/dh_link
@@ -1,6 +1,6 @@
 #!/usr/bin/perl
 use Test;
-plan(tests => 3);
+plan(tests => 4);
 
 # It used to not make absolute links in this situation, and it should.
 # #37774
@@ -14,3 +14,7 @@ ok("foo",readlink("debian/tmp/usr/bin/bar"));
 # ok, more complex relative links.
 system("./dh_link","usr/lib/1","usr/bin/2");
 ok("../lib/1",readlink("debian/tmp/usr/bin/2"));
+
+# this was bug #40159. Absolute links passes to dh_link.
+system("./dh_link","/etc/X11/dfm/system.dfmext","usr/share/dfm/dfmext");
+ok("/etc/X11/dfm/system.dfmext",readlink("debian/tmp/usr/share/dfm/dfmext"));