[pkg-golang-devel] Bug#832160: golang-defaults: Upgrading golang-go did not change /usr/lib/go dir to symlink (hence godoc fails)

Anthony Fok foka at debian.org
Sat Jul 23 00:21:08 UTC 2016


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-----
-------------- next part --------------
A non-text attachment was scrubbed...
Name: handle-dir-to-symlink-transition-with-maintscript.patch
Type: text/x-diff
Size: 632 bytes
Desc: not available
URL: <http://lists.alioth.debian.org/pipermail/pkg-golang-devel/attachments/20160722/9901d58e/attachment.patch>


More information about the pkg-golang-devel mailing list