Просмотр исходного кода

Dpkg::Shlibs::find_library() now returns canonicalized paths

Raphael Hertzog лет назад: 18
Родитель
Сommit
11c7b74d8e
3 измененных файлов с 8 добавлено и 2 удалено
  1. 3 0
      ChangeLog
  2. 2 1
      debian/changelog
  3. 3 1
      scripts/Dpkg/Shlibs.pm

+ 3 - 0
ChangeLog

@@ -3,6 +3,9 @@
 	* scripts/dpkg-gensymbols.pl: Add a new -I<file> option to force
 	the usage of a specific file as basis for the generated symbols
 	file.
+	* scripts/Dpkg/Shlibs.pm (find_library): Canonicalize paths before
+	returning them as bad RPATH can lead to non-canonical paths
+	causing us troubles in dpkg-shlibdeps.
 
 2007-11-24  Guillem Jover  <guillem@debian.org>
 

+ 2 - 1
debian/changelog

@@ -1,6 +1,7 @@
 dpkg (1.14.12) UNRELEASED; urgency=low
 
-  *
+  [ Raphael Hertzog ]
+  * Dpkg::Shlibs::find_library() now returns canonicalized paths.
 
  -- Guillem Jover <guillem@debian.org>  Sat, 24 Nov 2007 07:38:13 +0200
 

+ 3 - 1
scripts/Dpkg/Shlibs.pm

@@ -22,6 +22,8 @@ use warnings;
 use base qw(Exporter);
 our @EXPORT_OK = qw(@librarypaths find_library);
 
+use File::Spec;
+
 use Dpkg::Gettext;
 use Dpkg::ErrorHandling qw(syserr);
 use Dpkg::Shlibs::Objdump;
@@ -78,7 +80,7 @@ sub find_library {
 	if (-e "$root$dir/$lib") {
 	    my $libformat = Dpkg::Shlibs::Objdump::get_format("$root$dir/$lib");
 	    if ($format eq $libformat) {
-		return "$root$dir/$lib";
+		return File::Spec->canonpath("$root$dir/$lib");
 	    }
 	}
     }