[Pkg-golang-commits] [golang-defaults] 23/27: simplify getgoarches.pl a lot.

Michael Hudson-Doyle mwhudson-guest at moszumanska.debian.org
Wed Jul 19 21:48:39 UTC 2017


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

mwhudson-guest pushed a commit to tag debian/2%1.6-1ubuntu3
in repository golang-defaults.

commit 54ed5434ef0e44cc219774d165f183b3ba89f816
Author: Michael Hudson-Doyle <michael.hudson at canonical.com>
Date:   Tue Mar 22 15:18:05 2016 +1300

    simplify getgoarches.pl a lot.
---
 debian/helpers/getgoarches.pl | 24 +++---------------------
 1 file changed, 3 insertions(+), 21 deletions(-)

diff --git a/debian/helpers/getgoarches.pl b/debian/helpers/getgoarches.pl
index 9ba62e6..bef1877 100755
--- a/debian/helpers/getgoarches.pl
+++ b/debian/helpers/getgoarches.pl
@@ -1,7 +1,6 @@
 #!/usr/bin/perl
 
-# Extract list of golang architectures by looking at dependencies in control
-# This is completely ridiculous, yes.
+# Extract list of golang architectures by looking at control file.
 
 package main;
 
@@ -9,24 +8,7 @@ use warnings;
 use strict;
 
 use Dpkg::Control::Info;
-use Dpkg::Deps;
-use Dpkg::Substvars;
 
 my $control = Dpkg::Control::Info->new();
-my $p = $control->get_pkg_by_name("golang-go");
-
-my $s = Dpkg::Substvars->new();
-$s->set("golang:GOVER", "GOVER");
-$s->set("source:Version", "1.0");
-$s->set("misc:Depends", "");
-$p->apply_substvars($s);
-my $d = deps_parse($p->{depends});
-
-deps_iterate($d, sub {
-    my $x = shift;
-    if (defined($x->{package}) && $x->{package} eq "golang-GOVER-go") {
-        printf("%s\n", join(" ", @{$x->{arches}}));
-        return 0;
-    }
-    return 1;
-});
+my $p = $control->get_pkg_by_name("golang-src");
+printf("%s\n", $p->{Architecture});

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-golang/golang-defaults.git



More information about the pkg-golang-commits mailing list