Patchwork [1/1] useradd.bbclass: fix how RDEPENDS is setup

login
register
mail settings
Submitter Scott Garman
Date Nov. 7, 2011, 11:36 p.m.
Message ID <5a66d5c0a8546166f76fb41cb48c033f8d6ed61f.1320708905.git.scott.a.garman@intel.com>
Download mbox | patch
Permalink /patch/14455/
State Accepted
Commit 2c55d51afd71d708a54afc8377e10c4f80f810e3
Headers show

Comments

Scott Garman - Nov. 7, 2011, 11:36 p.m.
Fix bug where only packages named PN included base-passwd in
RDEPENDS.

This fixes [YOCTO #1727]

Signed-off-by: Scott Garman <scott.a.garman@intel.com>
---
 meta/classes/useradd.bbclass |    6 +++++-
 1 files changed, 5 insertions(+), 1 deletions(-)
Richard Purdie - Nov. 8, 2011, 2:09 p.m.
On Mon, 2011-11-07 at 15:36 -0800, Scott Garman wrote:
> Fix bug where only packages named PN included base-passwd in
> RDEPENDS.
> 
> This fixes [YOCTO #1727]
> 
> Signed-off-by: Scott Garman <scott.a.garman@intel.com>
> ---
>  meta/classes/useradd.bbclass |    6 +++++-
>  1 files changed, 5 insertions(+), 1 deletions(-)

Merged to master, thanks.

As an aside, does the USERADDPN variable serve any purpose now or can we
remove it?

Cheers,

Richard
Scott Garman - Nov. 8, 2011, 4:24 p.m.
On 11/08/2011 06:09 AM, Richard Purdie wrote:
> On Mon, 2011-11-07 at 15:36 -0800, Scott Garman wrote:
>> Fix bug where only packages named PN included base-passwd in
>> RDEPENDS.
>>
>> This fixes [YOCTO #1727]
>>
>> Signed-off-by: Scott Garman<scott.a.garman@intel.com>
>> ---
>>   meta/classes/useradd.bbclass |    6 +++++-
>>   1 files changed, 5 insertions(+), 1 deletions(-)
>
> Merged to master, thanks.
>
> As an aside, does the USERADDPN variable serve any purpose now or can we
> remove it?

Indeed it does. I'll prepare a patch for that and also to remove the 
temporary workaround USERADDPN entry Koen added to the avahi recipe once 
you've accepted Eric's other patch.

Scott
Richard Purdie - Nov. 8, 2011, 4:58 p.m.
On Tue, 2011-11-08 at 08:24 -0800, Scott Garman wrote:
> On 11/08/2011 06:09 AM, Richard Purdie wrote:
> > On Mon, 2011-11-07 at 15:36 -0800, Scott Garman wrote:
> >> Fix bug where only packages named PN included base-passwd in
> >> RDEPENDS.
> >>
> >> This fixes [YOCTO #1727]
> >>
> >> Signed-off-by: Scott Garman<scott.a.garman@intel.com>
> >> ---
> >>   meta/classes/useradd.bbclass |    6 +++++-
> >>   1 files changed, 5 insertions(+), 1 deletions(-)
> >
> > Merged to master, thanks.
> >
> > As an aside, does the USERADDPN variable serve any purpose now or can we
> > remove it?
> 
> Indeed it does. I'll prepare a patch for that and also to remove the 
> temporary workaround USERADDPN entry Koen added to the avahi recipe once 
> you've accepted Eric's other patch.

Its in and thanks :)

Cheers,

Richard

Patch

diff --git a/meta/classes/useradd.bbclass b/meta/classes/useradd.bbclass
index fb70b3e..0f9b84c 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,11 @@  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) or ""
+		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