mirror of
https://git.yoctoproject.org/poky
synced 2026-05-30 00:20:08 +00:00
insane: check for missing update-alternatives inherit
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. (From OE-Core rev: 24b5ccc76d5660fac38ac5346666380a0ecce359) Signed-off-by: Andrey Zhizhikin <andrey.z@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
This commit is contained in:
committed by
Richard Purdie
parent
c433641a05
commit
e08adbd180
@@ -27,6 +27,7 @@ WARN_QA ?= " libdir xorg-driver-abi \
|
|||||||
infodir build-deps src-uri-bad symlink-to-sysroot multilib \
|
infodir build-deps src-uri-bad symlink-to-sysroot multilib \
|
||||||
invalid-packageconfig host-user-contaminated uppercase-pn patch-fuzz \
|
invalid-packageconfig host-user-contaminated uppercase-pn patch-fuzz \
|
||||||
mime mime-xdg unlisted-pkg-lics unhandled-features-check \
|
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 \
|
ERROR_QA ?= "dev-so debug-deps dev-deps debug-files arch pkgconfig la \
|
||||||
perms dep-cmp pkgvarcheck perm-config perm-line perm-link \
|
perms dep-cmp pkgvarcheck perm-config perm-line perm-link \
|
||||||
@@ -989,6 +990,14 @@ def package_qa_check_unhandled_features_check(pn, d, messages):
|
|||||||
if var_set:
|
if var_set:
|
||||||
package_qa_handle_error("unhandled-features-check", "%s: recipe doesn't inherit features_check" % pn, d)
|
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
|
# The PACKAGE FUNC to scan each package
|
||||||
python do_package_qa () {
|
python do_package_qa () {
|
||||||
import subprocess
|
import subprocess
|
||||||
|
|||||||
Reference in New Issue
Block a user