[Reproducible-commits] [dpkg] 28/40: Revert "dpkg-gensymbols: Use the original template symbols file when diffing"

Jérémy Bobbio lunar at moszumanska.debian.org
Sat May 30 09:52:50 UTC 2015


This is an automated email from the git hooks/post-receive script.

lunar pushed a commit to branch pu/reproducible_builds
in repository dpkg.

commit 0ced7a67b687fd2a3f906c24739ae7d82d594cc5
Author: Guillem Jover <guillem at debian.org>
Date:   Thu May 28 00:22:31 2015 +0200

    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
---
 debian/changelog           | 4 ++++
 scripts/dpkg-gensymbols.pl | 7 +------
 2 files changed, 5 insertions(+), 6 deletions(-)

diff --git a/debian/changelog b/debian/changelog
index 2ef15d0..49757af 100644
--- a/debian/changelog
+++ b/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.
diff --git a/scripts/dpkg-gensymbols.pl b/scripts/dpkg-gensymbols.pl
index b5591dd..036f288 100755
--- a/scripts/dpkg-gensymbols.pl
+++ b/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;

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/reproducible/dpkg.git



More information about the Reproducible-commits mailing list