diff options
-rw-r--r-- | meta/classes/autotools.bbclass | 3 | ||||
-rwxr-xr-x | scripts/cp-noerror | 15 |
2 files changed, 16 insertions, 2 deletions
diff --git a/meta/classes/autotools.bbclass b/meta/classes/autotools.bbclass index 941c06d032..9b36f3c7b6 100644 --- a/meta/classes/autotools.bbclass +++ b/meta/classes/autotools.bbclass | |||
@@ -124,10 +124,9 @@ autotools_do_configure() { | |||
124 | # uninstalling data from the sysroot. See Yocto #861 for details. | 124 | # uninstalling data from the sysroot. See Yocto #861 for details. |
125 | # We avoid this by taking a copy here and then files cannot disappear. | 125 | # We avoid this by taking a copy here and then files cannot disappear. |
126 | if [ -d ${STAGING_DATADIR}/aclocal ]; then | 126 | if [ -d ${STAGING_DATADIR}/aclocal ]; then |
127 | mkdir -p ${B}/aclocal-copy/ | ||
128 | # for scratch build this directory can be empty | 127 | # for scratch build this directory can be empty |
129 | # so avoid cp's no files to copy error | 128 | # so avoid cp's no files to copy error |
130 | cp -r ${STAGING_DATADIR}/aclocal/. ${B}/aclocal-copy/ | 129 | cp-noerror ${STAGING_DATADIR}/aclocal ${B}/aclocal-copy/ |
131 | acpaths="$acpaths -I ${B}/aclocal-copy/" | 130 | acpaths="$acpaths -I ${B}/aclocal-copy/" |
132 | fi | 131 | fi |
133 | # autoreconf is too shy to overwrite aclocal.m4 if it doesn't look | 132 | # autoreconf is too shy to overwrite aclocal.m4 if it doesn't look |
diff --git a/scripts/cp-noerror b/scripts/cp-noerror new file mode 100755 index 0000000000..fdb3d2d19a --- /dev/null +++ b/scripts/cp-noerror | |||
@@ -0,0 +1,15 @@ | |||
1 | #!/usr/bin/env python | ||
2 | # | ||
3 | # Allow copying of $1 to $2 but if files in $1 disappear during the copy operation, | ||
4 | # don't error. | ||
5 | # | ||
6 | |||
7 | import sys | ||
8 | import shutil | ||
9 | |||
10 | try: | ||
11 | shutil.copytree(sys.argv[1], sys.argv[2]) | ||
12 | except shutil.Error: | ||
13 | pass | ||
14 | |||
15 | |||