Closed cuantar closed 2 weeks ago
It is not clear why variables like EROOT
are not set. The Gentoo ebuild documentation says that it should always be defined:
https://devmanual.gentoo.org/ebuild-writing/variables/index.html
Looking through our tree, many ebuilds use $EROOT
instead of writing /
. These will all suffer from this bug.
I'm not seeing the problem in next
so I'll stay over there until we figure it out.
Just to illustrate that this is a problem outside of metro
:
$ /var/git/meta-repo/kits # grep -r EROOT | wc -l
2267
Found by @geaaru: https://projects.gentoo.org/pms/8/pms.html#x1-113001r7
EAPI7 wipes out the trailing slash from $EROOT
.
Confirmed that the problem does not actually happen with bash
due to the presence of the slash:
Seems like this bug maybe only affects baselayout
after all.
The portage variable
EROOT
is not being set correctly inmark-testing
. Originally, I found the problem withmetro
; but I've confirmed that I'm seeing it on live systems as well. The easiest way to verify is withbaselayout
, either usingebuild
:$ ebuild /var/git/meta-repo/kits/core-kit/sys-apps/baselayout/baselayout-3.0.ebuild merge
or something like this:
$ emerge baselayout & sleep 2; tail -f /var/tmp/portage/sys-apps/baselayout-3.0/temp/build.log
The error manifests visibly in the following messages:
In the ebuild, there are places where paths are created like
${EROOT}etc/passwd
:The errors above related to
/proc/mounts
and/etc/mark-release
have a similar origin:This problem will cause major issues with both running systems and stage builds, if it is not corrected. Files don't get installed, or lines don't get written to them; and unless the ebuild author thought to use
die
liberally, the errors will be silent during theemerge
process as withbaselayout
where they're only observed by watching the build log.