Source: golang-defaults Version: 2:1.6.1+1 Severity: normal Tags: patch -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA256
I was on my way out and wanted to access Go documentation off-line, so I tried running godoc, and got the following error messages: $ godoc -http=:6060 2016/07/22 14:36:32 updateMetadata: open /usr/lib/go/doc: no such file or directory 2016/07/22 14:36:32 updateMetadata: open /usr/lib/go/doc: no such file or directory I initially suspects a bug with the golang-golang-x-tools package to which /usr/bin/godoc belongs, but it turns out that /usr/lib/go on my computer is an empty directory, whereas golang-go (from the new golang-defaults source package) contains /usr/lib/go as a symlink to /usr/lib/go-1.6. This affects users like me who upgrade from pre-"golang-defaults" golang-go to the current golang-go. With the help of dpkg-maintscript-helper(1), this transition can be handled quite nicely. The attached patch adds debian/golang-go.maintscript and modifies debian/rules to do so, and has been tested to work locally. Note: debian/golang-go.maintscript runs "#!/usr/bin/dh-exec" and thus needs to have "chmod +x" set. Cheers, Anthony - -- System Information: Debian Release: stretch/sid APT prefers unstable APT policy: (500, 'unstable'), (500, 'stable'), (1, 'experimental') Architecture: amd64 (x86_64) Foreign Architectures: i386 Kernel: Linux 4.6.0-1-amd64 (SMP w/4 CPU cores) Locale: LANG=en_CA.UTF-8, LC_CTYPE=en_CA.UTF-8 (charmap=UTF-8) Shell: /bin/sh linked to /bin/dash Init: systemd (via /run/systemd/system) -----BEGIN PGP SIGNATURE----- Version: GnuPG v1 iQIcBAEBCAAGBQJXkrhJAAoJEOolALQSxZrPJdYQAJDaCeLpCKSbfaSKzOHQCKsb Z46QQXcN1PNvKOUJbzYPZZi7MglsPAZs+GsZ/nf92BpzV3ddFsCBc1WPT7B0T7eK 2zufp0Rv8hVM9ZtzBc1b2D5j+n7qlaxrdhVrx/rtNYQ4KyMB4DIs/ZtiJKPl/17A N/iGwL6YOvpvBHt6g/RwQLm1gwx1lfAw74owhlzpxkOQXByOxEeVb/Dc4Z2vvmfN rBPpFhaGMYDr0rUkTNjqEchMQ/w2cAsMERGeYC9uRg/WhxLDt+HCuC6verLJuIIz EDux6duMHqoMFIpBQk6yhnExxScT6q1ls4XaKIgs7PWQMBQSq8J4McrNnZEf84yb lNzHBE2aDxJe3dedSAW7MLDjZwfOErP8DjW0p5v56daUgYbACJHOtyWReXd4aY4J 2TChgtDqJFYwAfxI5SE+9CTnQO3dFgIKVFsGvmH8EDlVdm5K9rt0nneKXT7Vt+xj CwCmW7sJ5o29K7aqx2fd6dD56rNM9t+PBLbjKa7cFhPJd3Yxp4K/lFkS1ViuR683 W+SXNPRAiCtcm30pfH66XZAvFqL35lUbfP9NxyeaGU7R3qB0UA9vOm21hENR+y1B dtARYI4+wm83zvyInXn1IqoAHHXJTUQ02rsAKkm6FeYyaevBQvaJwDz7ZxEUPMv+ DVxmHlyBJ4IvKDMrdkxV =NyON -----END PGP SIGNATURE-----
diff --git a/b/debian/golang-go.maintscript b/b/debian/golang-go.maintscript new file mode 100755 index 0000000..2d126db --- /dev/null +++ b/b/debian/golang-go.maintscript @@ -0,0 +1,2 @@ +#!/usr/bin/dh-exec +dir_to_symlink /usr/lib/go go-${GOVER} 2:1.6.1+2~ diff --git a/a/debian/rules b/b/debian/rules index f534ecc..822367f 100755 --- a/a/debian/rules +++ b/b/debian/rules @@ -18,5 +18,8 @@ ifeq (false, $(IS_GOLANG_ARCH)) cp debian/golang-any.links.gccgo debian/golang-any.links endif +override_dh_installdeb: + dh_installdeb -- -Vgolang:GOVER=$(GOVER) + override_dh_gencontrol: dh_gencontrol -- -Vgolang:GOVER=$(GOVER)