Relevant make.conf bit: EMERGE_DEFAULT_OPTS="${EMERGE_DEFAULT_OPTS} --getbinpkgonly" ------------------------------------------------------------------------------ The error: root@penguin /root# emerge x11-ssh-askpass Calculating dependencies... done! >>> Emerging binary (1 of 1) net-misc/x11-ssh-askpass-1.2.4.1-r1::gentoo * x11-ssh-askpass-1.2.4.1-r1.tbz2 MD5 SHA1 size ;-) ... [ ok ] [Errno 7] Argument list too long: b'/bin/bash': /bin/bash -c /usr/lib/portage/python3.5/ebuild.sh clean Traceback (most recent call last): File "/usr/lib64/python3.5/site-packages/portage/process.py", line 347, in spawn unshare_net, unshare_ipc, cgroup) File "/usr/lib64/python3.5/site-packages/portage/process.py", line 555, in _exec os.execve(binary, myargs, env) File "/usr/lib64/python3.5/site-packages/portage/__init__.py", line 250, in __call__ rval = self._func(*wrapped_args, **wrapped_kwargs) OSError: [Errno 7] Argument list too long: b'/bin/bash' [Errno 7] Argument list too long: b'/usr/bin/sandbox': /usr/bin/sandbox /usr/lib/portage/python3.5/misc-functions.sh die_hooks Traceback (most recent call last): File "/usr/lib64/python3.5/site-packages/portage/process.py", line 347, in spawn unshare_net, unshare_ipc, cgroup) File "/usr/lib64/python3.5/site-packages/portage/process.py", line 555, in _exec os.execve(binary, myargs, env) File "/usr/lib64/python3.5/site-packages/portage/__init__.py", line 250, in __call__ rval = self._func(*wrapped_args, **wrapped_kwargs) OSError: [Errno 7] Argument list too long: b'/usr/bin/sandbox' * The ebuild phase 'die_hooks' has exited unexpectedly. This type of * behavior is known to be triggered by things such as failed variable * assignments (bug #190128) or bad substitution errors (bug #200313). * Normally, before exiting, bash should have displayed an error message * above. If bash did not produce an error message above, it's possible * that the ebuild has called `exit` when it should have called `die` * instead. This behavior may also be triggered by a corrupt bash binary or * a hardware problem such as memory or cpu malfunction. If the problem is * not reproducible or it appears to occur randomly, then it is likely to * be triggered by a hardware problem. If you suspect a hardware problem * then you should try some basic hardware diagnostics such as memtest. * Please do not report this as a bug unless it is consistently * reproducible and you are sure that your bash binary and hardware are * functioning properly. >>> Failed to emerge net-misc/x11-ssh-askpass-1.2.4.1-r1, Log file: >>> '/var/tmp/portage/net-misc/x11-ssh-askpass-1.2.4.1-r1/temp/build.log' * Messages for package net-misc/x11-ssh-askpass-1.2.4.1-r1: ------------------------------------------------------------------------------
So, a second run showed a similar error, only this time noting wget. The partial path it showed didn't exist, but running find to locate everything related to the package showed /usr/portage/packages/ being populated. I nuked that entirely, and my next attempt at emerging completed successfully. However, I suspect there's still a bug in here somewhere, so I don't want to close this prematurely.
Please post output of emerge --info.
Created attachment 537270 [details] emerge.strace.3401
Created attachment 537272 [details] emerge --info
"emerge --info" looks good for me. What interesting, is that error triggered by too large environment in arguments to "execve", while command line looks pretty good. I've attached excerpt from "strace -ffvxs 4096 ...". Looks like every USE_EXPAND_VALUES_* variable expanded much more than once.
I played a bit and found that to get this kind of error "--getbinpkgonly" is mandatory. Once I start emerge with command line arguments "--getbinpkgonly=n --getbinpkg=y" everything works as expected.
The bug has been referenced in the following commit(s): https://gitweb.gentoo.org/proj/portage.git/commit/?id=2710f9ab525e7c726c2ffb027e242dbdf31cfe76 commit 2710f9ab525e7c726c2ffb027e242dbdf31cfe76 Author: Zac Medico <zmedico@gentoo.org> AuthorDate: 2018-06-26 20:14:09 +0000 Commit: Zac Medico <zmedico@gentoo.org> CommitDate: 2018-06-26 20:16:25 +0000 binarytree._merge_pkgindex_header: deduplicate values (bug 657422) Deduplicate values of implicit IUSE variables, in order to prevent them from growing without bound, triggering "[Errno 7] Argument list too long" errors as reported in bug 657422. Fixes: cab78dba98c4 ("emerge --usepkgonly: propagate implicit IUSE and USE_EXPAND (bug 640318)") Bug: https://bugs.gentoo.org/657422 pym/portage/dbapi/bintree.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-)
This patch should fix it, you can apply it by saving it in /etc/portage/patches/sys-apps/portage/ and rebuilding portage: https://gitweb.gentoo.org/proj/portage.git/patch/?id=2710f9ab525e7c726c2ffb027e242dbdf31cfe76
This saves the day for me. Does this need more review before being committed?
(In reply to Mason Loring Bliss from comment #9) > This saves the day for me. Does this need more review before being committed? This fix is included in sys-apps/portage-2.3.43.
Thank you. I've now learned a couple ways to grab the newer version, and I'll report back if I see any fall-out that seems related.