[dpkg] 145/187: Dpkg::Arch: Support debarch_to_debtuple returning a hash references

Reiner Herrmann reiner at reiner-h.de
Sun Nov 6 12:46:38 UTC 2016


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

deki-guest pushed a commit to branch master
in repository dpkg.

commit 15f36bee2a34ec03c77ac38dc156eea0005e6737
Author: Guillem Jover <guillem at debian.org>
Date:   Sun Jun 14 16:42:02 2015 +0200

    Dpkg::Arch: Support debarch_to_debtuple returning a hash references
---
 scripts/Dpkg/Arch.pm | 9 ++++++++-
 1 file changed, 8 insertions(+), 1 deletion(-)

diff --git a/scripts/Dpkg/Arch.pm b/scripts/Dpkg/Arch.pm
index 12c01ab..1b39bf5 100644
--- a/scripts/Dpkg/Arch.pm
+++ b/scripts/Dpkg/Arch.pm
@@ -405,7 +405,14 @@ sub debarch_to_debtuple($)
     my $tuple = $debarch_to_debtuple{$arch};
 
     if (defined($tuple)) {
-	return split(/-/, $tuple, 4);
+        my @tuple = split /-/, $tuple, 4;
+        return @tuple if wantarray;
+        return {
+            abi => $tuple[0],
+            libc => $tuple[1],
+            os => $tuple[2],
+            cpu => $tuple[3],
+        };
     } else {
 	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