Weird issue with a ebuild for a go project, the relevant error: mkdir -p /var/tmp/portage/dev-db/influxdb-1.8.0/work/influxdb-1.8.0/src/github.com/influxdata/influxdb cp -r /distfiles/go-src/src/github.com/influxdata/influxdb /var/tmp/portage/dev-db/influxdb-1.8.0/work/influxdb-1.8.0/src/github.com/influxdata/influxdb/.. cp: target 'Unable to copy sources to /var/tmp/portage/dev-db/influxdb-1.8.0/work/influxdb-1.8.0/src/github.com/influxdata/influxdb' is not a directory The target directory does exist with proper permissions: ls -lah /var/tmp/portage/dev-db/influxdb-1.8.0/work/influxdb-1.8.0/src/github.com/influxdata/influxdb/ total 0 drwxr-xr-x 1 portage portage 0 May 5 10:28 . drwxr-xr-x 1 portage portage 16 May 5 10:28 .. Running the exact cp command manually also works: cp -r /distfiles/go-src/src/github.com/influxdata/influxdb /var/tmp/portage/dev-db/influxdb-1.8.0/work/influxdb-1.8.0/src/github.com/influxdata/influxdb/.. ls -lah /var/tmp/portage/dev-db/influxdb-1.8.0/work/influxdb-1.8.0/src/github.com/influxdata/influxdb/ total 608K drwxr-xr-x 1 portage portage 2.4K May 5 10:35 . drwxr-xr-x 1 portage portage 16 May 5 10:28 .. -rw-r--r-- 1 root root 198 May 5 10:35 api-compat.Jenkinsfile . . . After fixing the owner i can continue the build via ebuild without error: chown -R portage:portage /var/tmp/portage/dev-db/influxdb-1.8.0/work/influxdb-1.8.0/src/github.com/influxdata/influxdb/.. ebuild dev-db/influxdb/influxdb-1.8.0.ebuild merge >>> dev-db/influxdb-1.8.0 merged. I'm a bit at a loss what the problem is, the build is executed in a docker container if that makes any difference. The ebuild in question, though I'm sure the error is not in the ebuild as it worked before and had no changes with the latest bump: https://github.com/edannenberg/kubler-overlay/blob/e39c890d7a9a0ad483389829ab493cf0fd097f76/dev-db/influxdb/influxdb-1.8.0.ebuild
Tracked down the problem to golang-vcs.eclass, changing _golang-vcs_fetch() from: set -- cp -r "${EGO_STORE_DIR}/src/${EGO_PN%/...}" \ "${go_srcpath}/.." to: cp -r "${EGO_STORE_DIR}/src/${EGO_PN%/...}" \ "${go_srcpath}/.." fixed the issue.
The function could also use some error handling, if a command fails the build should also fail.