]> code.ossystems Code Review - openembedded-core.git/commitdiff
lib/oe/rootfs: tell intercepts where the native sysroot is
authorRoss Burton <ross.burton@intel.com>
Tue, 20 Oct 2015 19:14:12 +0000 (20:14 +0100)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Sat, 24 Oct 2015 11:42:40 +0000 (12:42 +0100)
Some intercepts may want to access files in the native sysroot that are not on
$PATH (such as something in $libexecdir) but any use of STAGING_DIR_NATIVE in
the postinst that calls the intercept will be "baked" into the package, so if
sstate is reused it will use paths that may not exist.

Solve this by exporting the location of the native sysroot in the environment so
the postinst and intercept can use an environment variable instead of a bitbake
variable.

Signed-off-by: Ross Burton <ross.burton@intel.com>
meta/lib/oe/rootfs.py

index f7daf32e7591881992ca4ee0138e7497158bb8ad..18df22d9a7e3f586716608cf081a40aaecde478f 100644 (file)
@@ -279,6 +279,7 @@ class Rootfs(object):
 
         bb.note("Running intercept scripts:")
         os.environ['D'] = self.image_rootfs
+        os.environ['STAGING_DIR_NATIVE'] = self.d.getVar('STAGING_DIR_NATIVE', True)
         for script in os.listdir(intercepts_dir):
             script_full = os.path.join(intercepts_dir, script)