diff options
| author | Alexander Kanavin <alexander.kanavin@linux.intel.com> | 2018-04-03 18:45:19 +0300 |
|---|---|---|
| committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2018-04-05 14:49:07 +0100 |
| commit | 19cd7a1776df6610cf9721275d6ef69115f9426a (patch) | |
| tree | d4fba34f8f144c6f90ef9c25611f25752a62190e /meta/lib/oe/rootfs.py | |
| parent | b224c4e1526f6b2c574c19a7782b90e456e64f6d (diff) | |
| download | poky-19cd7a1776df6610cf9721275d6ef69115f9426a.tar.gz | |
package_manager.py: move postinst_intercept dir initialization from RootFS to PackageManager class
This will allow handling postinst_intercepts when populating SDKs (which
use PackageManager class directly, and do not utilize RootFS class).
(From OE-Core rev: 9454fd328040fd58c981d028a74fcf181bde8e89)
Signed-off-by: Alexander Kanavin <alexander.kanavin@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/lib/oe/rootfs.py')
| -rw-r--r-- | meta/lib/oe/rootfs.py | 13 |
1 files changed, 1 insertions, 12 deletions
diff --git a/meta/lib/oe/rootfs.py b/meta/lib/oe/rootfs.py index bf2aea2b25..600a685d68 100644 --- a/meta/lib/oe/rootfs.py +++ b/meta/lib/oe/rootfs.py | |||
| @@ -178,20 +178,10 @@ class Rootfs(object, metaclass=ABCMeta): | |||
| 178 | post_process_cmds = self.d.getVar("ROOTFS_POSTPROCESS_COMMAND") | 178 | post_process_cmds = self.d.getVar("ROOTFS_POSTPROCESS_COMMAND") |
| 179 | rootfs_post_install_cmds = self.d.getVar('ROOTFS_POSTINSTALL_COMMAND') | 179 | rootfs_post_install_cmds = self.d.getVar('ROOTFS_POSTINSTALL_COMMAND') |
| 180 | 180 | ||
| 181 | postinst_intercepts_dir = self.d.getVar("POSTINST_INTERCEPTS_DIR") | ||
| 182 | if not postinst_intercepts_dir: | ||
| 183 | postinst_intercepts_dir = self.d.expand("${COREBASE}/scripts/postinst-intercepts") | ||
| 184 | intercepts_dir = os.path.join(self.d.getVar('WORKDIR'), | ||
| 185 | "intercept_scripts") | ||
| 186 | |||
| 187 | bb.utils.remove(intercepts_dir, True) | ||
| 188 | |||
| 189 | bb.utils.mkdirhier(self.image_rootfs) | 181 | bb.utils.mkdirhier(self.image_rootfs) |
| 190 | 182 | ||
| 191 | bb.utils.mkdirhier(self.deploydir) | 183 | bb.utils.mkdirhier(self.deploydir) |
| 192 | 184 | ||
| 193 | shutil.copytree(postinst_intercepts_dir, intercepts_dir) | ||
| 194 | |||
| 195 | execute_pre_post_process(self.d, pre_process_cmds) | 185 | execute_pre_post_process(self.d, pre_process_cmds) |
| 196 | 186 | ||
| 197 | if self.progress_reporter: | 187 | if self.progress_reporter: |
| @@ -312,8 +302,7 @@ class Rootfs(object, metaclass=ABCMeta): | |||
| 312 | 302 | ||
| 313 | 303 | ||
| 314 | def _run_intercepts(self): | 304 | def _run_intercepts(self): |
| 315 | intercepts_dir = os.path.join(self.d.getVar('WORKDIR'), | 305 | intercepts_dir = self.pm.intercepts_dir |
| 316 | "intercept_scripts") | ||
| 317 | 306 | ||
| 318 | bb.note("Running intercept scripts:") | 307 | bb.note("Running intercept scripts:") |
| 319 | os.environ['D'] = self.image_rootfs | 308 | os.environ['D'] = self.image_rootfs |
