mirror of
https://git.yoctoproject.org/poky
synced 2026-06-01 13:09:50 +00:00
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>
This commit is contained in:
committed by
Richard Purdie
parent
f4456df240
commit
56bfda20f4
@@ -327,6 +327,10 @@ class RpmRootfs(Rootfs):
|
||||
|
||||
self.pm.rpm_setup_smart_target_config()
|
||||
|
||||
@staticmethod
|
||||
def _depends_list():
|
||||
return ['DEPLOY_DIR_RPM', 'INC_RPM_IMAGE_GEN', 'RPM_PREPROCESS_COMMANDS', 'RPM_POSTPROCESS_COMMANDS']
|
||||
|
||||
def _get_delayed_postinsts(self):
|
||||
postinst_dir = self.d.expand("${IMAGE_ROOTFS}${sysconfdir}/rpm-postinsts")
|
||||
if os.path.isdir(postinst_dir):
|
||||
@@ -418,6 +422,10 @@ class DpkgRootfs(Rootfs):
|
||||
|
||||
self.pm.run_pre_post_installs()
|
||||
|
||||
@staticmethod
|
||||
def _depends_list():
|
||||
return ['DEPLOY_DIR_DEB', 'DEB_SDK_ARCH', 'APTCONF_TARGET', 'APT_ARGS', 'DPKG_ARCH', 'DEB_PREPROCESS_COMMANDS', 'DEB_POSTPROCESS_COMMAND']
|
||||
|
||||
def _get_delayed_postinsts(self):
|
||||
pkg_list = []
|
||||
with open(self.image_rootfs + "/var/lib/dpkg/status") as status:
|
||||
@@ -680,6 +688,10 @@ class OpkgRootfs(Rootfs):
|
||||
if self.inc_opkg_image_gen == "1":
|
||||
self.pm.backup_packaging_data()
|
||||
|
||||
@staticmethod
|
||||
def _depends_list():
|
||||
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']
|
||||
|
||||
def _get_delayed_postinsts(self):
|
||||
pkg_list = []
|
||||
status_file = os.path.join(self.image_rootfs,
|
||||
@@ -723,6 +735,15 @@ class OpkgRootfs(Rootfs):
|
||||
def _cleanup(self):
|
||||
pass
|
||||
|
||||
def get_class_for_type(imgtype):
|
||||
return {"rpm": RpmRootfs,
|
||||
"ipk": OpkgRootfs,
|
||||
"deb": DpkgRootfs}[imgtype]
|
||||
|
||||
def variable_depends(d, manifest_dir=None):
|
||||
img_type = d.getVar('IMAGE_PKGTYPE', True)
|
||||
cls = get_class_for_type(img_type)
|
||||
return cls._depends_list()
|
||||
|
||||
def create_rootfs(d, manifest_dir=None):
|
||||
env_bkp = os.environ.copy()
|
||||
|
||||
Reference in New Issue
Block a user