mirror of
git://git.yoctoproject.org/poky.git
synced 2025-07-19 21:09:03 +02:00

Currently we copy the aclocal directory to the build so that autotools doesn't see .m4 files disappear when its processing them. This can happen if for example, package X is being rebuilt at the same time as Y and it gets uninstalled from sstate (assuming there are no dependencies between X and Y). This code making the copy was added to avoid races but introduces a race of its own, namely that the files can disappear during the copy. This patch adds a cp-noerror script which silently ignores such errors and gives the behaviour we need in this case. It hence fixes issues which crop up for users and the autobuilder occasionally. [YOCTO #2485] (From OE-Core rev: 0f81fbc0df73675aeb79c724858799a3b6a02f85) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
234 B
Executable File
234 B
Executable File
#!/usr/bin/env python
Allow copying of $1 to $2 but if files in $1 disappear during the copy operation,
don't error.
import sys import shutil
try: shutil.copytree(sys.argv[1], sys.argv[2]) except shutil.Error: pass