The branch, master has been updated
       via  f52f2a333ef7609ddd7e9cab832f49295ff21dd9 (commit)
      from  96ef60d7f55be3ed60d4ac43f346555aa228594f (commit)


- Shortlog ------------------------------------------------------------
f52f2a3 dpkg-shlibdeps: handle the case where the same binary is listed 
multiple times

Summary of changes:
 ChangeLog                 |    3 +++
 debian/changelog          |    2 ++
 scripts/dpkg-shlibdeps.pl |   18 ++++++++++++++++--
 3 files changed, 21 insertions(+), 2 deletions(-)
-----------------------------------------------------------------------
Details of changes:

commit f52f2a333ef7609ddd7e9cab832f49295ff21dd9
Author: Raphael Hertzog <[EMAIL PROTECTED]>
Date:   Tue Jan 15 10:43:28 2008 +0100

    dpkg-shlibdeps: handle the case where the same binary is listed multiple 
times
    
    * scripts/dpkg-shlibdeps.pl: When the same binary is passed
    several times as parameters (associated to different fields),
    associate it to the most important field.

diff --git a/ChangeLog b/ChangeLog
index 78f6ec8..6ae2255 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -4,6 +4,9 @@
        duplicated dependencies in fields of lesser priority. Dependencies
        coming from shlibs files have no associated version and this case
        wasn't handled properly.
+       * scripts/dpkg-shlibdeps.pl: When the same binary is passed
+       several times as parameters (associated to different fields),
+       associate it to the most important field.
 
 2008-01-14  Raphael Hertzog  <[EMAIL PROTECTED]>
 
diff --git a/debian/changelog b/debian/changelog
index e8452bf..5778f49 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -33,6 +33,8 @@ dpkg (1.14.16) UNRELEASED; urgency=low
   * Add support of Dm-Upload-Allowed field. Closes: #453400
   * Fix dpkg-shlibdeps's filtering of duplicated dependencies in fields of
     lesser priority (when -d is used).
+  * Fix behaviour of dpkg-shlibdeps when the same binary was passed multiple
+    times for use in different dependency fields (-d option).
 
   [ Updated manpages translations ]
   * Fix typo in French. Closes: #460021
diff --git a/scripts/dpkg-shlibdeps.pl b/scripts/dpkg-shlibdeps.pl
index 4b6a6e9..3d68585 100755
--- a/scripts/dpkg-shlibdeps.pl
+++ b/scripts/dpkg-shlibdeps.pl
@@ -72,7 +72,14 @@ foreach (@ARGV) {
        defined($depstrength{$dependencyfield}) ||
            warning(_g("unrecognised dependency field \`%s'"), 
$dependencyfield);
     } elsif (m/^-e(.*)$/) {
-       $exec{$1} = $dependencyfield;
+       if (exists $exec{$1}) {
+           # Affect the binary to the most important field
+           if ($depstrength{$dependencyfield} > $depstrength{$exec{$1}}) {
+               $exec{$1} = $dependencyfield;
+           }
+       } else {
+           $exec{$1} = $dependencyfield;
+       }
     } elsif (m/^--ignore-missing-info$/) {
        $ignore_missing_info = 1;
     } elsif (m/^-t(.*)$/) {
@@ -84,7 +91,14 @@ foreach (@ARGV) {
     } elsif (m/^-/) {
        usageerr(_g("unknown option \`%s'"), $_);
     } else {
-       $exec{$_} = $dependencyfield;
+       if (exists $exec{$_}) {
+           # Affect the binary to the most important field
+           if ($depstrength{$dependencyfield} > $depstrength{$exec{$_}}) {
+               $exec{$_} = $dependencyfield;
+           }
+       } else {
+           $exec{$_} = $dependencyfield;
+       }
     }
 }
 

-- 
dpkg's main repository


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

Reply via email to