Summary: | =sys-apps/portage-2.3.36 breaks has_version ROOT support | ||
---|---|---|---|
Product: | Gentoo Linux | Reporter: | Alexis Ballier <aballier> |
Component: | Current packages | Assignee: | Portage team <dev-portage> |
Status: | RESOLVED FIXED | ||
Severity: | normal | CC: | base-system |
Priority: | Normal | Keywords: | InVCS, REGRESSION |
Version: | unspecified | ||
Hardware: | All | ||
OS: | Linux | ||
See Also: | https://bugs.gentoo.org/show_bug.cgi?id=655414 | ||
Whiteboard: | |||
Package list: | Runtime testing required: | --- | |
Bug Depends on: | |||
Bug Blocks: | 651804 | ||
Attachments: | Patch |
Description
Alexis Ballier
2018-05-16 12:21:55 UTC
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(+) |