Skip to contentSkip to conversation

useradd: Allow overriding USERADDDEPENDS for native

PATCH New Fabrice Coulon 1 participant 1 message Dec 15, 2015

lore
Share & tools
lore
#0 lore raw

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"

---
 meta/classes/useradd.bbclass | 7 ++-----
 1 file changed, 2 insertions(+), 5 deletions(-)
meta/classes/useradd.bbclass +2 -5
index 4577e56..ca31616 100644
@@ -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