[dpkg] 113/192: Dpkg::Vendor: Disable decompression support for origin files

Ximin Luo infinity0 at debian.org
Tue Oct 17 11:04:06 UTC 2017


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

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

commit 6f059fcf7b0d26ec6e4d6d3ea9a1ec342bd37f18
Author: Guillem Jover <guillem at debian.org>
Date:   Fri Jul 14 02:58:02 2017 +0200

    Dpkg::Vendor: Disable decompression support for origin files
    
    These files are not supposed to be compressed, disabling decompression
    support gives a significant performance improvement for anything that is
    making use of vendor hooks, even if indirectly.
---
 debian/changelog       | 1 +
 scripts/Dpkg/Vendor.pm | 2 +-
 2 files changed, 2 insertions(+), 1 deletion(-)

diff --git a/debian/changelog b/debian/changelog
index fa11c0b..b70b645 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -38,6 +38,7 @@ dpkg (1.19.0) UNRELEASED; urgency=medium
     - Avoid many function arguments in Dselect::Ftp do_connect().
     - Add new Dpkg::Interface::Storable option to disable compression support,
       so that we can load Dpkg::Compression::FileHandle only when enabled.
+    - Disable decompression support for Dpkg::Vendor origin files.
   * Documentation:
     - Document currently accepted syntax for changelogs in deb-changelog(5).
       Closes: #858579
diff --git a/scripts/Dpkg/Vendor.pm b/scripts/Dpkg/Vendor.pm
index 96f81cf..99b56b5 100644
--- a/scripts/Dpkg/Vendor.pm
+++ b/scripts/Dpkg/Vendor.pm
@@ -99,7 +99,7 @@ sub get_vendor_info(;$) {
     my $file = get_vendor_file($vendor);
     return unless $file;
     my $fields = Dpkg::Control::HashCore->new();
-    $fields->load($file) or error(g_('%s is empty'), $file);
+    $fields->load($file, compression => 0) or error(g_('%s is empty'), $file);
     $VENDOR_CACHE{$vendor} = $fields;
     return $fields;
 }

-- 
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