summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--meta/classes/image.bbclass27
-rw-r--r--meta/lib/oe/rootfs.py21
2 files changed, 47 insertions, 1 deletions
diff --git a/meta/classes/image.bbclass b/meta/classes/image.bbclass
index 772c3ed993..da13bb8df9 100644
--- a/meta/classes/image.bbclass
+++ b/meta/classes/image.bbclass
@@ -75,7 +75,32 @@ LDCONFIGDEPEND_libc-musl = ""
75do_rootfs[depends] += "makedevs-native:do_populate_sysroot virtual/fakeroot-native:do_populate_sysroot ${LDCONFIGDEPEND}" 75do_rootfs[depends] += "makedevs-native:do_populate_sysroot virtual/fakeroot-native:do_populate_sysroot ${LDCONFIGDEPEND}"
76do_rootfs[depends] += "virtual/update-alternatives-native:do_populate_sysroot update-rc.d-native:do_populate_sysroot" 76do_rootfs[depends] += "virtual/update-alternatives-native:do_populate_sysroot update-rc.d-native:do_populate_sysroot"
77do_rootfs[recrdeptask] += "do_packagedata" 77do_rootfs[recrdeptask] += "do_packagedata"
78do_rootfs[vardeps] += "BAD_RECOMMENDATIONS NO_RECOMMENDATIONS" 78
79def command_variables(d):
80 return ['ROOTFS_POSTPROCESS_COMMAND','ROOTFS_PREPROCESS_COMMAND','ROOTFS_POSTINSTALL_COMMAND','OPKG_PREPROCESS_COMMANDS','OPKG_POSTPROCESS_COMMANDS','IMAGE_POSTPROCESS_COMMAND',
81 'IMAGE_PREPROCESS_COMMAND','ROOTFS_POSTPROCESS_COMMAND','POPULATE_SDK_POST_HOST_COMMAND','POPULATE_SDK_POST_TARGET_COMMAND','SDK_POSTPROCESS_COMMAND','RPM_PREPROCESS_COMMANDS',
82 'RPM_POSTPROCESS_COMMANDS']
83
84python () {
85 variables = command_variables(d)
86 for var in variables:
87 if d.getVar(var):
88 d.setVarFlag(var, 'func', '1')
89}
90
91def rootfs_variables(d):
92 from oe.rootfs import variable_depends
93 variables = ['IMAGE_DEVICE_TABLES','BUILD_IMAGES_FROM_FEEDS','IMAGE_TYPEDEP_','IMAGE_TYPES_MASKED','IMAGE_ROOTFS_ALIGNMENT','IMAGE_OVERHEAD_FACTOR','IMAGE_ROOTFS_SIZE','IMAGE_ROOTFS_EXTRA_SPACE',
94 'IMAGE_ROOTFS_MAXSIZE','IMAGE_NAME','IMAGE_LINK_NAME','IMAGE_MANIFEST','DEPLOY_DIR_IMAGE','RM_OLD_IMAGE','IMAGE_FSTYPES','IMAGE_INSTALL_COMPLEMENTARY','IMAGE_LINGUAS','SDK_OS',
95 'SDK_OUTPUT','SDKPATHNATIVE','SDKTARGETSYSROOT','SDK_DIR','SDK_VENDOR','SDKIMAGE_INSTALL_COMPLEMENTARY','SDK_PACKAGE_ARCHS','SDK_OUTPUT','SDKTARGETSYSROOT','MULTILIBRE_ALLOW_REP',
96 'MULTILIB_TEMP_ROOTFS','MULTILIB_VARIANTS','MULTILIBS','ALL_MULTILIB_PACKAGE_ARCHS','MULTILIB_GLOBAL_VARIANTS','BAD_RECOMMENDATIONS','NO_RECOMMENDATIONS','PACKAGE_ARCHS',
97 'PACKAGE_CLASSES','TARGET_VENDOR','TARGET_VENDOR','TARGET_ARCH','TARGET_OS','OVERRIDES','BBEXTENDVARIANT','FEED_DEPLOYDIR_BASE_URI','INTERCEPT_DIR','BUILDNAME','USE_DEVFS',
98 'STAGING_KERNEL_DIR','COMPRESSIONTYPES']
99 variables.extend(command_variables(d))
100 variables.extend(variable_depends(d))
101 return " ".join(variables)
102
103do_rootfs[vardeps] += "${@rootfs_variables(d)}"
79 104
80do_build[depends] += "virtual/kernel:do_deploy" 105do_build[depends] += "virtual/kernel:do_deploy"
81 106
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
738def get_class_for_type(imgtype):
739 return {"rpm": RpmRootfs,
740 "ipk": OpkgRootfs,
741 "deb": DpkgRootfs}[imgtype]
742
743def 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
727def create_rootfs(d, manifest_dir=None): 748def create_rootfs(d, manifest_dir=None):
728 env_bkp = os.environ.copy() 749 env_bkp = os.environ.copy()