diff options
Diffstat (limited to 'meta/classes/image.bbclass')
| -rw-r--r-- | meta/classes/image.bbclass | 39 |
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 | |||
| 11 | LICENSE = "MIT" | 11 | LICENSE = "MIT" |
| 12 | PACKAGES = "" | 12 | PACKAGES = "" |
| 13 | DEPENDS += "${MLPREFIX}qemuwrapper-cross ${MLPREFIX}depmodwrapper-cross" | 13 | DEPENDS += "${MLPREFIX}qemuwrapper-cross ${MLPREFIX}depmodwrapper-cross" |
| 14 | RDEPENDS += "${IMAGE_INSTALL} ${LINGUAS_INSTALL} ${NORMAL_FEATURE_INSTALL} ${ROOTFS_BOOTSTRAP_INSTALL}" | 14 | RDEPENDS += "${PACKAGE_INSTALL} ${LINGUAS_INSTALL}" |
| 15 | RRECOMMENDS += "${NORMAL_FEATURE_INSTALL_OPTIONAL}" | 15 | RRECOMMENDS += "${PACKAGE_INSTALL_ATTEMPTONLY}" |
| 16 | 16 | ||
| 17 | INHIBIT_DEFAULT_DEPS = "1" | 17 | INHIBIT_DEFAULT_DEPS = "1" |
| 18 | 18 | ||
| @@ -28,16 +28,6 @@ ROOTFS_BOOTSTRAP_INSTALL = "${@base_contains("IMAGE_FEATURES", "package-manageme | |||
| 28 | FEATURE_INSTALL = "${@' '.join(oe.packagegroup.required_packages(oe.data.typed_value('IMAGE_FEATURES', d), d))}" | 28 | FEATURE_INSTALL = "${@' '.join(oe.packagegroup.required_packages(oe.data.typed_value('IMAGE_FEATURES', d), d))}" |
| 29 | FEATURE_INSTALL_OPTIONAL = "${@' '.join(oe.packagegroup.optional_packages(oe.data.typed_value('IMAGE_FEATURES', d), d))}" | 29 | FEATURE_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 | ||
| 32 | NORMAL_FEATURE_INSTALL = "${@' '.join(oe.packagegroup.required_packages(normal_groups(d), d))}" | ||
| 33 | NORMAL_FEATURE_INSTALL_OPTIONAL = "${@' '.join(oe.packagegroup.optional_packages(normal_groups(d), d))}" | ||
| 34 | |||
| 35 | def 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 |
| 42 | SPLASH ?= "psplash" | 32 | SPLASH ?= "psplash" |
| 43 | PACKAGE_GROUP_splash = "${SPLASH}" | 33 | PACKAGE_GROUP_splash = "${SPLASH}" |
| @@ -277,6 +267,31 @@ read_only_rootfs_hook () { | |||
| 277 | fi | 267 | fi |
| 278 | } | 268 | } |
| 279 | 269 | ||
| 270 | PACKAGE_EXCLUDE ??= "" | ||
| 271 | PACKAGE_EXCLUDE[type] = "list" | ||
| 272 | |||
| 273 | python 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 | } | ||
| 293 | do_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. |
