The branch, master has been updated
via 9278a6af560f99611270f479686d15cf5c4e1b86 (commit)
via d9c09384a348639c6ac0399e42e7a33cda8ee528 (commit)
from a24fa4c525934922a6035470556051d50ad4da02 (commit)
- Shortlog ------------------------------------------------------------
9278a6a dpkg-shlibdeps: also search libs in package build trees containing
symbols files
d9c0938 dpkg-shlibdeps: fix find_symbols_file to choose the right symbols file
Summary of changes:
ChangeLog | 16 ++++++++++++++++
debian/changelog | 2 ++
man/dpkg-shlibdeps.1 | 5 +++--
scripts/dpkg-shlibdeps.pl | 40 +++++++++++++++++++++++++++-------------
4 files changed, 48 insertions(+), 15 deletions(-)
-----------------------------------------------------------------------
Details of changes:
commit 9278a6af560f99611270f479686d15cf5c4e1b86
Author: Raphael Hertzog <[EMAIL PROTECTED]>
Date: Thu Jan 3 16:05:54 2008 +0100
dpkg-shlibdeps: also search libs in package build trees containing symbols
files
* scripts/dpkg-shlibdeps.pl (my_find_library): When defining the
list of package build trees to scan, also consider those that
contain symbols files (instead of only considering those that have
a shlibs file).
* man/dpkg-shlibdeps.1: Document the change listed above.
diff --git a/ChangeLog b/ChangeLog
index 862cec2..e8670bf 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -8,6 +8,11 @@
trees are scanned first and thus if they contain a needed library
dpkg-shlibdeps will find the library there and not in an installed
package).
+ * scripts/dpkg-shlibdeps.pl (my_find_library): When defining the
+ list of package build trees to scan, also consider those that
+ contain symbols files (instead of only considering those that have
+ a shlibs file).
+ * man/dpkg-shlibdeps.1: Document the change listed above.
2008-01-03 Guillem Jover <[EMAIL PROTECTED]>
diff --git a/man/dpkg-shlibdeps.1 b/man/dpkg-shlibdeps.1
index a54b3cd..2190896 100644
--- a/man/dpkg-shlibdeps.1
+++ b/man/dpkg-shlibdeps.1
@@ -242,8 +242,9 @@ directories listed in the LD_LIBRARY_PATH environment
variable, and
standard public directories (/lib, /usr/lib, /lib32, /usr/lib32, /lib64,
/usr/lib64). Then it checks those directories in the package's build tree
of the binary being analyzed, in other packages's build tree that contains
-a DEBIAN/shlibs file and finally in the root directory. If the library is
-not found in any of those directories, then you get this error.
+a DEBIAN/shlibs or DEBIAN/symbols file and finally in the root directory.
+If the library is not found in any of those directories, then you get this
+error.
If the library not found is in a private directory of the same package,
then you want to add the directory to LD_LIBRARY_PATH. If it's in another
diff --git a/scripts/dpkg-shlibdeps.pl b/scripts/dpkg-shlibdeps.pl
index 8c7a606..4bf8948 100755
--- a/scripts/dpkg-shlibdeps.pl
+++ b/scripts/dpkg-shlibdeps.pl
@@ -40,10 +40,12 @@ my $debug = 0;
my @exclude = ();
my $host_arch = get_host_arch();
-my (@pkg_shlibs, @pkg_symbols);
+my (@pkg_shlibs, @pkg_symbols, @pkg_root_dirs);
if (-d "debian") {
push @pkg_symbols, <debian/*/DEBIAN/symbols>;
push @pkg_shlibs, <debian/*/DEBIAN/shlibs>;
+ my %uniq = map { guess_pkg_root_dir($_) => 1 } (@pkg_symbols, @pkg_shlibs);
+ push @pkg_root_dirs, keys %uniq;
}
my ($stdout, %exec);
@@ -115,7 +117,7 @@ foreach my $file (keys %exec) {
$soname_notfound{$soname} = 1;
my $msg = _g("couldn't find library %s needed by %s (its RPATH is
'%s').\n" .
"Note: libraries are not searched in other binary
packages " .
- "that do not have any shlibs file.\nTo help
dpkg-shlibdeps " .
+ "that do not have any shlibs or symbols file.\nTo help
dpkg-shlibdeps " .
"find private libraries, you might need to set
LD_LIBRARY_PATH.");
if (scalar(split_soname($soname))) {
failure($msg, $soname, $file, join(":", @{$obj->{RPATH}}));
@@ -590,14 +592,14 @@ sub my_find_library {
}
# Look into the packages we're currently building (but only those
- # that provides shlibs file and the one that contains the binary being
- # anlyzed...)
+ # that provides shlibs/symbols file and the one that contains the
+ # binary being analyzed...)
# TODO: we should probably replace that by a cleaner way to look into
# the various temporary build directories...
- my @copy = (@pkg_shlibs);
+ my @copy = (@pkg_root_dirs);
my $pkg_root = guess_pkg_root_dir($execfile);
unshift @copy, $pkg_root if defined $pkg_root;
- foreach my $builddir (map { s{/DEBIAN/shlibs$}{}; $_ } @copy) {
+ foreach my $builddir (@copy) {
$file = find_library($lib, [EMAIL PROTECTED], $format, $builddir);
return $file if defined($file);
}
commit d9c09384a348639c6ac0399e42e7a33cda8ee528
Author: Raphael Hertzog <[EMAIL PROTECTED]>
Date: Thu Jan 3 15:41:23 2008 +0100
dpkg-shlibdeps: fix find_symbols_file to choose the right symbols file
* scripts/dpkg-shlibdeps.pl (find_symbols_file): When libraries
are found in non-packaged files, first try to find the
corresponding symbols file in the build tree containing that
library. On the opposite, don't look up symbols files in debian/*
build directories for libraries found in installed packages (build
trees are scanned first and thus if they contain a needed library
dpkg-shlibdeps will find the library there and not in an installed
package).
diff --git a/ChangeLog b/ChangeLog
index 6981552..862cec2 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,14 @@
+2008-01-03 Raphael Hertzog <[EMAIL PROTECTED]>
+
+ * scripts/dpkg-shlibdeps.pl (find_symbols_file): When libraries
+ are found in non-packaged files, first try to find the
+ corresponding symbols file in the build tree containing that
+ library. On the opposite, don't look up symbols files in debian/*
+ build directories for libraries found in installed packages (build
+ trees are scanned first and thus if they contain a needed library
+ dpkg-shlibdeps will find the library there and not in an installed
+ package).
+
2008-01-03 Guillem Jover <[EMAIL PROTECTED]>
* scripts/dpkg-buildpackage.pl: Do not automatically enable '-j'
diff --git a/debian/changelog b/debian/changelog
index 7b8f024..38afc06 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -6,6 +6,8 @@ dpkg (1.14.15) UNRELEASED; urgency=low
* Blacklist armel-specific symbols in dpkg-gensymbols. Reported by Riku
Voipio. Closes: #457964
* Fix typos in various manpages. Patch from A. Costa. Closes: #458276
+ * Make dpkg-shlibdeps choose the right symbols files when we have several
+ debian/*/DEBIAN/symbols for a given soname. Closes: #458860
[ Guillem Jover ]
* Move compression related variables to a new Dpkg::Compression module.
diff --git a/scripts/dpkg-shlibdeps.pl b/scripts/dpkg-shlibdeps.pl
index 07d8458..8c7a606 100755
--- a/scripts/dpkg-shlibdeps.pl
+++ b/scripts/dpkg-shlibdeps.pl
@@ -160,7 +160,7 @@ foreach my $file (keys %exec) {
my $dpkg_symfile;
if ($packagetype eq "deb") {
# Use fine-grained dependencies only on real deb
- $dpkg_symfile = find_symbols_file($pkg, $soname);
+ $dpkg_symfile = find_symbols_file($pkg, $soname, $lib);
if (defined $dpkg_symfile) {
# Load symbol information
print "Using symbols file $dpkg_symfile for $soname\n" if
$debug;
@@ -520,12 +520,24 @@ sub extract_from_shlibs {
}
sub find_symbols_file {
- my ($pkg, $soname) = @_;
- foreach my $file (@pkg_symbols,
- "/etc/dpkg/symbols/$pkg.symbols.$host_arch",
- "/etc/dpkg/symbols/$pkg.symbols",
- "$admindir/info/$pkg.symbols")
- {
+ my ($pkg, $soname, $libfile) = @_;
+ my @files;
+ if ($pkg eq "") {
+ #Â If the file is not packaged, try to find out the symbols file in
+ # the package being built where the lib has been found
+ my $pkg_root = guess_pkg_root_dir($libfile);
+ if (defined $pkg_root) {
+ push @files, "$pkg_root/DEBIAN/symbols";
+ }
+ # Fallback to other symbols files but it shouldn't be necessary
+ push @files, @pkg_symbols;
+ } else {
+ push @files, "/etc/dpkg/symbols/$pkg.symbols.$host_arch",
+ "/etc/dpkg/symbols/$pkg.symbols",
+ "$admindir/info/$pkg.symbols";
+ }
+
+ foreach my $file (@files) {
if (-e $file and symfile_has_soname($file, $soname)) {
return $file;
}
--
dpkg's main repository
--
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]