From patchwork Sun Nov 6 23:27:32 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: [1/1] useradd.bbclass: fix how RDEPENDS is setup Date: Sun, 06 Nov 2011 23:27:32 -0000 From: Scott Garman X-Patchwork-Id: 14383 Message-Id: <846cb4a0d9fe1a8366f9496b429e6177510b904f.1320621944.git.scott.a.garman@intel.com> To: openembedded-core@lists.openembedded.org Fix bug where only packages named PN included base-passwd in RDEPENDS. This fixes [YOCTO #1727] Signed-off-by: Scott Garman --- meta/classes/useradd.bbclass | 8 +++++++- 1 files changed, 7 insertions(+), 1 deletions(-) diff --git a/meta/classes/useradd.bbclass b/meta/classes/useradd.bbclass index fb70b3e..18e062f 100644 --- a/meta/classes/useradd.bbclass +++ b/meta/classes/useradd.bbclass @@ -4,7 +4,6 @@ USERADDPN ?= "${PN}" # 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" # This preinstall function will be run in two contexts: once for the # native sysroot (as invoked by the useradd_sysroot() wrapper), and @@ -147,6 +146,13 @@ fakeroot python populate_packages_prepend () { preinst += d.getVar('useradd_preinst', True) bb.data.setVar('pkg_preinst_%s' % pkg, preinst, d) + # RDEPENDS setup + rdepends = d.getVar("RDEPENDS_%s" % pkg, True) + if not rdepends: + rdepends = "" + rdepends += " base-passwd shadow" + bb.data.setVar("RDEPENDS_%s" % pkg, rdepends, d) + # We add the user/group calls to all packages to allow any package # to contain files owned by the users/groups defined in the recipe. # The user/group addition code is careful not to create duplicate