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

dpkg-shlibdeps: don't merge all dependency templates when Build-Depends-Package is set.

* scripts/dpkg-shlibdeps.pl: Don't merge all dependency templates
into the generated dependency when Build-Depends-Package is
used in the symbols file. Instead simply modify the minimal
version on any pre-existing dependency.
Modestas Vainius лет назад: 17
Родитель
Сommit
c638e6de5f
3 измененных файлов с 14 добавлено и 3 удалено
  1. 7 0
      ChangeLog
  2. 4 0
      debian/changelog
  3. 3 3
      scripts/dpkg-shlibdeps.pl

+ 7 - 0
ChangeLog

@@ -1,3 +1,10 @@
+2008-12-01  Modestas Vainius  <modestas@vainius.eu>
+
+	* scripts/dpkg-shlibdeps.pl: Don't merge all dependency templates
+	into the generated dependency when Build-Depends-Package is
+	used in the symbols file. Instead simply modify the minimal
+	version on any pre-existing dependency.
+
 2008-11-19  Raphael Hertzog  <hertzog@debian.org>
 
 	* scripts/Dpkg/Shlibs/Objdump.pm (parse_dynamic_symbol): Fix the

+ 4 - 0
debian/changelog

@@ -3,6 +3,10 @@ dpkg (1.14.24) UNRELEASED; urgency=low
   [ Raphael Hertzog ]
   * Fix parsing of objdump output (by dpkg-shlibdeps) in a special case where
     the symbol name is separated only with a single space. Closes: #506139
+  * Fix dpkg-shlibdeps behaviour when Build-Depends-Package is used in the
+    symbols file. It was merging all dependency templates into the generated
+    dependency instead of simply modifying the minimal version. Thanks to
+    Modestas Vainius <modestas@vainius.eu>. Closes: #507346
 
  -- Guillem Jover <guillem@debian.org>  Tue, 18 Nov 2008 12:40:33 +0200
 

+ 3 - 3
scripts/dpkg-shlibdeps.pl

@@ -328,7 +328,7 @@ foreach my $file (keys %exec) {
 	    my $minver = get_min_version_from_deps($build_deps, $dev_pkg);
 	    if (defined $minver) {
 		foreach my $dep ($symfile->get_dependencies($soname)) {
-		    update_dependency_version($dep, $minver);
+		    update_dependency_version($dep, $minver, 1);
 		}
 	    }
 	}
@@ -526,7 +526,7 @@ sub get_min_version_from_deps {
 }
 
 sub update_dependency_version {
-    my ($dep, $minver) = @_;
+    my ($dep, $minver, $existing_only) = @_;
     return if not defined($minver);
     foreach my $subdep (split /\s*,\s*/, $dep) {
 	if (exists $dependencies{$cur_field}{$subdep} and
@@ -538,7 +538,7 @@ sub update_dependency_version {
 	    {
 		$dependencies{$cur_field}{$subdep} = $minver;
 	    }
-	} else {
+	} elsif (!$existing_only) {
 	    $dependencies{$cur_field}{$subdep} = $minver;
 	}
     }