I'm working on some local ebuilds. I started by specifying RESTRICT="nomirror" so that Portage would not try to download the files from Gentoo mirrors. I then added maketest (making RESTRICT="nomirror maketest"), since the test target is currently broken in the upstream package. To my surprise, the src_test function was still executed: >>> Test phase [test]: www-apache/mod_auth_glcookie-2.21 Please use install_apache1 or install_apache2 as your make target apachectl restart make: apachectl: Command not found make: *** [restart] Error 127 !!! ERROR: www-apache/mod_auth_glcookie-2.21 failed. !!! Function src_test, Line 526, Exitcode 0 !!! Make test failed. See above for details. !!! If you need support, post the topmost build error, NOT this status message. Removing the nomirror restriction (making RESTRICT="maketest") correctly skips src_test: * Skipping make test/check due to ebuild restriction. >>> Test phase [explicitly disabled]: www-apache/mod_auth_glcookie-2.21 I can post the ebuild if necessary. I realize the maketest value of RESTRICT is undocumented (at least in man 5 ebuild), and thus may not be supported yet, but I did see mention of it on the gentoo-dev mailing list (in preparation for releasing Portage 2.0.51). As a workaround, I've created a src_test function which just prints a message about the problem: src_test() { einfo "Manually disabled src_test since RESTRICT=\"nomirror maketest\" does not work" } Reproducible: Always Steps to Reproduce: 1. Set RESTRICT="nomirror maketest" in an ebuild. 2. emerge category/package Actual Results: The src_test function is still called, even though the ebuild explicitly disables it. Expected Results: The src_test function should not be called when RESTRICT="nomirror maketest" is specified. Portage 2.0.51-r2 (default-x86-2004.2, gcc-3.3.4, glibc-2.3.4.20040808-r1, 2.6.9 i686) ================================================================= System uname: 2.6.9 i686 Intel(R) Xeon(TM) CPU 2.40GHz Gentoo Base System version 1.4.16 distcc 2.16 i686-pc-linux-gnu (protocols 1 and 2) (default port 3632) [enabled] Autoconf: sys-devel/autoconf-2.59-r5 Automake: sys-devel/automake-1.8.5-r1 Binutils: sys-devel/binutils-2.14.90.0.8-r1 Headers: sys-kernel/linux-headers-2.4.21-r1 Libtools: sys-devel/libtool-1.5.2-r5 ACCEPT_KEYWORDS="x86" AUTOCLEAN="yes" CFLAGS="-mcpu=pentium4 -O2 -pipe" CHOST="i686-pc-linux-gnu" COMPILER="" CONFIG_PROTECT="/etc /usr/X11R6/lib/X11/xkb /usr/kde/2/share/config /usr/kde/3.3/env /usr/kde/3.3/share/config /usr/kde/3.3/shutdown /usr/kde/3/share/config /usr/lib/mozilla/defaults/pref /usr/share/config /var/qmail/control" CONFIG_PROTECT_MASK="/etc/gconf /etc/terminfo /etc/env.d" CXXFLAGS="-mcpu=pentium4 -O2 -pipe" DISTDIR="/usr/portage/distfiles" FEATURES="autoaddcvs ccache distcc distlocks maketest sandbox strict userpriv" GENTOO_MIRRORS="http://open-systems.ufl.edu/mirrors/gentoo http://gentoo.oregonstate.edu http://www.ibiblio.org/pub/Linux/distributions/gentoo" MAKEOPTS="-j5" PKGDIR="/usr/portage/packages" PORTAGE_TMPDIR="/var/tmp" PORTDIR="/usr/portage" PORTDIR_OVERLAY="/usr/local/portage" SYNC="rsync://bugs.webadmin.ufl.edu/gentoo-portage" USE="X aalib acpi alsa apm avi berkdb bitmap-fonts cdr crypt cups divx4linux dvd dvdr encode f77 foomaticdb gdbm gif gnome gpm gtk gtk2 gtkhtml imlib java jpeg kde libg++ libwww mad maildir mikmod mmx motif mozilla mpeg ncurses nls oggvorbis opengl oss pam pdflib perl png ppds python qt quicktime readline sdl slang spell ssl svga tcpd tiff truetype x86 xml xml2 xmms xv xvid zlib"
Created attachment 43385 [details, diff] Patch to Portage 2.0.51-r2 This patch joins the tokens in the RESTRICT variable separated by a space character instead of nothing. This prevents the issue of ebuild.sh getting a PORTAGE_RESTRICT value of e.g. "nomirrormaketest".
Good catch.
Fixed and in circulation.