NOTE: Executing SetScene Tasks NOTE: Executing RunQueue Tasks ERROR: image-std-sato-1.0-r1 do_rootfs: Build of do_rootfs failed ERROR: image-std-sato-1.0-r1 do_rootfs: Traceback (most recent call last): File "/buildarea/layers/oe-core/bitbake/lib/bb/build.py", line 680, in exec_task return _exec_task(fn, task, d, quieterr) File "/buildarea/layers/oe-core/bitbake/lib/bb/build.py", line 619, in _exec_task exec_func(task, localdata) File "/buildarea/layers/oe-core/bitbake/lib/bb/build.py", line 209, in exec_func bb.utils.remove(cdir, True) File "/buildarea/layers/oe-core/bitbake/lib/bb/utils.py", line 689, in remove subprocess.check_call(['rm', '-rf'] + glob.glob(path)) File "/usr/lib/python3.5/subprocess.py", line 576, in check_call retcode = call(*popenargs, **kwargs) File "/usr/lib/python3.5/subprocess.py", line 557, in call with Popen(*popenargs, **kwargs) as p: File "/usr/lib/python3.5/subprocess.py", line 947, in __init__ restore_signals, start_new_session) File "/usr/lib/python3.5/subprocess.py", line 1551, in _execute_child raise child_exception_type(errno_num, err_msg) OSError: [Errno 7] Argument list too long
the path is get from cleandirs and splited, so it is like: /yocto/builds/systemd/tmp/work/qemux86_64-poky-linux/core-image-minimal/1.0-r0/core-image-minimal-1.0 /yocto/builds/systemd/tmp/work/qemux86_64-poky-linux/core-image-minimal/1.0-r0/deploy-core-image-minimal-image-complete seems cannot generate multi files for glob.glob need to check after reproduce again.
Sandy, Do you have a record of what was going on in this build? How many packages were in the image and how long the paths were? Basically, how can we reproduce this? It's not clear why we are doing a glob to remove a directory but perhaps there are good reasons for that...
I'm thinking our custom remove code should just call shutil.rmtree. (https://docs.python.org/3/library/shutil.html#shutil.rmtree)
Bulk move from 4.99 or 0.00 to 5.99
Sandy, can we use: shutil.rmtree ? Any idea why this build failed ? Can it be reproduced now?
Refer https://git.openembedded.org/bitbake/tree/lib/bb/utils.py#n876 [# shutil.rmtree(name) would be ideal but its too slow] we use glob.glob on purpose to make remove faster. I didnot reproduce it again, after read the code, [snip of bitbake/lib/bb/build.py ] cleandirs = flags.get('cleandirs') if flags else None if cleandirs: for cdir in d.expand(cleandirs).split(): bb.utils.remove(cdir, True) [snip] meta/classes-recipe/image.bbclass:270:do_rootfs[cleandirs] += "${IMAGE_ROOTFS} ${IMGDEPLOYDIR} ${S}" I guess it reproduced then a lot of packages are installed in rootfs, and these packages have many files. This issue should rarely to meet, do we need to change to use rmtree?
An odd failure that hasn't happened again.