]> git.ipfire.org Git - thirdparty/openembedded/openembedded-core-contrib.git/commitdiff
useradd.bbclass: Show a deprecation warning if GROUPMEMS_PARAM is used
authorPeter Kjellerstedt <peter.kjellerstedt@axis.com>
Tue, 26 May 2026 12:44:19 +0000 (14:44 +0200)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Thu, 28 May 2026 10:21:19 +0000 (11:21 +0100)
Tell the user that they should switch to using USERMOD_PARAM instead of
GROUPMEMS_PARAM.

[YOCTO#16277]

Signed-off-by: Peter Kjellerstedt <peter.kjellerstedt@axis.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
meta/classes/useradd.bbclass

index 55393d38f7cc581ce46d9d635a57c01aa491a8bc..d6e1df2bd62029826cac59249166ab03a4d4688c 100644 (file)
@@ -308,6 +308,15 @@ fakeroot python populate_packages:prepend() {
             update_useradd_package(pkg)
 }
 
+do_recipe_qa[postfuncs] += "recipe_qa_deprecate_groupmems_param"
+python recipe_qa_deprecate_groupmems_param() {
+    useradd_packages = d.getVar('USERADD_PACKAGES') or ""
+    for pkg in useradd_packages.split():
+        if d.getVar(f"GROUPMEMS_PARAM:{pkg}"):
+            bb.warn("The GROUPMEMS_PARAM variable is deprecated. Please use USERMOD_PARAM instead.")
+            return
+}
+
 # Use the following to extend the useradd with custom functions
 USERADDEXTENSION ?= ""