[Pkg-golang-commits] [golang-defaults] 01/01: Add a few really minor tweaks for consistency

Tianon Gravi tianon at debian.org
Wed Jun 1 14:03:37 UTC 2016


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

tianon pushed a commit to branch master
in repository golang-defaults.

commit 83506b01d97d562e1724b37a23513f264056fcf6
Author: Tianon Gravi <admwiggin at gmail.com>
Date:   Wed Jun 1 07:03:27 2016 -0700

    Add a few really minor tweaks for consistency
---
 debian/control                |  6 +++---
 debian/golang-go.preinst      | 24 ++++++++++++------------
 debian/helpers/getgoarches.pl |  2 +-
 debian/helpers/getver.pl      |  3 +--
 debian/rules                  |  2 +-
 5 files changed, 18 insertions(+), 19 deletions(-)

diff --git a/debian/control b/debian/control
index 2774195..90c0069 100644
--- a/debian/control
+++ b/debian/control
@@ -2,10 +2,10 @@ Source: golang-defaults
 Section: devel
 Priority: optional
 Maintainer: Go Compiler Team <pkg-golang-devel at lists.alioth.debian.org>
-Uploaders: Michael Hudson-Doyle <michael.hudson at ubuntu.com>,
-           Michael Stapelberg <stapelberg at debian.org>,
+Uploaders: Michael Stapelberg <stapelberg at debian.org>,
            Paul Tagliamonte <paultag at debian.org>,
-           Tianon Gravi <tianon at debian.org>
+           Tianon Gravi <tianon at debian.org>,
+           Michael Hudson-Doyle <michael.hudson at ubuntu.com>
 Build-Depends: debhelper (>= 9), dh-exec
 Standards-Version: 3.9.8
 Homepage: https://golang.org
diff --git a/debian/golang-go.preinst b/debian/golang-go.preinst
index a804121..b089334 100755
--- a/debian/golang-go.preinst
+++ b/debian/golang-go.preinst
@@ -3,18 +3,18 @@
 set -e
 
 case "$1" in
-  upgrade)
-    # When golang-go was not a dependency package, it used alternatives to
-    # manage /usr/bin/go, and unfortunately did not remove the alternative on
-    # prerm upgrade (just uninstall|deconfigure). So remove it here.
-    update-alternatives --remove go /usr/lib/go/bin/go
-    ;;
-  install)
-    ;;
-  *)
-    echo "preinst called with unknown argument \`$1'" >&2
-    exit 0
-    ;;
+	upgrade)
+		# When golang-go was not a dependency package, it used alternatives to
+		# manage /usr/bin/go, and unfortunately did not remove the alternative on
+		# prerm upgrade (just uninstall|deconfigure). So remove it here.
+		update-alternatives --remove go /usr/lib/go/bin/go
+		;;
+	install)
+		;;
+	*)
+		echo "preinst called with unknown argument \`$1'" >&2
+		exit 0
+		;;
 esac
 
 #DEBHELPER#
diff --git a/debian/helpers/getgoarches.pl b/debian/helpers/getgoarches.pl
index 6c7ad5d..4718a0f 100755
--- a/debian/helpers/getgoarches.pl
+++ b/debian/helpers/getgoarches.pl
@@ -10,5 +10,5 @@ use strict;
 use Dpkg::Control::Info;
 
 my $control = Dpkg::Control::Info->new();
-my $p = $control->get_pkg_by_name("golang-go");
+my $p = $control->get_pkg_by_name('golang-go');
 printf("%s\n", $p->{Architecture});
diff --git a/debian/helpers/getver.pl b/debian/helpers/getver.pl
index ee45ed8..d54506a 100755
--- a/debian/helpers/getver.pl
+++ b/debian/helpers/getver.pl
@@ -10,6 +10,5 @@ use strict;
 use Dpkg::Version;
 
 my $v = Dpkg::Version->new(`dpkg-parsechangelog -SVersion`)->version();
-$v =~ /^([0-9]+\.[0-9]+).*/;
+$v =~ /^([0-9]+\.[0-9]+).*/ or die 'INVALID VERSION! (needs X.Y)';
 printf("%s\n", $1);
-
diff --git a/debian/rules b/debian/rules
index cf5466d..f534ecc 100755
--- a/debian/rules
+++ b/debian/rules
@@ -6,7 +6,7 @@ golang_arches := $(shell debian/helpers/getgoarches.pl)
 
 IS_GOLANG_ARCH := true
 ifeq (,$(filter $(DEB_HOST_ARCH),$(golang_arches)))
-        IS_GOLANG_ARCH := false
+	IS_GOLANG_ARCH := false
 endif
 
 %:

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