summaryrefslogtreecommitdiffstats
path: root/meta/classes/image.bbclass
diff options
context:
space:
mode:
Diffstat (limited to 'meta/classes/image.bbclass')
-rw-r--r--meta/classes/image.bbclass39
1 files changed, 27 insertions, 12 deletions
diff --git a/meta/classes/image.bbclass b/meta/classes/image.bbclass
index 116bd226ea..909702ac23 100644
--- a/meta/classes/image.bbclass
+++ b/meta/classes/image.bbclass
@@ -11,8 +11,8 @@ inherit gzipnative
11LICENSE = "MIT" 11LICENSE = "MIT"
12PACKAGES = "" 12PACKAGES = ""
13DEPENDS += "${MLPREFIX}qemuwrapper-cross ${MLPREFIX}depmodwrapper-cross" 13DEPENDS += "${MLPREFIX}qemuwrapper-cross ${MLPREFIX}depmodwrapper-cross"
14RDEPENDS += "${IMAGE_INSTALL} ${LINGUAS_INSTALL} ${NORMAL_FEATURE_INSTALL} ${ROOTFS_BOOTSTRAP_INSTALL}" 14RDEPENDS += "${PACKAGE_INSTALL} ${LINGUAS_INSTALL}"
15RRECOMMENDS += "${NORMAL_FEATURE_INSTALL_OPTIONAL}" 15RRECOMMENDS += "${PACKAGE_INSTALL_ATTEMPTONLY}"
16 16
17INHIBIT_DEFAULT_DEPS = "1" 17INHIBIT_DEFAULT_DEPS = "1"
18 18
@@ -28,16 +28,6 @@ ROOTFS_BOOTSTRAP_INSTALL = "${@base_contains("IMAGE_FEATURES", "package-manageme
28FEATURE_INSTALL = "${@' '.join(oe.packagegroup.required_packages(oe.data.typed_value('IMAGE_FEATURES', d), d))}" 28FEATURE_INSTALL = "${@' '.join(oe.packagegroup.required_packages(oe.data.typed_value('IMAGE_FEATURES', d), d))}"
29FEATURE_INSTALL_OPTIONAL = "${@' '.join(oe.packagegroup.optional_packages(oe.data.typed_value('IMAGE_FEATURES', d), d))}" 29FEATURE_INSTALL_OPTIONAL = "${@' '.join(oe.packagegroup.optional_packages(oe.data.typed_value('IMAGE_FEATURES', d), d))}"
30 30
31# packages to install from features, excluding dev/dbg/doc/ptest
32NORMAL_FEATURE_INSTALL = "${@' '.join(oe.packagegroup.required_packages(normal_groups(d), d))}"
33NORMAL_FEATURE_INSTALL_OPTIONAL = "${@' '.join(oe.packagegroup.optional_packages(normal_groups(d), d))}"
34
35def normal_groups(d):
36 """Return all the IMAGE_FEATURES, with the exception of our special package groups"""
37 extras = set(d.getVarFlags('COMPLEMENTARY_GLOB').keys())
38 features = set(oe.data.typed_value('IMAGE_FEATURES', d))
39 return features.difference(extras)
40
41# Define some very basic feature package groups 31# Define some very basic feature package groups
42SPLASH ?= "psplash" 32SPLASH ?= "psplash"
43PACKAGE_GROUP_splash = "${SPLASH}" 33PACKAGE_GROUP_splash = "${SPLASH}"
@@ -277,6 +267,31 @@ read_only_rootfs_hook () {
277 fi 267 fi
278} 268}
279 269
270PACKAGE_EXCLUDE ??= ""
271PACKAGE_EXCLUDE[type] = "list"
272
273python rootfs_process_ignore() {
274 excl_pkgs = d.getVar("PACKAGE_EXCLUDE", True).split()
275 inst_pkgs = d.getVar("PACKAGE_INSTALL", True).split()
276 inst_attempt_pkgs = d.getVar("PACKAGE_INSTALL_ATTEMPTONLY", True).split()
277
278 d.setVar('PACKAGE_INSTALL_ORIG', ' '.join(inst_pkgs))
279 d.setVar('PACKAGE_INSTALL_ATTEMPTONLY', ' '.join(inst_attempt_pkgs))
280
281 for pkg in excl_pkgs:
282 if pkg in inst_pkgs:
283 bb.warn("Package %s, set to be excluded, is in %s PACKAGE_INSTALL (%s). It will be removed from the list." % (pkg, d.getVar('PN', True), inst_pkgs))
284 inst_pkgs.remove(pkg)
285
286 if pkg in inst_attempt_pkgs:
287 bb.warn("Package %s, set to be excluded, is in %s PACKAGE_INSTALL_ATTEMPTONLY (%s). It will be removed from the list." % (pkg, d.getVar('PN', True), inst_pkgs))
288 inst_attempt_pkgs.remove(pkg)
289
290 d.setVar("PACKAGE_INSTALL", ' '.join(inst_pkgs))
291 d.setVar("PACKAGE_INSTALL_ATTEMPTONLY", ' '.join(inst_attempt_pkgs))
292}
293do_rootfs[prefuncs] += "rootfs_process_ignore"
294
280# We have to delay the runtime_mapping_rename until just before rootfs runs 295# We have to delay the runtime_mapping_rename until just before rootfs runs
281# otherwise, the multilib renaming could step in and squash any fixups that 296# otherwise, the multilib renaming could step in and squash any fixups that
282# may have occurred. 297# may have occurred.