[pkg-go] Bug#827226: incorrect preparation of build directory when pre-installed package is re-built

Dmitry Smirnov onlyjob at debian.org
Mon Jun 13 22:11:59 UTC 2016


Package: dh-golang
Version: 1.17
Severity: normal

--buildsystem=golang does a nice job preparing build directory in 
`dh_auto_configure` by symlinking source packages from under
"/usr/share/gocode/src" to directory specified with "--builddirectory" 
argument.

However it works incorrectly when $(DH_GOPKG) package (i.e. current package 
to build) is pre-installed because in such case installed and new version of 
the package are merged in build directory.

Suppose you are building a "golang-github-foo-bar" package which no longer 
provides "github.com/foo/bar/obsolete-feature". If previous version of the 
package is installed then dh_golang incorrectly symlink
"/usr/share/gocode/src/github.com/foo/bar/obsolete-feature" into build 
directory.

This problem should be easy to detect and avoid as dh_golang already knows 
which package not to link from $(DH_GOPKG) or XS-Go-Import-Path header.
I suppose we just need to ignore/skip pre-installed package which is build.

Also it would be nice to produce a warning to notify maintainer about 
potential problem.

Arguably circular dependencies are not in scope of what dh_golang should be 
doing but there are cases when package can be re-built (staged) on 
maintainer's machine in presence of previous version of the same package. 
Correct handling of such situations would be useful.

Thanks.

-- 
Regards,
 Dmitry Smirnov
 GPG key : 4096R/53968D1B

---

Truth — Something somehow discreditable to someone.
        -- H. L. Mencken, 1949
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: This is a digitally signed message part.
URL: <http://lists.alioth.debian.org/pipermail/pkg-go-maintainers/attachments/20160614/f774bbfc/attachment.sig>


More information about the Pkg-go-maintainers mailing list