[yocto] How to use same user in two recipes?

Maxin B. John maxin.john at intel.com
Wed Oct 11 04:37:31 PDT 2017


Hi Fabien,

On Wed, 2017-10-11 at 13:06 +0300, Henrik Lindblom wrote:
>> I think you'll want RDEPENDS instead of DEPENDS in your recipe. DEPENDS implies build time
>> dependencies (e.g. libraries) while RDEPENDS actually gets the component installed as a runtime
>> dependency.
>> 

>Thanks Henrik
>I tried to add RDEPENDS too without success. The problem is that users and groups are not installed
>IIUC.

Could you apply this patch and see if it helps here ?

Best Regards,
Maxin
-------------- next part --------------
>From 36c75e348cd5bb3cff242783550b925623492297 Mon Sep 17 00:00:00 2001
From: "Maxin B. John" <maxin.john at intel.com>
Date: Wed, 20 Sep 2017 18:05:49 +0300
Subject: [PATCH] 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]

Signed-off-by: Maxin B. John <maxin.john at intel.com>
---
 meta/classes/sstate.bbclass | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/meta/classes/sstate.bbclass b/meta/classes/sstate.bbclass
index 2a54993..e30fbe1 100644
--- a/meta/classes/sstate.bbclass
+++ b/meta/classes/sstate.bbclass
@@ -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



More information about the yocto mailing list