Skip to contentSkip to conversation

sstate.bbclass: provide an exception for useradd scenario

PATCH In review Maxin B. John 2 participants 2 messages Oct 12, 2017

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 sstate.bbclass: provide an exception for useradd scenario

Packages, which depend on users/groups created from other packages, needs "shadow-native" as a build time dependency. So, add an exception to the "shadow-native" from otherwise discarded native/cross tools dependency.

Fixes [YOCTO #11960]

---
 meta/classes/sstate.bbclass | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
meta/classes/sstate.bbclass +2 -1
index 2a54993..e30fbe1 100644
@@ -967,7 +967,8 @@ def setscene_depvalid(task, taskdependees, notneeded, d, log=None):
             if isNativeCross(taskdependees[dep][0]):
                 return False
             # Native/cross tools depended upon by target sysroot are not needed
-            if isNativeCross(taskdependees[task][0]):
+            # Add an exception for shadow-native as required by useradd.bbclass
+            if isNativeCross(taskdependees[task][0]) and taskdependees[task][0] != 'shadow-native':
                 continue
             # Target populate_sysroot need their dependencies
             return False
Signature · 1 line
2.4.0
Tested-by on v1 1/1
#1 lore raw

I test this patch fix and it fix user issue on my project.

Quoted 8 lines · Maxin B. John

Packages, which depend on users/groups created from other packages, needs "shadow-native" as a build time dependency. So, add an exception to the "shadow-native" from otherwise discarded native/cross tools dependency.

Fixes [YOCTO #11960]

Quoted 22 lines

---
 meta/classes/sstate.bbclass | 3 ++-

 1 file changed, 2 insertions(+), 1 deletion(-)
meta/classes/sstate.bbclass +0 -0
index 2a54993..e30fbe1 100644
@@ -967,7 +967,8 @@ def setscene_depvalid(task, taskdependees, notneeded, d, log=None):

             if isNativeCross(taskdependees[dep][0]):
                 return False
             # Native/cross tools depended upon by target sysroot are not needed -            if isNativeCross(taskdependees[task][0]):
+            # Add an exception for shadow-native as required by useradd.bbclass +            if isNativeCross(taskdependees[task][0]) and taskdependees[task][0] != 'shadow- native':
                 continue
             # Target populate_sysroot need their dependencies
             return False
--
2.4.0