[OE-core] [PATCH 1/2] useradd.bbclass: handle nativesdk case

Richard Purdie richard.purdie at linuxfoundation.org
Tue Nov 8 14:11:22 UTC 2011


On Tue, 2011-11-08 at 09:41 +0100, Eric Bénard wrote:
> * without this patch, building dbus-nativesdk leads to a missing
> dependency on 'base-passwd-nativesdk'
> This was added by commit 46e6c3fa8034b12d178d605f3f5d7efe69671a13
> * this patch handle the nativesdk case in the class useradd
> * close bug 1702 http://bugzilla.pokylinux.org/show_bug.cgi?id=1702
> * v2 from Scott Garman with Richard Purdie's tricks
> 
> Signed-off-by: Eric Bénard <eric at eukrea.com>
> Signed-off-by: Scott Garman <scott.a.garman at intel.com>
> ---
>  meta/classes/useradd.bbclass |    9 ++++++---
>  1 files changed, 6 insertions(+), 3 deletions(-)
> 
> diff --git a/meta/classes/useradd.bbclass b/meta/classes/useradd.bbclass
> index 0f9b84c..6c933e1 100644
> --- a/meta/classes/useradd.bbclass
> +++ b/meta/classes/useradd.bbclass
> @@ -3,7 +3,9 @@ USERADDPN ?= "${PN}"
>  # 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 = " base-passwd shadow-native shadow-sysroot"
> +DEPENDS_append = "${USERADDDEPENDS}"
> +USERADDDEPENDS = " base-passwd shadow-native shadow-sysroot"
> +USERADDDEPENDS_virtclass-nativesdk = ""
>  
>  # This preinstall function will be run in two contexts: once for the
>  # native sysroot (as invoked by the useradd_sysroot() wrapper), and
> @@ -95,8 +97,9 @@ useradd_sysroot_sstate () {
>  	fi
>  }
>  
> -do_install[prefuncs] += "useradd_sysroot"
> -SSTATEPOSTINSTFUNCS += "useradd_sysroot_sstate"
> +do_install[prefuncs] += "${SYSROOTFUNC}"
> +SYSROOTFUNC = "useradd_sysroot"
> +SYSROOTFUNC_virtclass-nativesdk = ""

Nearly but you're missing a:

SSTATEPOSTINSTFUNCS += "${SYSROOTPOSTFUNC}"
SYSROOTPOSTFUNC = "useradd_sysroot_sstate"
SYSROOTPOSTFUNC_virtclass-nativesdk = ""

Cheers,

Richard





More information about the Openembedded-core mailing list