[Reproducible-commits] [dpkg] 17/30: Dpkg::Deps: Refactor options for Dpkg::Deps::Simple->new into a new hash

Mattia Rizzolo mattia at debian.org
Mon May 9 09:02:51 UTC 2016


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

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

commit 9233e3897e388d5b907d92a4d67a6b5c16f9bb0f
Author: Guillem Jover <guillem at debian.org>
Date:   Sat May 7 17:47:15 2016 +0200

    Dpkg::Deps: Refactor options for Dpkg::Deps::Simple->new into a new hash
---
 scripts/Dpkg/Deps.pm | 14 ++++++++------
 1 file changed, 8 insertions(+), 6 deletions(-)

diff --git a/scripts/Dpkg/Deps.pm b/scripts/Dpkg/Deps.pm
index d29ba6c..5ee6b9d 100644
--- a/scripts/Dpkg/Deps.pm
+++ b/scripts/Dpkg/Deps.pm
@@ -260,6 +260,13 @@ sub deps_parse {
         $options{reduce_profiles} = 1;
     }
 
+    # Options for Dpkg::Deps::Simple.
+    my %deps_options = (
+        host_arch => $options{host_arch},
+        build_arch => $options{build_arch},
+        build_dep => $options{build_dep},
+    );
+
     # Strip trailing/leading spaces
     $dep_line =~ s/^\s+//;
     $dep_line =~ s/\s+$//;
@@ -268,12 +275,7 @@ sub deps_parse {
     foreach my $dep_and (split(/\s*,\s*/m, $dep_line)) {
         my @or_list = ();
         foreach my $dep_or (split(/\s*\|\s*/m, $dep_and)) {
-	    my $dep_simple = Dpkg::Deps::Simple->new($dep_or, host_arch =>
-	                                             $options{host_arch},
-	                                             build_arch =>
-	                                             $options{build_arch},
-	                                             build_dep =>
-	                                             $options{build_dep});
+	    my $dep_simple = Dpkg::Deps::Simple->new($dep_or, %deps_options);
 	    if (not defined $dep_simple->{package}) {
 		warning(g_("can't parse dependency %s"), $dep_or);
 		return;

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