summaryrefslogtreecommitdiffstats
path: root/meta/classes/populate_sdk_base.bbclass
diff options
context:
space:
mode:
authorYi Zhao <yi.zhao@windriver.com>2017-08-11 09:30:43 +0800
committerRichard Purdie <richard.purdie@linuxfoundation.org>2017-08-16 00:03:13 +0100
commit3c901c59339a41d75417b0b7b9f8163f0d27ecdf (patch)
tree676da9c8f276573df63ef4503760444450e15523 /meta/classes/populate_sdk_base.bbclass
parent00ea0bf798e12ebf2323a85a63b7497892a2fba4 (diff)
downloadpoky-3c901c59339a41d75417b0b7b9f8163f0d27ecdf.tar.gz
populate_sdk_base.bbclass: add handling package exclusions to do_populate_sdk
There is an error for populate_sdk when we exclude package by using PACKAGE_EXCLUDE. Reproduced steps: echo "PACKAGE_EXCLUDE = \"psplash\"" >> conf/local.conf bitbake core-image-sato -c populate_sdk Error log: ERROR: core-image-sato-1.0-r0 do_populate_sdk: Could not invoke dnf. Command '/buildarea1/poky/build/tmp/work/qemux86-poky-linux/core-image-sato/1.0-r0/recipe-sysroot-native/usr/bin/dnf -y -c /buildarea1/poky/build/tmp/work/qemux86-poky-linux/core-image-sato/1.0-r0/sdk/image/opt/poky/2.3/sysroots/i586-poky-linux/etc/dnf/dnf.conf --setopt=reposdir=/buildarea1/poky/build/tmp/work/qemux86-poky-linux/core-image-sato/1.0-r0/sdk/image/opt/poky/2.3/sysroots/i586-poky-linux/etc/yum.repos.d --repofrompath=oe-repo,/buildarea1/poky/build/tmp/work/qemux86-poky-linux/core-image-sato/1.0-r0/oe-rootfs-repo --installroot=/buildarea1/poky/build/tmp/work/qemux86-poky-linux/core-image-sato/1.0-r0/sdk/image/opt/poky/2.3/sysroots/i586-poky-linux --setopt=logdir=/buildarea1/poky/build/tmp/work/qemux86-poky-linux/core-image-sato/1.0-r0/temp -x psplash --nogpgcheck install run-postinsts dnf packagegroup-core-x11-base packagegroup-core-ssh-dropbear packagegroup-core-standalone-sdk-target packagegroup-base-extended packagegroup-core-x11-sato psplash packagegroup-core-boot rpm' returned 1: Unable to detect release version (use '--releasever' to specify release version) Added oe-repo repo from /buildarea1/poky/build/tmp/work/qemux86-poky-linux/core-image-sato/1.0-r0/oe-rootfs-repo Last metadata expiration check: 0:00:00 ago on Thu 10 Aug 2017 09:26:32 AM UTC. No package psplash available. Error: Unable to find a match Add handling package exclusions to do_populate_sdk. The code copies from do_rootfs in image.bbclass. (From OE-Core rev: 86db855da4ee000737281ef7cc893d56854b3952) Signed-off-by: Yi Zhao <yi.zhao@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/classes/populate_sdk_base.bbclass')
-rw-r--r--meta/classes/populate_sdk_base.bbclass20
1 files changed, 20 insertions, 0 deletions
diff --git a/meta/classes/populate_sdk_base.bbclass b/meta/classes/populate_sdk_base.bbclass
index 0354ee1ab3..424c63cbfc 100644
--- a/meta/classes/populate_sdk_base.bbclass
+++ b/meta/classes/populate_sdk_base.bbclass
@@ -101,6 +101,26 @@ def populate_sdk_common(d):
101 from oe.sdk import populate_sdk 101 from oe.sdk import populate_sdk
102 from oe.manifest import create_manifest, Manifest 102 from oe.manifest import create_manifest, Manifest
103 103
104 # Handle package exclusions
105 excl_pkgs = (d.getVar("PACKAGE_EXCLUDE") or "").split()
106 inst_pkgs = (d.getVar("PACKAGE_INSTALL") or "").split()
107 inst_attempt_pkgs = (d.getVar("PACKAGE_INSTALL_ATTEMPTONLY") or "").split()
108
109 d.setVar('PACKAGE_INSTALL_ORIG', ' '.join(inst_pkgs))
110 d.setVar('PACKAGE_INSTALL_ATTEMPTONLY', ' '.join(inst_attempt_pkgs))
111
112 for pkg in excl_pkgs:
113 if pkg in inst_pkgs:
114 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'), inst_pkgs))
115 inst_pkgs.remove(pkg)
116
117 if pkg in inst_attempt_pkgs:
118 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'), inst_pkgs))
119 inst_attempt_pkgs.remove(pkg)
120
121 d.setVar("PACKAGE_INSTALL", ' '.join(inst_pkgs))
122 d.setVar("PACKAGE_INSTALL_ATTEMPTONLY", ' '.join(inst_attempt_pkgs))
123
104 pn = d.getVar('PN') 124 pn = d.getVar('PN')
105 runtime_mapping_rename("TOOLCHAIN_TARGET_TASK", pn, d) 125 runtime_mapping_rename("TOOLCHAIN_TARGET_TASK", pn, d)
106 runtime_mapping_rename("TOOLCHAIN_TARGET_TASK_ATTEMPTONLY", pn, d) 126 runtime_mapping_rename("TOOLCHAIN_TARGET_TASK_ATTEMPTONLY", pn, d)