diff options
author | joey <joey> | 2003-08-22 19:40:51 +0000 |
---|---|---|
committer | joey <joey> | 2003-08-22 19:40:51 +0000 |
commit | 917726187d01b79c7aa454a953f2e483a5171061 (patch) | |
tree | 7f614ae4c96f9cd3facf2f25e1be5c49a2c7ff15 /dh_compress | |
parent | 5dd373940d0348cc4dce74d0b0aa148d35b29934 (diff) | |
download | debhelper-917726187d01b79c7aa454a953f2e483a5171061.tar.gz |
r1596: * Remove duplicate packages from DOPACKAGES after argument processing.version_4.1.68
Closes: #112950
* dh_compress: deal with links pointing to links pointing to compressed
files, no matter what order find returns them. Closes: #204169
* dh_installmodules, dh_installpam, dh_installcron, dh_installinit,
dh_installogrotate: add --name= option, that can be used to specify
the name to use for the file(s) installed by these commands. For example,
dh_installcron --name=foo will install debian/package.foo.cron.daily to
etc/cron.daily/foo. Closes: #138202, #101003, #68545, #148844
(Thanks to Thomas Hood for connecting these bug reports.)
* dh_installinit: deprecated --init-script option in favor of the above.
* Add dh_installppp. Closes: #43403
Diffstat (limited to 'dh_compress')
-rwxr-xr-x | dh_compress | 26 |
1 files changed, 17 insertions, 9 deletions
diff --git a/dh_compress b/dh_compress index 9d287af4..cbdf627c 100755 --- a/dh_compress +++ b/dh_compress @@ -166,16 +166,24 @@ foreach my $package (@{$dh{DOPACKAGES}}) { chdir($olddir); # Fix up symlinks that were pointing to the uncompressed files. - open (FIND,"find $tmp -type l |"); - while (<FIND>) { - chomp; - my ($directory)=m:(.*)/:; - my $linkval=readlink($_); - if (! -e "$directory/$linkval" && -e "$directory/$linkval.gz") { - doit("rm","-f",$_); - doit("ln","-sf","$linkval.gz","$_.gz"); + my %links = map { chomp; $_ => 1 } `find $tmp -type l`; + my $changed; + # Keep looping through looking for broken links until no more + # changes are made. This is done in case there are links pointing + # to links, pointing to compressed files. + do { + $changed = 0; + foreach my $link (keys %links) { + my ($directory) = $link =~ m:(.*)/:; + my $linkval = readlink($link); + if (! -e "$directory/$linkval" && -e "$directory/$linkval.gz") { + doit("rm","-f",$link); + doit("ln","-sf","$linkval.gz","$link.gz"); + delete $links{$link}; + $changed++; + } } - } + } while $changed; } =head1 SEE ALSO |