Patchwork [1/9] native/nativesdk: Add a simple chown intercept command

login
register
mail settings
Submitter Mark Hatle
Date June 23, 2011, 6:19 p.m.
Message ID <7d78b67e2c97fca2463eafaae06112a42bde98af.1308852888.git.mark.hatle@windriver.com>
Download mbox | patch
Permalink /patch/6431/
State New, archived
Headers show

Comments

Mark Hatle - June 23, 2011, 6:19 p.m.
During native and nativesdk package we want to intercept any calls to chown
and do nothing.  This prevents errors and allows the same recipes to be
used for both native and target recipes.

Signed-off-by: Mark Hatle <mark.hatle@windriver.com>
---
 meta/classes/native.bbclass    |    2 ++
 meta/classes/nativesdk.bbclass |    2 ++
 scripts/native-intercept/chown |    2 ++
 3 files changed, 6 insertions(+), 0 deletions(-)
 create mode 100755 scripts/native-intercept/chown

Patch

diff --git a/meta/classes/native.bbclass b/meta/classes/native.bbclass
index 90fcd13..11ec6dc 100644
--- a/meta/classes/native.bbclass
+++ b/meta/classes/native.bbclass
@@ -85,6 +85,8 @@  EXTRA_NATIVE_PKGCONFIG_PATH ?= ""
 PKG_CONFIG_PATH .= "${EXTRA_NATIVE_PKGCONFIG_PATH}"
 PKG_CONFIG_SYSROOT_DIR = ""
 
+PATH =. "${COREBASE}/scripts/native-intercept:"
+
 python native_virtclass_handler () {
     if not isinstance(e, bb.event.RecipePreFinalise):
         return
diff --git a/meta/classes/nativesdk.bbclass b/meta/classes/nativesdk.bbclass
index 3fe4bf9..a0302b9 100644
--- a/meta/classes/nativesdk.bbclass
+++ b/meta/classes/nativesdk.bbclass
@@ -54,6 +54,8 @@  FILES_${PN}-dbg += "${prefix}/.debug \
 export PKG_CONFIG_DIR = "${STAGING_DIR_HOST}${libdir}/pkgconfig"
 export PKG_CONFIG_SYSROOT_DIR = "${STAGING_DIR_HOST}"
 
+PATH =. "${COREBASE}/scripts/native-intercept:"
+
 python nativesdk_virtclass_handler () {
     if not isinstance(e, bb.event.RecipePreFinalise):
         return
diff --git a/scripts/native-intercept/chown b/scripts/native-intercept/chown
new file mode 100755
index 0000000..4f43271
--- /dev/null
+++ b/scripts/native-intercept/chown
@@ -0,0 +1,2 @@ 
+#! /bin/sh
+echo "Intercept $0: $@ -- do nothing"