'ROOT=/ has_version' behavior seems to have changed in a non backwards compatible way. autotools.eclass relies on this. I've pushed [ed0e36e7b664078c7b7f2c346ea377f7537385f8] to use proper arguments to has_version in newer eapis, but EAPIs 0-4 are broken. As such, e.g. =app-text/lv-4.51-r3 being EAPI 4 breaks when ROOT!=/
I did some quick tests with portage master: ROOT=/ has_version works in EAPI 0, 1, and 2. ROOT=/ has_version does not seem to work in EAPI 3, 4, 5, 6.
This behavior probably changed with 43b6be7423aaebee26e4659d580a9a17b4fde01e. The old code did this: > local atom eroot host_root=false root=${ROOT} > > ... > > if ___eapi_has_prefix_variables; then > # [[ ${root} == / ]] would be ambiguous here, > # since both prefixes can share root=/ while > # having different EPREFIX offsets. > if ${host_root} ; then > eroot=${root%/}${PORTAGE_OVERRIDE_EPREFIX}/ > else > eroot=${root%/}${EPREFIX}/ > fi > else > eroot=${root} > fi eroot is then passed to the IPC daemon or portageq. Note that EROOT is not used here; eroot is always derived from ROOT. The new code does this: > case ${root_arg} in > "") if ___eapi_has_prefix_variables; then > root=${EROOT} > else > root=${ROOT} > fi ;; root is then passed to the IPC daemon or portageq. When we call ROOT=... has_version, EROOT is not recomputed with the new code, and so root gets the old value.
The bug has been referenced in the following commit(s): https://gitweb.gentoo.org/proj/portage.git/commit/?id=9abebd3e6aae049d2eb9c8039453d7f187bca00f commit 9abebd3e6aae049d2eb9c8039453d7f187bca00f Author: Zac Medico <zmedico@gentoo.org> AuthorDate: 2018-05-16 16:48:16 +0000 Commit: Zac Medico <zmedico@gentoo.org> CommitDate: 2018-05-16 16:51:39 +0000 phase-helpers.sh: fix ROOT overrides for has/best_version (bug 655860) Since it's common for code to override the ROOT variable, use ${ROOT%/}/${EPREFIX} instead of ${EROOT}. Thanks to Mike Gilbert <floppym@gentoo.org> for finding the cause. Fixes: 43b6be7423aa ("phase-helpers.sh: Implement -r|-d|-b options for best/has_version") Bug: https://bugs.gentoo.org/655860 bin/phase-helpers.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
Created attachment 531856 [details, diff] Patch
The bug has been closed via the following commit(s): https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=7342b2e991aeafe00d0a5e0275342fe134944997 commit 7342b2e991aeafe00d0a5e0275342fe134944997 Author: Zac Medico <zmedico@gentoo.org> AuthorDate: 2018-05-16 22:30:03 +0000 Commit: Zac Medico <zmedico@gentoo.org> CommitDate: 2018-05-16 22:51:56 +0000 sys-apps/portage: version bump to 2.3.37 #654390 - use asyncio's default event loop #655414 - fix has/best_version for cross-prefix portageq #655860 - fix ROOT overrides for has/best_version Closes: https://bugs.gentoo.org/655860 Package-Manager: Portage-2.3.37, Repoman-2.3.9 sys-apps/portage/Manifest | 1 + sys-apps/portage/portage-2.3.37.ebuild | 284 +++++++++++++++++++++++++++++++++ 2 files changed, 285 insertions(+)