If I try to use this, it always gives me this error message: $ go-licenses csv "github.com/google/trillian/server/trillian_log_server" Error: cannot register licenses from archive: open /tmp/portage/dev-go/go-licenses-0_pre20200227/homedir/go/pkg/mod/github.com/google/licenseclassifier@v0.0.0-20190926221455-842c0d70d702/licenses/licenses.db: no such file or directory and it doesn't do anything. This is straight from upstream example, https://github.com/google/go-licenses The file does seem to exist, $ equery f licenseclassifier | grep licenses.db /usr/share/licenseclassifier/forbidden_licenses.db /usr/share/licenseclassifier/licenses.db My question is: Is the program working as supposed? Can it be fixed within the ebuild somehow? Looks to me like no & yes.
Yes, the problem is that for some reason golang used unpatched file from `homedir/go/pkg/mod/` instead of patched version in vendor/.. I'll look into it
Ok, looks like `go-module` eclass redefined GOFLAGS again. The workaround is simple. As for how it works, I think, the most inconvenient part is that it looks like you need to do `go get` first if you want to call `csv` with external address. For local source clone with dependencies already vendored `go-licenses csv .` will do the job.
The bug has been closed via the following commit(s): https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=005e18046ae9298a816b88729875e862c5b8ed66 commit 005e18046ae9298a816b88729875e862c5b8ed66 Author: Konstantin Podshumok <kpp.live+signed@gmail.com> AuthorDate: 2020-05-15 11:22:30 +0000 Commit: Joonas Niilola <juippis@gentoo.org> CommitDate: 2020-05-17 11:28:41 +0000 dev-go/go-licenses: bump 0_pre20200511 Fixes build with new defaults from go-module eclass Closes: https://bugs.gentoo.org/722914 Signed-off-by: Konstantin Podshumok <kpp.live+signed@gmail.com> Signed-off-by: Joonas Niilola <juippis@gentoo.org> dev-go/go-licenses/Manifest | 7 + .../go-licenses/go-licenses-0_pre20200511.ebuild | 196 +++++++++++++++++++++ dev-go/go-licenses/go-licenses-9999.ebuild | 18 +- 3 files changed, 212 insertions(+), 9 deletions(-)