useradd: Allow overriding USERADDDEPENDS for native
PATCH 1/1 useradd: Allow overriding USERADDDEPENDS for native
If I want to be able to override USERADDDEPENDS from another bbclass, I need to give USERADDDEPENDS a default value and use DEPENDS_append for the different types of class. This is one example of what I need to be able to do in another .bbclass:
USERADDDEPENDS_class-native = " base-files-native base-passwd-native... DEPENDS_append_class-native = " pseudo-native"
Signed-off-by Fabrice Coulon <[email protected]>
--- meta/classes/useradd.bbclass | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-)
meta/classes/useradd.bbclass +2 -5
@@ -3,11 +3,8 @@ inherit useradd_base # base-passwd-cross provides the default passwd and group files in the # target sysroot, and shadow -native and -sysroot provide the utilities # and support files needed to add and modify user and group accounts -DEPENDS_append = "${USERADDDEPENDS}" -USERADDDEPENDS = " base-files shadow-native shadow-sysroot shadow" -USERADDDEPENDS_class-cross = "" -USERADDDEPENDS_class-native = "" -USERADDDEPENDS_class-nativesdk = "" +USERADDDEPENDS ?= " base-files shadow-native shadow-sysroot shadow" +DEPENDS_append_class-target = "${USERADDDEPENDS}" # This preinstall function can be run in four different contexts: #
Signature · 1 line
1.9.1