Przeglądaj źródła

dpkg-shlibdeps: accepts empty dependencies in shlibs files

Raphael Hertzog 18 lat temu
rodzic
commit
0639bc0601
3 zmienionych plików z 7 dodań i 4 usunięć
  1. 2 1
      ChangeLog
  2. 1 0
      debian/changelog
  3. 4 3
      scripts/dpkg-shlibdeps.pl

+ 2 - 1
ChangeLog

@@ -1,6 +1,7 @@
 2007-11-22  Raphael Hertzog  <hertzog@debian.org>
 
-	* 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  <hertzog@debian.org>
 

+ 1 - 0
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)

+ 4 - 3
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;
 	    }
 	}
     }