Skip to contentSkip to conversation

useradd.bbclass: Add explict setscene dependencies to ensure correct ordering of setscene tasks

PATCH New Richard Purdie 1 participant 1 message Jan 26, 2012

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 useradd.bbclass: Add explict setscene dependencies to ensure correct ordering of setscene tasks

This is the final piece of fixing the races in the useradd class by ensuring base-passwd, shadow-native and shadow-sysroot are installed before sstate packages which use useradd.

[YOCTO #1721]

---

NB: This patch depends on a change in bitbake to work but is harmless without that change, just won't fix the race.

meta/classes/useradd.bbclass +2 -0
index 6ee575e..9677fe2 100644
@@ -111,6 +111,8 @@ SYSROOTPOSTFUNC = "useradd_sysroot_sstate"
 SYSROOTPOSTFUNC_virtclass-native = ""
 SYSROOTPOSTFUNC_virtclass-nativesdk = ""
 
+do_package_setscene[depends] = "base-passwd:do_populate_sysroot_setscene shadow-native:do_populate_sysroot_setscene shadow-sysroot:do_populate_sysroot_setscene"
+
 # Recipe parse-time sanity checks
 def update_useradd_after_parse(d):
 	useradd_packages = d.getVar('USERADD_PACKAGES', True)