[prev in list] [next in list] [prev in thread] [next in thread]
List: openembedded-core
Subject: [OE-core][dunfell 15/41] insane: check for missing update-alternatives inherit
From: "Steve Sakoman" <steve () sakoman ! com>
Date: 2020-09-30 22:11:17
Message-ID: 0845f6b09716d927c586be5be878d08fa53b31d1.1601502610.git.steve () sakoman ! com
[Download RAW message or body]
From: Andrey Zhizhikin <andrey.z@gmail.com>
Add a package QA check to test if the recipe sets ALTERNATIVE variable
for any of its packages, and does not inherit update-alternatives class.
This causes the do_rootfs to fail since a proper alternative cannot be
created.
Signed-off-by: Andrey Zhizhikin <andrey.z@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
(cherry picked from commit 24b5ccc76d5660fac38ac5346666380a0ecce359)
Signed-off-by: Steve Sakoman <steve@sakoman.com>
---
meta/classes/insane.bbclass | 9 +++++++++
1 file changed, 9 insertions(+)
diff --git a/meta/classes/insane.bbclass b/meta/classes/insane.bbclass
index 5b18fadd60..601b6b65bf 100644
--- a/meta/classes/insane.bbclass
+++ b/meta/classes/insane.bbclass
@@ -29,6 +29,7 @@ WARN_QA ?= "ldflags useless-rpaths rpaths staticdev libdir \
xorg-driver-abi \ unknown-configure-option symlink-to-sysroot multilib \
invalid-packageconfig host-user-contaminated uppercase-pn patch-fuzz \
mime mime-xdg unlisted-pkg-lics unhandled-features-check \
+ missing-update-alternatives \
"
ERROR_QA ?= "dev-so debug-deps dev-deps debug-files arch pkgconfig la \
perms dep-cmp pkgvarcheck perm-config perm-line perm-link \
@@ -988,6 +989,14 @@ def package_qa_check_unhandled_features_check(pn, d, messages):
if var_set:
package_qa_handle_error("unhandled-features-check", "%s: recipe doesn't \
inherit features_check" % pn, d)
+QARECIPETEST[missing-update-alternatives] = \
"package_qa_check_missing_update_alternatives" +def \
package_qa_check_missing_update_alternatives(pn, d, messages): + # Look at all \
packages and find out if any of those sets ALTERNATIVE variable + # without \
inheriting update-alternatives class + for pkg in (d.getVar('PACKAGES') or \
'').split(): + if d.getVar('ALTERNATIVE_%s' % pkg) and not \
bb.data.inherits_class('update-alternatives', d): + \
package_qa_handle_error("missing-update-alternatives", "%s: recipe defines \
ALTERNATIVE_%s but doesn't inherit update-alternatives. This might fail during \
do_rootfs later!" % (pn, pkg), d) +
# The PACKAGE FUNC to scan each package
python do_package_qa () {
import subprocess
--
2.17.1
-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#142961): https://lists.openembedded.org/g/openembedded-core/message/142961
Mute This Topic: https://lists.openembedded.org/mt/77228426/4454766
Group Owner: openembedded-core+owner@lists.openembedded.org
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub [openembedded-core@marc.info]
-=-=-=-=-=-=-=-=-=-=-=-
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic