From patchwork Mon Jan 2 20:38:01 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: [v2,05/15] autotools.bbclass: fix cp error for empty dir Date: Mon, 02 Jan 2012 20:38:01 -0000 From: Nitin A Kamble X-Patchwork-Id: 17961 Message-Id: <3dfd63a9d3cd981ee53a5f56a4ff2733fa721f76.1325536389.git.nitin.a.kamble@intel.com> To: openembedded-core@lists.openembedded.org From: Nitin A Kamble the .../usr/share/aclocal is empty for build from scratch. so avoid cp error if the directory is empty. Fixes this error, which is thrown before pseudo is built: | cp: cannot stat `/builddisk/build/build0/tmp/sysroots/x86_64-linux/usr/share/aclocal/*': No such file or directory NOTE: package libtool-native-2.4.2-r0.0: task do_configure: Failed Signed-off-by: Nitin A Kamble --- meta/classes/autotools.bbclass | 4 +++- 1 files changed, 3 insertions(+), 1 deletions(-) diff --git a/meta/classes/autotools.bbclass b/meta/classes/autotools.bbclass index 7536bac..2f462ff 100644 --- a/meta/classes/autotools.bbclass +++ b/meta/classes/autotools.bbclass @@ -122,7 +122,9 @@ autotools_do_configure() { # We avoid this by taking a copy here and then files cannot disappear. if [ -d ${STAGING_DATADIR}/aclocal ]; then mkdir -p ${B}/aclocal-copy/ - cp ${STAGING_DATADIR}/aclocal/* ${B}/aclocal-copy/ + # for scratch build this directory can be empty + # so avoid cp's no files to copy error + cp -r ${STAGING_DATADIR}/aclocal/. ${B}/aclocal-copy/ acpaths="$acpaths -I ${B}/aclocal-copy/" fi # autoreconf is too shy to overwrite aclocal.m4 if it doesn't look