Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 722914 - dev-go/go-licenses-0_pre20200227: "cannot register licenses from archive"
Summary: dev-go/go-licenses-0_pre20200227: "cannot register licenses from archive"
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal
Assignee: Konstantin (Qrator Labs)
URL:
Whiteboard:
Keywords: PullRequest
Depends on:
Blocks:
 
Reported: 2020-05-14 07:27 UTC by Joonas Niilola
Modified: 2020-05-17 11:28 UTC (History)
1 user (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Joonas Niilola gentoo-dev 2020-05-14 07:27:23 UTC
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.
Comment 1 Konstantin (Qrator Labs) 2020-05-14 08:09:34 UTC
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
Comment 2 Konstantin (Qrator Labs) 2020-05-14 08:25:22 UTC
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.
Comment 3 Larry the Git Cow gentoo-dev 2020-05-17 11:28:52 UTC
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(-)