summaryrefslogtreecommitdiffstats
path: root/meta/lib/oe/rootfs.py
diff options
context:
space:
mode:
authorRoxana Ciobanu <roxana.ciobanu@intel.com>2014-07-21 18:55:13 +0300
committerRichard Purdie <richard.purdie@linuxfoundation.org>2014-07-23 21:59:13 +0100
commit56bfda20f4d38373395b455d1e4b79b46d111a20 (patch)
tree9ec44d3da13f337346468eaf6176e4903ce20b77 /meta/lib/oe/rootfs.py
parentf4456df240054dc96d19da5d117614f736da6b94 (diff)
downloadpoky-56bfda20f4d38373395b455d1e4b79b46d111a20.tar.gz
image.bbclass/rootfs.py: add variables to rootfs[vardeps]
Added base variables and package backend specific variables to rootfs[vardeps] in order for rootfs to rebuild when changes are made. Set some variables as [func] to inform bitbake that they are shell scripts, so that it invokes its shell dependency parsing. Without marking them as functions, changes in the actual function body would not trigger rootfs rebuilds. [YOCTO #6502] (From OE-Core rev: b8b6214b885a0757f0e628937f8fe21c92c45155) Signed-off-by: Roxana Ciobanu <roxana.ciobanu@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.py21
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
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()