]> code.ossystems Code Review - openembedded-core.git/commitdiff
rootfs.py: Allow to override postinst-intercepts location
authorMartin Jansa <martin.jansa@gmail.com>
Fri, 4 Sep 2015 12:22:26 +0000 (14:22 +0200)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Sat, 19 Sep 2015 10:51:10 +0000 (11:51 +0100)
* useful when we need to overlay/extend intercept scripts from oe-core

(From OE-Core rev: 7d08d2d5c0ae686e3bb8732ea82f30fd189b1cd8)

Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Signed-off-by: Armin Kuster <akuster@mvista.com>
meta/lib/oe/rootfs.py

index c4735f2755c56b53d3876a9a367bbb9435ff85e7..bbc37d3522a9f347ae34d98a74730056b6aef6f3 100644 (file)
@@ -77,6 +77,9 @@ class Rootfs(object):
         pre_process_cmds = self.d.getVar("ROOTFS_PREPROCESS_COMMAND", True)
         post_process_cmds = self.d.getVar("ROOTFS_POSTPROCESS_COMMAND", True)
 
+        postinst_intercepts_dir = self.d.getVar("POSTINST_INTERCEPTS_DIR", True)
+        if not postinst_intercepts_dir:
+            postinst_intercepts_dir = self.d.expand("${COREBASE}/scripts/postinst-intercepts")
         intercepts_dir = os.path.join(self.d.getVar('WORKDIR', True),
                                       "intercept_scripts")
 
@@ -86,8 +89,7 @@ class Rootfs(object):
 
         bb.utils.mkdirhier(self.deploy_dir_image)
 
-        shutil.copytree(self.d.expand("${COREBASE}/scripts/postinst-intercepts"),
-                        intercepts_dir)
+        shutil.copytree(postinst_intercepts_dir, intercepts_dir)
 
         shutil.copy(self.d.expand("${COREBASE}/meta/files/deploydir_readme.txt"),
                     self.deploy_dir_image +