summaryrefslogtreecommitdiff
path: root/dh_link
diff options
context:
space:
mode:
authorjoeyh <joeyh>2007-08-18 00:42:06 +0000
committerjoeyh <joeyh>2007-08-18 00:42:06 +0000
commit91b8c0c1c3c6bed0407734c444161f89a2411f99 (patch)
treefdf7de5609cb16422720caed336f7e3a6057bd9d /dh_link
parentb5fbfc1ee24b49e9e7d902e66b42fad430f39e95 (diff)
downloaddebhelper-91b8c0c1c3c6bed0407734c444161f89a2411f99.tar.gz
r2020: * dh_link: Skip self-links. Closes: #438572
Diffstat (limited to 'dh_link')
-rwxr-xr-xdh_link7
1 files changed, 6 insertions, 1 deletions
diff --git a/dh_link b/dh_link
index f7a910a5..84e6ba35 100755
--- a/dh_link
+++ b/dh_link
@@ -166,6 +166,11 @@ foreach my $package (@{$dh{DOPACKAGES}}) {
$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");
@@ -182,7 +187,7 @@ foreach my $package (@{$dh{DOPACKAGES}}) {
# 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) {