* dh_strip: Man page reference to policy section on DEB_BUILD_OPTIONS.
Closes: #437337
+ * dh_link: Skip self-links. Closes: #438572
- -- Joey Hess <joeyh@debian.org> Sat, 11 Aug 2007 19:27:55 -0400
+ -- Joey Hess <joeyh@debian.org> Fri, 17 Aug 2007 20:41:42 -0400
debhelper (5.0.53) unstable; urgency=low
$src=~s:^/::;
$dest=~s:^/::;
+
+ if ($src eq $dest) {
+ warning("skipping link from $src to self");
+ next;
+ }
# Make sure the directory the link will be in exists.
my $basedir=dirname("$tmp/$dest");
# Figure out how much of a path $src and $dest
# share in common.
my $x;
- for ($x=0; $x<@src_dirs && $src_dirs[$x] eq $dest_dirs[$x]; $x++) {}
+ 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) {
#!/usr/bin/perl
use Test;
-plan(tests => 12);
+plan(tests => 13);
# It used to not make absolute links in this situation, and it should.
# #37774
system("./dh_link","/","usr/lib/geant4/d");
ok(readlink("debian/debhelper/usr/lib/geant4/d"), "/");
+# Link to self.
+system("./dh_link usr/lib/foo usr/lib/foo 2>/dev/null");
+ok(! -l "debian/debhelper/usr/lib/foo");
+
# Make sure the link conversion didn't change any of the previously made
# links.
ok(readlink("debian/debhelper/usr/lib/bar"), "/etc/foo");