[pkg-golang-devel] Bug#842254: Bug#842254: please allow to use gccgo on architectures providing golang

Michael Hudson-Doyle michael.hudson at canonical.com
Mon Oct 31 02:35:45 UTC 2016


I'm attaching a debdiff that implements my idea for this, but it has a
downside: lots of golang-.*-dev packages depend on golang-go (323 in
current sid according to my grep-dctrl). They really shouldn't, but this
hampers swapping out golang-go for gccgo-go in Build-Depends for a test
sbuild. A workaround would be to have gccgo-go Provides: golang-go, which
is awful but does seem to work in my testing and seems nicer than 300-odd
uploads...

Cheers,
mwh

On 28 October 2016 at 01:38, Matthias Klose <doko at debian.org> wrote:

> Package: src:golang-defaults
>
> With the golang-any package it should be possible to use go architectures
> providing only gccgo.  As seen in #840190, and I assume in one of the
> golang-defaults bugs, there was the proposal to handle the go and gofmt
> links by
> alternatives.  Apparently now silently removed from the golang-defaults
> package.
>  With the alternatives approach it was easy to test build a package on
> amd64
> using gccgo, this is not possible anymore.  Please provide an easy way to
> build
> a package using gccgo on architectures which default to golang by default.
>
> _______________________________________________
> pkg-golang-devel mailing list
> pkg-golang-devel at lists.alioth.debian.org
> http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/pkg-golang-devel
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.alioth.debian.org/pipermail/pkg-golang-devel/attachments/20161031/b56a1178/attachment.html>
-------------- next part --------------
diff -Nru golang-defaults-1.7~1/debian/changelog golang-defaults-1.7~2/debian/changelog
--- golang-defaults-1.7~1/debian/changelog	2016-08-24 09:15:24.000000000 +1200
+++ golang-defaults-1.7~2/debian/changelog	2016-10-31 14:53:25.000000000 +1300
@@ -1,3 +1,10 @@
+golang-defaults (2:1.7~2) UNRELEASED; urgency=medium
+
+  * Define a gccgo-go package that can be used to test building with gccgo on
+    any architecture. (Closes: 842254)
+
+ -- Michael Hudson-Doyle <michael.hudson at ubuntu.com>  Mon, 31 Oct 2016 14:52:30 +1300
+
 golang-defaults (2:1.7~1) unstable; urgency=medium
 
   [ Tianon Gravi ]
diff -Nru golang-defaults-1.7~1/debian/control golang-defaults-1.7~2/debian/control
--- golang-defaults-1.7~1/debian/control	2016-08-24 06:28:56.000000000 +1200
+++ golang-defaults-1.7~2/debian/control	2016-10-31 14:11:17.000000000 +1300
@@ -14,6 +14,7 @@
 
 Package: golang-go
 Architecture: amd64 arm64 armel armhf i386 ppc64 ppc64el s390x
+Conflicts: gccgo-go
 Depends: golang-${golang:GOVER}-go,
          golang-src (>= ${source:Version}),
          ${misc:Depends}
@@ -64,7 +65,7 @@
 
 Package: golang-any
 Architecture: any
-Depends: golang-go (>= ${source:Version}) | gccgo-6, ${misc:Depends}
+Depends: golang-go (>= ${source:Version}) | gccgo-go, ${misc:Depends}
 Description: Go programming language -- gccgo on "non-Go" platforms
  The Go programming language is an open source project to make programmers more
  productive. Go is expressive, concise, clean, and efficient. Its concurrency
@@ -82,6 +83,23 @@
  provided by the version of gccgo that this package depends upon will match the
  version of this package.
 
+Package: gccgo-go
+Architecture: any
+Depends: gccgo-6
+Conflicts: golang-go
+Description: Go programming language -- gccgo
+ The Go programming language is an open source project to make programmers more
+ productive. Go is expressive, concise, clean, and efficient. Its concurrency
+ mechanisms make it easy to write programs that get the most out of multicore
+ and networked machines, while its novel type system enables flexible and
+ modular program construction. Go compiles quickly to machine code yet has the
+ convenience of garbage collection and the power of run-time reflection. It's a
+ fast, statically typed, compiled language that feels like a dynamically typed,
+ interpreted language.
+ .
+ Installing this package will install the gccgo implementation as /usr/bin/go.
+ It conflicts with golang-go.
+
 Package: golang-src
 Architecture: amd64 arm64 armel armhf i386 ppc64 ppc64el s390x
 Depends: golang-${golang:GOVER}-src, ${misc:Depends}
diff -Nru golang-defaults-1.7~1/debian/gccgo-go.links golang-defaults-1.7~2/debian/gccgo-go.links
--- golang-defaults-1.7~1/debian/gccgo-go.links	1970-01-01 12:00:00.000000000 +1200
+++ golang-defaults-1.7~2/debian/gccgo-go.links	2016-10-31 14:09:30.000000000 +1300
@@ -0,0 +1,2 @@
+usr/bin/go-6 usr/bin/go
+usr/bin/gofmt-6 usr/bin/gofmt
diff -Nru golang-defaults-1.7~1/debian/golang-any.links.gccgo golang-defaults-1.7~2/debian/golang-any.links.gccgo
--- golang-defaults-1.7~1/debian/golang-any.links.gccgo	2016-06-02 02:07:40.000000000 +1200
+++ golang-defaults-1.7~2/debian/golang-any.links.gccgo	1970-01-01 12:00:00.000000000 +1200
@@ -1,2 +0,0 @@
-usr/bin/go-6 usr/bin/go
-usr/bin/gofmt-6 usr/bin/gofmt


More information about the pkg-golang-devel mailing list