mirror of
https://git.yoctoproject.org/poky
synced 2026-05-30 00:20:08 +00:00
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>
This commit is contained in:
@@ -101,6 +101,26 @@ def populate_sdk_common(d):
|
||||
from oe.sdk import populate_sdk
|
||||
from oe.manifest import create_manifest, Manifest
|
||||
|
||||
# Handle package exclusions
|
||||
excl_pkgs = (d.getVar("PACKAGE_EXCLUDE") or "").split()
|
||||
inst_pkgs = (d.getVar("PACKAGE_INSTALL") or "").split()
|
||||
inst_attempt_pkgs = (d.getVar("PACKAGE_INSTALL_ATTEMPTONLY") or "").split()
|
||||
|
||||
d.setVar('PACKAGE_INSTALL_ORIG', ' '.join(inst_pkgs))
|
||||
d.setVar('PACKAGE_INSTALL_ATTEMPTONLY', ' '.join(inst_attempt_pkgs))
|
||||
|
||||
for pkg in excl_pkgs:
|
||||
if pkg in inst_pkgs:
|
||||
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))
|
||||
inst_pkgs.remove(pkg)
|
||||
|
||||
if pkg in inst_attempt_pkgs:
|
||||
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))
|
||||
inst_attempt_pkgs.remove(pkg)
|
||||
|
||||
d.setVar("PACKAGE_INSTALL", ' '.join(inst_pkgs))
|
||||
d.setVar("PACKAGE_INSTALL_ATTEMPTONLY", ' '.join(inst_attempt_pkgs))
|
||||
|
||||
pn = d.getVar('PN')
|
||||
runtime_mapping_rename("TOOLCHAIN_TARGET_TASK", pn, d)
|
||||
runtime_mapping_rename("TOOLCHAIN_TARGET_TASK_ATTEMPTONLY", pn, d)
|
||||
|
||||
Reference in New Issue
Block a user