All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Eric Bénard" <eric@eukrea.com>
To: scott.a.garman@intel.com
Cc: Patches and discussions about the oe-core layer
	<openembedded-core@lists.openembedded.org>
Subject: Re: useradd changes to dbus, base-passwd
Date: Sun, 06 Nov 2011 21:31:10 +0100	[thread overview]
Message-ID: <4EB6EE8E.4000401@eukrea.com> (raw)
In-Reply-To: <4EA83ACB.4040001@intel.com>

[-- Attachment #1: Type: text/plain, Size: 588 bytes --]

Hi Scott,

Le 26/10/2011 18:52, Scott Garman a écrit :
> Grepping through our classes, it looks like I can detect the nativesdk within
> useradd.bbclass by checking for bb.data.inherits_class('nativesdk', d).
>
> I've filed a bug for this and will develop a patch to ensure useradd is
> becomes a no-op for nativesdk builds:
>
> http://bugzilla.pokylinux.org/show_bug.cgi?id=1702
>
here is a patch tentative which allowed me to compile meta-toolchain-qte.
Is that the right way to solve the problem (in which case I'll submit the 
patch with comment & sob)?

Thanks
Eric

[-- Attachment #2: fix_dbusnativesdk.patch --]
[-- Type: text/plain, Size: 2047 bytes --]

diff --git a/meta/classes/useradd.bbclass b/meta/classes/useradd.bbclass
index fb70b3e..cbcc9e9 100644
--- a/meta/classes/useradd.bbclass
+++ b/meta/classes/useradd.bbclass
@@ -3,9 +3,16 @@ 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"
 RDEPENDS_${USERADDPN}_append = " base-passwd shadow"
 
+def useradd_dep_append(d):
+	deps = ' '
+	if not bb.data.inherits_class('nativesdk', d):
+		deps = ' shadow-native shadow-sysroot base-passwd'
+	return deps
+
+DEPENDS_append = "${@useradd_dep_append(d)}"
+
 # This preinstall function will be run in two contexts: once for the
 # native sysroot (as invoked by the useradd_sysroot() wrapper), and
 # also as the preinst script in the target package.
@@ -96,8 +103,17 @@ useradd_sysroot_sstate () {
 	fi
 }
 
-do_install[prefuncs] += "useradd_sysroot"
-SSTATEPOSTINSTFUNCS += "useradd_sysroot_sstate"
+
+python () {
+	if not bb.data.inherits_class('nativesdk', d):
+		funcs = bb.data.getVarFlag('do_install', 'prefuncs', d) or ""
+		funcs += 'useradd_sysroot'
+		bb.data.setVarFlag('do_install', 'prefuncs', funcs, d)
+		d.setVar('SSTATEPOSTINSTFUNCS', (bb.data.getVar('SSTATEPOSTINSTFUNCS', d, True) or "").join("useradd_sysroot_sstate"))
+}
+

 # Recipe parse-time sanity checks
 def update_useradd_after_parse(d):
diff --git a/meta/recipes-core/dbus/dbus.inc b/meta/recipes-core/dbus/dbus.inc
index caa781c..99b2fc7 100644
--- a/meta/recipes-core/dbus/dbus.inc
+++ b/meta/recipes-core/dbus/dbus.inc
@@ -105,4 +105,8 @@ do_install_virtclass-native() {
 	# dbus-glib-native and dbus-glib need this xml file
 	./bus/dbus-daemon --introspect > ${STAGING_DATADIR_NATIVE}/dbus/dbus-bus-introspect.xml
 }
+
+do_install_virtclass-nativesdk() {
+	autotools_do_install
+}
 BBCLASSEXTEND = "native nativesdk"

  reply	other threads:[~2011-11-07  0:16 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-10-26  1:34 useradd changes to dbus, base-passwd James Limbouris
2011-10-26  3:37 ` James Limbouris
2011-10-26 15:23   ` Mark Hatle
2011-10-26 16:52     ` Scott Garman
2011-11-06 20:31       ` Eric Bénard [this message]
2011-11-06 23:16         ` Scott Garman
2011-11-07  8:36           ` Eric Bénard
2011-11-07 18:24             ` Scott Garman
2011-11-07 21:11               ` [PATCH 1/2] useradd.bbclass: handle nativesdk case Eric Bénard
2011-11-07 21:11                 ` [PATCH 2/2] dbus: fix install for virtclass-nativesdk Eric Bénard
2011-11-07 21:32                   ` Scott Garman
2011-11-07 21:32                 ` [PATCH 1/2] useradd.bbclass: handle nativesdk case Scott Garman
2011-11-07 23:47                 ` Scott Garman
2011-11-08  8:41                   ` Eric Bénard
2011-11-08  8:41                     ` [PATCH 2/2] dbus: fix install for virtclass-nativesdk Eric Bénard
2011-11-08 14:19                       ` Richard Purdie
2011-11-08 14:11                     ` [PATCH 1/2] useradd.bbclass: handle nativesdk case Richard Purdie
2011-11-08 15:46                       ` [PATCH] " Eric Bénard
2011-11-08 16:30                         ` Richard Purdie
2011-11-08  8:45                   ` [PATCH 1/2] " Eric Bénard

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4EB6EE8E.4000401@eukrea.com \
    --to=eric@eukrea.com \
    --cc=openembedded-core@lists.openembedded.org \
    --cc=scott.a.garman@intel.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.