[Pkg-golang-commits] [golang] 04/07: drop alternatives stuff

Michael Hudson-Doyle mwhudson-guest at moszumanska.debian.org
Wed Apr 13 23:42:08 UTC 2016


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

mwhudson-guest pushed a commit to branch debian-sid-coinst
in repository golang.

commit 02a01eadb65fa19631ed5a8c491d70c212e0ec96
Author: Michael Hudson-Doyle <michael.hudson at canonical.com>
Date:   Mon Mar 7 15:37:45 2016 +1300

    drop alternatives stuff
---
 debian/golang-go.postinst | 14 --------------
 debian/golang-go.prerm    | 21 ---------------------
 2 files changed, 35 deletions(-)

diff --git a/debian/golang-go.postinst b/debian/golang-go.postinst
index 1c3d879..3094501 100644
--- a/debian/golang-go.postinst
+++ b/debian/golang-go.postinst
@@ -5,20 +5,6 @@ case "$1" in
     configure)
 	# Very ugly hack to set timestamps same as /usr/lib/go/bin/go
 	find /usr/lib/go/pkg -exec touch -r /usr/lib/go/bin/go {} \;
-	# Setup alternatives
-	# Priority: base of 100 + go version; 1.4.2 = 100 + 42; 1.5 = 100 + 50
-	go=$(/usr/lib/go/bin/go version | awk '{
-		gsub(/^go1|[.]/, "", $3);
-		gsub(/([^0-9.]+.*)$/, "", $3);
-		if ($3 ~ /^[0-9]$/) {
-			$3 = $3 "0";
-		};
-		print $3;
-	}')
-	priority=$(( 100 + $go ))
-	update-alternatives \
-		--install /usr/bin/go go /usr/lib/go/bin/go $priority \
-		--slave /usr/bin/gofmt gofmt /usr/lib/go/bin/gofmt
 	;;
     *)
 	;;
diff --git a/debian/golang-go.prerm b/debian/golang-go.prerm
deleted file mode 100644
index 71a0d1a..0000000
--- a/debian/golang-go.prerm
+++ /dev/null
@@ -1,21 +0,0 @@
-#!/bin/sh
-set -e
-
-case "$1" in
-	remove|deconfigure)
-		update-alternatives --remove go /usr/lib/go/bin/go
-		;;
-
-	upgrade|failed-upgrade)
-		;;
-
-	*)
-		echo >&2 "prerm called with unknown argument: $1"
-		exit 0
-		;;
-esac
-
-
-#DEBHELPER#
-
-exit 0

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



More information about the pkg-golang-commits mailing list