[gnome-continuous-yocto/gnomeostree-3.28-rocko: 7157/8267] populate_sdk_base.bbclass: add handling package exclusions to do_populate_sdk
- From: Emmanuele Bassi <ebassi src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-continuous-yocto/gnomeostree-3.28-rocko: 7157/8267] populate_sdk_base.bbclass: add handling package exclusions to do_populate_sdk
- Date: Sun, 17 Dec 2017 05:51:14 +0000 (UTC)
commit 3c901c59339a41d75417b0b7b9f8163f0d27ecdf
Author: Yi Zhao <yi zhao windriver com>
Date: Fri Aug 11 09:30:43 2017 +0800
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>
meta/classes/populate_sdk_base.bbclass | 20 ++++++++++++++++++++
1 files changed, 20 insertions(+), 0 deletions(-)
---
diff --git a/meta/classes/populate_sdk_base.bbclass b/meta/classes/populate_sdk_base.bbclass
index 0354ee1..424c63c 100644
--- a/meta/classes/populate_sdk_base.bbclass
+++ b/meta/classes/populate_sdk_base.bbclass
@@ -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)
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]