Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 710638 - go-module.eclass: go-module_live_vendor() in live ebuild dies if repo doesn't contain a vendor/ directory
Summary: go-module.eclass: go-module_live_vendor() in live ebuild dies if repo doesn't...
Status: UNCONFIRMED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Eclasses (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: William Hubbs
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2020-02-24 09:05 UTC by Quentin Minster
Modified: 2020-02-24 09:08 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 Quentin Minster 2020-02-24 09:05:55 UTC
In the go-module eclass, the go-module_live_vendor() function is described like this:

    # This function is used in live ebuilds to vendor the dependencies when
    # upstream doesn't vendor them.

However, in the body of the function, there's this check:

    [[ -d "${S}"/vendor ]] || die "${FUNCNAME} only allowed when upstream isn't vendoring"

It makes the ebuild die when a vendor/ directory *doesn't exist*, which seems to contradict the "when upstream doesn't vendor them" statement from the description and the error message.

Shouldn't the check be the other way around? As in:

    [[ ! -d "${S}"/vendor ]] || die "${FUNCNAME} only allowed when upstream isn't vendoring"

For a Go tool I'm currently packaging, modifying the check as above results in the live ebuild successfully vendoring the dependencies and building the tool. With the original check, the ebuild chokes when calling go-module_live_vendor() because there *isn't* a vendor/ directory in the cloned repo.

Example ebuild: https://github.com/laomaiweng/laomaiweng-overlay/blob/master/app-crypt/age/age-9999.ebuild
Comment out line 41 that works around the seemingly backwards check.

Reproducible: Always