From: Guillem Jover Date: Wed, 23 May 2007 16:34:00 +0000 (+0000) Subject: Revert change on 1.14.0 from Aaron M. Ucko. Trim down duped entries only X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=48b94108099fc0da83f259e4532d6718e2203c31;p=dpkg Revert change on 1.14.0 from Aaron M. Ucko. Trim down duped entries only when passing them to dpkg-query instead. Closes: #425641 --- diff --git a/ChangeLog b/ChangeLog index f1ca98ac..dbbf5dab 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,10 @@ +2007-05-23 Guillem Jover + + Revert commit on 2007-04-28 by Aaron M. Ucko . + + * scripts/dpkg-shlibdeps.pl: Trim down duplicated files from @libfiles + only when passing it to dpkg-query. + 2007-05-23 Kylan Robinson * scripts/dpkg-source.pl: Fix regex (/\.debian.tar/ -> diff --git a/debian/changelog b/debian/changelog index e7d0693c..84a6a660 100644 --- a/debian/changelog +++ b/debian/changelog @@ -8,6 +8,8 @@ dpkg (1.14.4) UNRELEASED; urgency=low initially intended name. Closes: #425041 * Fix loose regex in dpkg-source (/\.debian.tar/ -> /\.debian\.tar/). Thanks to Kylan Robinson. Closes: #425629 + * Revert change on 1.14.0 from Aaron M. Ucko. Trim down duped entries only + when passing them to dpkg-query instead. Closes: #425641 [ Updated dpkg translations ] * French (Frédéric Bothamy). diff --git a/scripts/dpkg-shlibdeps.pl b/scripts/dpkg-shlibdeps.pl index 7da42b77..cbfb0381 100755 --- a/scripts/dpkg-shlibdeps.pl +++ b/scripts/dpkg-shlibdeps.pl @@ -178,7 +178,7 @@ while( ) { } close CONF; -my (%rpaths, %format, %unique_libfiles); +my (%rpaths, %format); my (@libfiles, @libname, @libsoname, @libfield, @libexec); for ($i=0;$i<=$#exec;$i++) { if (!isbin ($exec[$i])) { next; } @@ -195,19 +195,15 @@ for ($i=0;$i<=$#exec;$i++) { $format{$exec[$i]} = $1; } elsif (m,^\s*NEEDED\s+,) { if (m,^\s*NEEDED\s+((\S+)\.so\.(\S+))$,) { - next if exists $unique_libfiles{$1}; push(@libname,$2); push(@libsoname,$3); push(@libfield,$execfield[$i]); push(@libfiles,$1); push(@libexec,$exec[$i]); - $unique_libfiles{$1} = 1; } elsif (m,^\s*NEEDED\s+((\S+)-(\S+)\.so)$,) { - next if exists $unique_libfiles{$1}; push(@libname,$2); push(@libsoname,$3); push(@libfield,$execfield[$i]); push(@libfiles,$1); push(@libexec,$exec[$i]); - $unique_libfiles{$1} = 1; } else { m,^\s*NEEDED\s+(\S+)$,; warning(sprintf(_g("format of 'NEEDED %s' not recognized"), $1)); @@ -280,10 +276,13 @@ if ($#libfiles >= 0) { grep(s/\[\?\*/\\$&/g, @libname); defined(my $c= open(P,"-|")) || syserr(_g("cannot fork for dpkg --search")); if (!$c) { + my %seen_libfiles; + my @uniq_libfiles = grep !$seen_libfiles{$_}++, @libfiles; + close STDERR; # we don't need to see dpkg's errors open STDERR, "> /dev/null"; $ENV{LC_ALL} = "C"; - exec("dpkg", "--search", "--", @libfiles) or + exec("dpkg", "--search", "--", @uniq_libfiles) or syserr(_g("cannot exec dpkg")); } while (

) {