From 5a4c688958a7dc1258575c0f6c3bd1af165b2585 Mon Sep 17 00:00:00 2001 From: Richard Purdie Date: Thu, 11 Jun 2009 14:45:52 +0100 Subject: packaged-staging.bbclass: Detect when we're using autotools_stage_all and don't hold the lock for as long when that is the case giving a significant performance boost with less lock contention and staging area file timestamp checking required Signed-off-by: Richard Purdie --- meta/classes/autotools.bbclass | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'meta/classes/autotools.bbclass') diff --git a/meta/classes/autotools.bbclass b/meta/classes/autotools.bbclass index 365258f65..82ed36816 100644 --- a/meta/classes/autotools.bbclass +++ b/meta/classes/autotools.bbclass @@ -151,7 +151,9 @@ autotools_do_install() { done } +# STAGE_TEMP_PREFIX is used for a speedup by packaged-staging STAGE_TEMP="${WORKDIR}/temp-staging" +STAGE_TEMP_PREFIX = "" autotools_stage_includes() { if [ "${INHIBIT_AUTO_STAGE_INCLUDES}" != "1" ] @@ -167,11 +169,12 @@ autotools_stage_includes() { autotools_stage_dir() { from="$1" to="$2" + prefix="${STAGE_TEMP_PREFIX}" # This will remove empty directories so we can ignore them rmdir "$from" 2> /dev/null || true if [ -d "$from" ]; then - mkdir -p "$to" - cp -fpPR "$from"/* "$to" + mkdir -p "$prefix$to" + cp -fpPR "$from"/* "$prefix$to" fi } -- cgit v1.2.3