Author: guillem
Date: 2007-05-23 16:34:00 +0000 (Wed, 23 May 2007)
New Revision: 789

Modified:
   trunk/ChangeLog
   trunk/debian/changelog
   trunk/scripts/dpkg-shlibdeps.pl
Log:
Revert change on 1.14.0 from Aaron M. Ucko. Trim down duped entries only
when passing them to dpkg-query instead. Closes: #425641


Modified: trunk/ChangeLog
===================================================================
--- trunk/ChangeLog     2007-05-22 23:18:12 UTC (rev 788)
+++ trunk/ChangeLog     2007-05-23 16:34:00 UTC (rev 789)
@@ -1,3 +1,10 @@
+2007-05-23  Guillem Jover  <[EMAIL PROTECTED]>
+
+       Revert commit on 2007-04-28 by Aaron M. Ucko  <[EMAIL PROTECTED]>.
+
+       * scripts/dpkg-shlibdeps.pl: Trim down duplicated files from @libfiles
+       only when passing it to dpkg-query.
+
 2007-05-23  Kylan Robinson  <[EMAIL PROTECTED]>
 
        * scripts/dpkg-source.pl: Fix regex (/\.debian.tar/ ->

Modified: trunk/debian/changelog
===================================================================
--- trunk/debian/changelog      2007-05-22 23:18:12 UTC (rev 788)
+++ trunk/debian/changelog      2007-05-23 16:34:00 UTC (rev 789)
@@ -8,6 +8,8 @@
     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).

Modified: trunk/scripts/dpkg-shlibdeps.pl
===================================================================
--- trunk/scripts/dpkg-shlibdeps.pl     2007-05-22 23:18:12 UTC (rev 788)
+++ trunk/scripts/dpkg-shlibdeps.pl     2007-05-23 16:34:00 UTC (rev 789)
@@ -178,7 +178,7 @@
 }
 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 @@
            $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 @@
     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 (<P>) {


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]

Reply via email to