Переглянути джерело

Revert "dpkg-gensymbols: Use the original template symbols file when diffing"

This reverts commit 9251cc40db1793d01ad0c27408fb0f170c067772.

There's too much information not being preserved in the symbols files to
be able to regenerate templates for them. Although the #PACKAGE# pattern
has been fixed, there is still comments, #include directives and symbols
order. Let's revert it and consider the request that prompted the change
requires too much work for too little gain.

Closes: #785937, #786840
Guillem Jover 11 роки тому
батько
коміт
0ced7a67b6
2 змінених файлів з 5 додано та 6 видалено
  1. 4 0
      debian/changelog
  2. 1 6
      scripts/dpkg-gensymbols.pl

+ 4 - 0
debian/changelog

@@ -21,6 +21,10 @@ dpkg (1.18.1) UNRELEASED; urgency=low
     member. This meant using compression level 1 when using the zlib shared
     library to compress the control.tar member, and always failing when using
     the gzip command. Regression introduced in dpkg 1.17.6. Closes: #786654
+  * Use the generated template file instead of the original one when looking
+    for changes in dpkg-gensymbols. There's too much information not being
+    preserved in the symbols files to be able to regenerate templates for
+    them. Closes: #785937, #786840
   * Perl modules:
     - Add missing strict and warnings pragmas for submodules.
     - Use non-destructive substitutions inside map.

+ 1 - 6
scripts/dpkg-gensymbols.pl

@@ -21,8 +21,6 @@
 use strict;
 use warnings;
 
-use File::Copy;
-
 use Dpkg ();
 use Dpkg::Arch qw(get_host_arch);
 use Dpkg::Package;
@@ -287,14 +285,11 @@ unless ($quiet) {
     my $before = File::Temp->new(TEMPLATE=>'dpkg-gensymbolsXXXXXX');
     my $after = File::Temp->new(TEMPLATE=>'dpkg-gensymbolsXXXXXX');
     if ($ref_symfile->{file}) {
-        # If the original template symbols file exists, use it instead of
-        # trying to regenerate it, as the output might differ in sort order
-        # or similar.
-        copy($ref_symfile->{file}, $before);
         $file_label = $ref_symfile->{file};
     } else {
         $file_label = 'new_symbol_file';
     }
+    $ref_symfile->output($before, package => $oppackage, template_mode => 1);
     $symfile->output($after, package => $oppackage, template_mode => 1);
 
     seek $before, 0, 0;