diff options
Diffstat (limited to 'meta/lib/oe/rootfs.py')
| -rw-r--r-- | meta/lib/oe/rootfs.py | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/meta/lib/oe/rootfs.py b/meta/lib/oe/rootfs.py index b34856c3ed..d145d5dcfa 100644 --- a/meta/lib/oe/rootfs.py +++ b/meta/lib/oe/rootfs.py | |||
| @@ -327,6 +327,10 @@ class RpmRootfs(Rootfs): | |||
| 327 | 327 | ||
| 328 | self.pm.rpm_setup_smart_target_config() | 328 | self.pm.rpm_setup_smart_target_config() |
| 329 | 329 | ||
| 330 | @staticmethod | ||
| 331 | def _depends_list(): | ||
| 332 | return ['DEPLOY_DIR_RPM', 'INC_RPM_IMAGE_GEN', 'RPM_PREPROCESS_COMMANDS', 'RPM_POSTPROCESS_COMMANDS'] | ||
| 333 | |||
| 330 | def _get_delayed_postinsts(self): | 334 | def _get_delayed_postinsts(self): |
| 331 | postinst_dir = self.d.expand("${IMAGE_ROOTFS}${sysconfdir}/rpm-postinsts") | 335 | postinst_dir = self.d.expand("${IMAGE_ROOTFS}${sysconfdir}/rpm-postinsts") |
| 332 | if os.path.isdir(postinst_dir): | 336 | if os.path.isdir(postinst_dir): |
| @@ -418,6 +422,10 @@ class DpkgRootfs(Rootfs): | |||
| 418 | 422 | ||
| 419 | self.pm.run_pre_post_installs() | 423 | self.pm.run_pre_post_installs() |
| 420 | 424 | ||
| 425 | @staticmethod | ||
| 426 | def _depends_list(): | ||
| 427 | return ['DEPLOY_DIR_DEB', 'DEB_SDK_ARCH', 'APTCONF_TARGET', 'APT_ARGS', 'DPKG_ARCH', 'DEB_PREPROCESS_COMMANDS', 'DEB_POSTPROCESS_COMMAND'] | ||
| 428 | |||
| 421 | def _get_delayed_postinsts(self): | 429 | def _get_delayed_postinsts(self): |
| 422 | pkg_list = [] | 430 | pkg_list = [] |
| 423 | with open(self.image_rootfs + "/var/lib/dpkg/status") as status: | 431 | with open(self.image_rootfs + "/var/lib/dpkg/status") as status: |
| @@ -680,6 +688,10 @@ class OpkgRootfs(Rootfs): | |||
| 680 | if self.inc_opkg_image_gen == "1": | 688 | if self.inc_opkg_image_gen == "1": |
| 681 | self.pm.backup_packaging_data() | 689 | self.pm.backup_packaging_data() |
| 682 | 690 | ||
| 691 | @staticmethod | ||
| 692 | def _depends_list(): | ||
| 693 | return ['IPKGCONF_SDK', 'IPK_FEED_URIS', 'DEPLOY_DIR_IPK', 'IPKGCONF_TARGET', 'INC_IPK_IMAGE_GEN', 'OPKG_ARGS', 'OPKGLIBDIR', 'OPKG_PREPROCESS_COMMANDS', 'OPKG_POSTPROCESS_COMMANDS', 'OPKGLIBDIR'] | ||
| 694 | |||
| 683 | def _get_delayed_postinsts(self): | 695 | def _get_delayed_postinsts(self): |
| 684 | pkg_list = [] | 696 | pkg_list = [] |
| 685 | status_file = os.path.join(self.image_rootfs, | 697 | status_file = os.path.join(self.image_rootfs, |
| @@ -723,6 +735,15 @@ class OpkgRootfs(Rootfs): | |||
| 723 | def _cleanup(self): | 735 | def _cleanup(self): |
| 724 | pass | 736 | pass |
| 725 | 737 | ||
| 738 | def get_class_for_type(imgtype): | ||
| 739 | return {"rpm": RpmRootfs, | ||
| 740 | "ipk": OpkgRootfs, | ||
| 741 | "deb": DpkgRootfs}[imgtype] | ||
| 742 | |||
| 743 | def variable_depends(d, manifest_dir=None): | ||
| 744 | img_type = d.getVar('IMAGE_PKGTYPE', True) | ||
| 745 | cls = get_class_for_type(img_type) | ||
| 746 | return cls._depends_list() | ||
| 726 | 747 | ||
| 727 | def create_rootfs(d, manifest_dir=None): | 748 | def create_rootfs(d, manifest_dir=None): |
| 728 | env_bkp = os.environ.copy() | 749 | env_bkp = os.environ.copy() |
