This bit of code doesn't seem to work as intended: mysql_pkg_setup() { [...] if [[ $UID -eq 0 ]]; then eerror "Testing with FEATURES=-userpriv is no longer supported by upstream. Tests MUST be run as non-root." fi [...] } A simplified ebuild example, attached shortly, shows me this: elmer /keeps/gentoo/local/app-portage/foobar # FEATURES=userpriv ebuild foobar-0.ebuild setup * CPV: app-portage/foobar-0 * REPO: JeR * USE: elibc_glibc hppa kernel_linux test userland_GNU root elmer /keeps/gentoo/local/app-portage/foobar # FEATURES=-userpriv ebuild foobar-0.ebuild setup * CPV: app-portage/foobar-0 * REPO: JeR * USE: elibc_glibc hppa kernel_linux test userland_GNU root Doing su to an unprivileged user does work in pkg_setup(): elmer /keeps/gentoo/local/app-portage/foobar # su jeroen -c 'ebuild foobar-0.ebuild setup' * CPV: app-portage/foobar-0 * REPO: JeR * USE: elibc_glibc hppa kernel_linux test userland_GNU jeroen I've tested this with both =sys-apps/portage-2.1.8.3 and =sys-apps/portage-2.2_rc67.
Created attachment 226275 [details] Simple ebuild for a test case
Nope, this does not work. Easy way to test: USE="-minimal" FEATURES="-userpriv test" emerge mysql This will die because of a UID check, but not until src_test(). I actually came to bugreport that it did not die until after compilation was done.
I've asked Zac about this and changed the test in the mysql-v2.eclass of the mysql overlay[1]. This should now be fixed. [1] - http://git.overlays.gentoo.org/gitweb/?p=proj/mysql.git;a=commitdiff;h=6293a42a24cdf94936a87c1c9b26b699ac8c9157
I've moved the eclasses to the tree, so I'm closing this as fixed. Please reopen if it fails for you.