The branch, master has been updated
via 0a3f6436bcdfed21e7edc0c1c8c60322b590298b (commit)
via 65135f5f7090ddf6c8709659f69e740440f2e91a (commit)
via 0639bc06013e31a3bccd9c909ac426c59ba59092 (commit)
from 50f4a319f649589e016894a8375ad516db25042d (commit)
- Shortlog ------------------------------------------------------------
0a3f643 Dpkg::Shlibs: Always consider all paths from LD_LIBRARY_PATH
65135f5 dpkg-shlibdeps: try harder to identify the package providing a library
0639bc0 dpkg-shlibdeps: accepts empty dependencies in shlibs files
Summary of changes:
ChangeLog | 10 +++++++++-
debian/changelog | 4 ++++
scripts/Dpkg/Shlibs.pm | 4 +---
scripts/dpkg-shlibdeps.pl | 24 +++++++++++++++++++-----
4 files changed, 33 insertions(+), 9 deletions(-)
-----------------------------------------------------------------------
Details of changes:
commit 0a3f6436bcdfed21e7edc0c1c8c60322b590298b
Author: Raphael Hertzog <[EMAIL PROTECTED]>
Date: Thu Nov 22 12:22:14 2007 +0100
Dpkg::Shlibs: Always consider all paths from LD_LIBRARY_PATH
Paths listed in LD_LIBRARY_PATH were not added at the beginning of the
search
path if they were part of the default search paths. Remove this restriction
so that it's possible to change the search order in default paths by using
this variable.
diff --git a/ChangeLog b/ChangeLog
index b5eb5dd..42e0c4c 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -5,7 +5,10 @@
not found by "dpkg -S", try the same on the realpath of the
library as fallback before deciding that it's a library being
built.
-
+ * scripts/Dpkg/Shlibs.pm: Always add paths from LD_LIBRARY_PATH
+ at the beginning of the list of path to search, even if they
+ are already listed (one might want to use LD_LIBRARY_PATH to
+ change the search order).
2007-11-21 Raphael Hertzog <[EMAIL PROTECTED]>
diff --git a/scripts/Dpkg/Shlibs.pm b/scripts/Dpkg/Shlibs.pm
index 28225df..03916bb 100644
--- a/scripts/Dpkg/Shlibs.pm
+++ b/scripts/Dpkg/Shlibs.pm
@@ -35,9 +35,7 @@ our @librarypaths = (DEFAULT_LIBRARY_PATH);
if ($ENV{LD_LIBRARY_PATH}) {
foreach my $path (reverse split( /:/, $ENV{LD_LIBRARY_PATH} )) {
$path =~ s{/+$}{};
- unless (scalar grep { $_ eq $path } @librarypaths) {
- unshift @librarypaths, $path;
- }
+ unshift @librarypaths, $path;
}
}
commit 65135f5f7090ddf6c8709659f69e740440f2e91a
Author: Raphael Hertzog <[EMAIL PROTECTED]>
Date: Thu Nov 22 12:16:56 2007 +0100
dpkg-shlibdeps: try harder to identify the package providing a library
If the library is an unpackaged symlink, then try to identify the package
via the realpath associated to the symlink.
diff --git a/ChangeLog b/ChangeLog
index bd9ba19..b5eb5dd 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,7 +1,11 @@
2007-11-22 Raphael Hertzog <[EMAIL PROTECTED]>
* scripts/dpkg-shlibdeps.pl: Add more debug messages. Accept empty
- dependencies in shlibs files again.
+ dependencies in shlibs files again. When symlinks to libraries are
+ not found by "dpkg -S", try the same on the realpath of the
+ library as fallback before deciding that it's a library being
+ built.
+
2007-11-21 Raphael Hertzog <[EMAIL PROTECTED]>
diff --git a/debian/changelog b/debian/changelog
index 5cfc889..5b14a49 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -8,6 +8,9 @@ dpkg (1.14.10) UNRELEASED; urgency=low
* Add more debug messages to dpkg-shlibdeps to ease collecting information
in case of problems.
* dpkg-shlibdeps now accepts again empty dependencies in shlibs files.
+ * dpkg-shlibdeps will try harder to identify packages providing a library
+ by looking up dpkg -S on the realpath of any symlink to a library.
+ Closes: #452339
[ Updated man pages translations ]
* Swedish (Peter Karlsson)
diff --git a/scripts/dpkg-shlibdeps.pl b/scripts/dpkg-shlibdeps.pl
index 6120b66..5930eb7 100755
--- a/scripts/dpkg-shlibdeps.pl
+++ b/scripts/dpkg-shlibdeps.pl
@@ -5,6 +5,7 @@ use warnings;
use English;
use POSIX qw(:errno_h :signal_h);
+use Cwd qw(realpath);
use Dpkg;
use Dpkg::Gettext;
use Dpkg::ErrorHandling qw(warning error failure syserr usageerr);
@@ -95,22 +96,34 @@ foreach my $file (keys %exec) {
# Load symbols files for all needed libraries (identified by SONAME)
my %libfiles;
+ my %altlibfiles;
foreach my $soname (@sonames) {
my $lib = my_find_library($soname, $obj->{RPATH}, $obj->{format},
$file);
failure(_g("couldn't find library %s (note: only packages with " .
"'shlibs' files are looked into)."), $soname)
unless defined($lib);
$libfiles{$lib} = $soname;
+ if (-l $lib) {
+ $altlibfiles{realpath($lib)} = $soname;
+ }
print "Library $soname found in $lib\n" if $debug;
}
- my $file2pkg = find_packages(keys %libfiles);
+ my $file2pkg = find_packages(keys %libfiles, keys %altlibfiles);
my $symfile = Dpkg::Shlibs::SymbolFile->new();
my $dumplibs_wo_symfile = Dpkg::Shlibs::Objdump->new();
my @soname_wo_symfile;
foreach my $lib (keys %libfiles) {
my $soname = $libfiles{$lib};
+ if (not exists $file2pkg->{$lib} and -l $lib) {
+ # If the lib found is an unpackaged symlink, we try a fallback
+ # on the realpath() first, maybe this one is part of a package
+ my $reallib = realpath($lib);
+ if (exists $file2pkg->{$reallib}) {
+ $file2pkg->{$lib} = $file2pkg->{$reallib};
+ }
+ }
if (not exists $file2pkg->{$lib}) {
- # If the library is not available in an installed package,
+ # If the library is really not available in an installed package,
# it's because it's in the process of being built
# Empty package name will lead to consideration of symbols
# file from the package being built only
commit 0639bc06013e31a3bccd9c909ac426c59ba59092
Author: Raphael Hertzog <[EMAIL PROTECTED]>
Date: Thu Nov 22 11:26:17 2007 +0100
dpkg-shlibdeps: accepts empty dependencies in shlibs files
diff --git a/ChangeLog b/ChangeLog
index be1775e..bd9ba19 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,6 +1,7 @@
2007-11-22 Raphael Hertzog <[EMAIL PROTECTED]>
- * scripts/dpkg-shlibdeps.pl: Add more debug messages.
+ * scripts/dpkg-shlibdeps.pl: Add more debug messages. Accept empty
+ dependencies in shlibs files again.
2007-11-21 Raphael Hertzog <[EMAIL PROTECTED]>
diff --git a/debian/changelog b/debian/changelog
index e784fa0..5cfc889 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -7,6 +7,7 @@ dpkg (1.14.10) UNRELEASED; urgency=low
Closes: #452262
* Add more debug messages to dpkg-shlibdeps to ease collecting information
in case of problems.
+ * dpkg-shlibdeps now accepts again empty dependencies in shlibs files.
[ Updated man pages translations ]
* Swedish (Peter Karlsson)
diff --git a/scripts/dpkg-shlibdeps.pl b/scripts/dpkg-shlibdeps.pl
index 800460d..6120b66 100755
--- a/scripts/dpkg-shlibdeps.pl
+++ b/scripts/dpkg-shlibdeps.pl
@@ -369,11 +369,12 @@ sub extract_from_shlibs {
while (<SHLIBS>) {
s/\s*\n$//;
next if m/^\#/;
- if (!m/^\s*(?:(\S+):\s+)?(\S+)\s+(\S+)\s+(\S.*\S)\s*$/) {
+ if (!m/^\s*(?:(\S+):\s+)?(\S+)\s+(\S+)(?:\s+(\S.*\S))?\s*$/) {
warning(_g("shared libs info file \`%s' line %d: bad line \`%s'"),
$shlibfile, $., $_);
next;
}
+ my $depread = defined($4) ? $4 : '';
if (($libname eq $2) && ($libversion eq $3)) {
# Define dep and end here if the package type explicitely
# matches. Otherwise if the packagetype is not specified, use
@@ -381,11 +382,11 @@ sub extract_from_shlibs {
# line
if (defined($1)) {
if ($1 eq $packagetype) {
- $dep = $4;
+ $dep = $depread;
last;
}
} else {
- $dep = $4 unless defined $dep;
+ $dep = $depread unless defined $dep;
}
}
}
--
dpkg's main repository
--
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]