Parcourir la source

Dpkg::Shlibs::SymbolFile::merge_symbols() bugfix with deprecated symbols

Do not update the deprecated version of a symbol if it is already marked
deprecated.
Raphael Hertzog il y a 18 ans
Parent
commit
261d067696
2 fichiers modifiés avec 9 ajouts et 0 suppressions
  1. 6 0
      ChangeLog
  2. 3 0
      scripts/Dpkg/Shlibs/SymbolFile.pm

+ 6 - 0
ChangeLog

@@ -1,3 +1,9 @@
+2007-12-10  Raphael Hertzog  <hertzog@debian.org>
+
+	* scripts/Dpkg/Shlibs/SymbolFile.pm (merge_symbols): Do not update
+	the deprecated version of a a symbol if it is already marked
+	deprecated.
+
 2007-12-09  Raphael Hertzog  <hertzog@debian.org>
 
 	* scripts/Dpkg/Shlibs/SymbolFile.pm (load): Pass the current

+ 3 - 0
scripts/Dpkg/Shlibs/SymbolFile.pm

@@ -232,6 +232,9 @@ sub merge_symbols {
     # the symbol was introduced)
     foreach my $sym (keys %{$self->{objects}{$soname}{syms}}) {
 	if (! exists $dynsyms{$sym}) {
+	    # Do nothing if already deprecated
+	    next if $self->{objects}{$soname}{syms}{$sym}{deprecated};
+
 	    my $info = $self->{objects}{$soname}{syms}{$sym};
 	    if (vercmp($minver, $info->{minver}) > 0) {
 		$self->{objects}{$soname}{syms}{$sym}{deprecated} = $minver;