PMS is quite clear here: > When an ebuild is being sourced for metadata querying rather than for a build > (that is to say, when none of the src_ or pkg_ functions are to be called), no > external command may be executed. The package manager may take steps to enforce > this. You have to do with pure bash. This is triggering breakage for a lot of overlays now and preventing me from looking for more specific breakages. Please fix ASAP.
While you're fixing this function, tc-arch-kernel can't be used in global scope either, because it depends on CTARGET/CHOST. From PMS (section 7.1): > Globally defined ebuild variables without a special meaning must similarly > not rely upon variable data. ARCH_PATCH is only used by xbox-sources in the gentoo tree, and even there it's not actually needed, so it could just be dropped.
(In reply to Michał Górny from comment #0) > PMS is quite clear here: > > > When an ebuild is being sourced for metadata querying rather than for a build > > (that is to say, when none of the src_ or pkg_ functions are to be called), no > > external command may be executed. The package manager may take steps to enforce > > this. > > You have to do with pure bash. This is triggering breakage for a lot of > overlays now and preventing me from looking for more specific breakages. > Please fix ASAP. Overlay and example of the breakage for me, please.
https://gitweb.gentoo.org/report/repos.git/tree/ShyPixie.txt?id=c3559203e8cb232fe20c2c3faac2fadf13631057 However, gentoo-sources::gentoo fail the same.
Example ::gentoo error: * External commands disallowed during metadata regen: tr [:lower:] [:upper:] * * Call stack: * isolated-functions.lib, line 345: Called source '/home/mgorny/tmp/gentoo/sys-kernel/ck-sources/ck-sources-4.11.12.ebuild' * ck-sources-4.11.12.ebuild, line 21: Called detect_arch * kernel-2.eclass, line 1430: Called command_not_found_handle 'tr' '[:lower:]' '[:upper:]' * ebuild-daemon.bash, line 383: Called die Applies to: sys-kernel/ck-sources sys-kernel/gentoo-sources sys-kernel/raspberrypi-sources sys-kernel/tuxonice-sources sys-kernel/xbox-sources
(In reply to dwfreed from comment #1) > While you're fixing this function, tc-arch-kernel can't be used in global > scope either, because it depends on CTARGET/CHOST. From PMS (section 7.1): > > > Globally defined ebuild variables without a special meaning must similarly > > not rely upon variable data. > > ARCH_PATCH is only used by xbox-sources in the gentoo tree, and even there > it's not actually needed, so it could just be dropped. Right, none of the ebuilds in sys-kernel/*-sources actually sets ${ARCH}_URI, which means that detect_arch is a no-op and ARCH_URI and ARCH_PATCH will end up empty.
(In reply to Ulrich Müller from comment #5) > (In reply to dwfreed from comment #1) > > While you're fixing this function, tc-arch-kernel can't be used in global > > scope either, because it depends on CTARGET/CHOST. From PMS (section 7.1): > > > > > Globally defined ebuild variables without a special meaning must similarly > > > not rely upon variable data. > > > > ARCH_PATCH is only used by xbox-sources in the gentoo tree, and even there > > it's not actually needed, so it could just be dropped. > > Right, none of the ebuilds in sys-kernel/*-sources actually sets > ${ARCH}_URI, which means that detect_arch is a no-op and ARCH_URI and > ARCH_PATCH will end up empty. Right. So we lose a feature that an ebuild could use because PMS makes us do a hack since we can't easily lowercase a variable.
If no ebuild needs it right now, why not require EAPI 6 for it? Then you can uppercase/lowercase easily.
(In reply to Michał Górny from comment #7) > If no ebuild needs it right now, why not require EAPI 6 for it? Then you can > uppercase/lowercase easily. That's a useful and sane recommendation. I will do that.
fixed awhile ago. tr is not used anywhere in kernel-2.eclass