On 5/26/20 10:32 AM, Ulrich Mueller wrote: >>>>>> On Tue, 26 May 2020, Zac Medico wrote: > >> On 5/26/20 12:48 AM, Michał Górny wrote: >>> On Mon, 2020-05-25 at 21:31 -0700, Zac Medico wrote: >>>> Since variables like A and AA can contain extremely large values which >>>> may trigger E2BIG errors during attempts to execute subprocesses, delay >>>> export until the last moment, and unexport when appropriate. >>> >>> Please don't. This will only hide the problem from developers who will >>> unknowingly commit broken ebuilds and cause users of alternative package >>> managers to suffer. > >> We've seen in https://bugs.gentoo.org/719202 that developers can already >> do that with existing versions of portage, since the failure can be >> dependent on USE configuration. > > We have seen in bug 719202 that A has exceeded _SC_ARG_MAX which is > 128 KiB. > > However, your commit message mentions E2BIG which will trigger at a much > larger value, namely 2 MiB. We are far away from reaching that limit in > any ebuild. > > These are separate issues (although related), so I think we should make > it very clear about which one we're talking. > > Ulrich > If we want to differentiate between these things then that's fine with me, however, I have not seen an error other than errno 7 which I thought corresponded to E2BIG. Test case:
$ python -c "import os, subprocess; os.environ['A'] = 131072 * ' '; subprocess.check_call(['echo', 'hello world'])" Traceback (most recent call last): File "<string>", line 1, in <module> File "/usr/lib64/python3.6/subprocess.py", line 306, in check_call retcode = call(*popenargs, **kwargs) File "/usr/lib64/python3.6/subprocess.py", line 287, in call with Popen(*popenargs, **kwargs) as p: File "/usr/lib64/python3.6/subprocess.py", line 729, in __init__ restore_signals, start_new_session) File "/usr/lib64/python3.6/subprocess.py", line 1364, in _execute_child raise child_exception_type(errno_num, err_msg, err_filename) OSError: [Errno 7] Argument list too long: 'echo' -- Thanks, Zac
signature.asc
Description: OpenPGP digital signature