From: joey Date: Tue, 17 Aug 1999 05:16:02 +0000 (+0000) Subject: r221: Initial Import X-Git-Tag: debian_version_0_1~24 X-Git-Url: https://git.donarmstrong.com/?a=commitdiff_plain;h=289f1de123932be984ef2a586cc792ae44332d29;p=debhelper.git r221: Initial Import --- diff --git a/debian/changelog b/debian/changelog index 8d402a7..e80107c 100644 --- a/debian/changelog +++ b/debian/changelog @@ -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 Fri, 25 Jun 1999 10:12:44 -0700 + debhelper (1.2.80) unstable; urgency=low * Changed perl version detection. diff --git a/dh_installinit.1 b/dh_installinit.1 index 5ec55fc..cbb4b44 100644 --- a/dh_installinit.1 +++ b/dh_installinit.1 @@ -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 f99aab7..919dc52 100755 --- 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) { diff --git a/t/dh_link b/t/dh_link index 9f644e7..8c7bfee 100644 --- 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"));