Skip to contentSkip to conversation

useradd.bbclass: fix how RDEPENDS is setup [v3]

PATCH Applied Scott Garman 2 participants 5 messages Nov 7, 2011 – Nov 8, 2011

lore
Share & tools
lore
#0 lore raw

cover useradd.bbclass: fix how RDEPENDS is setup [v3]

Fix bug where only packages named PN included base-passwd in RDEPENDS.

This fixes [YOCTO #1727]

Including one more tweak based on feedback from Richard.

The following changes since commit e3c003282afb93ec52882496400b042620ab00ef:

rt-tests: update to 0.83 (2011-11-04 15:43:19 +0000)

are available in the git repository at:
git://git.pokylinux.org/poky-contrib sgarman/useradd-rdepends-final
http://git.pokylinux.org/cgit.cgi/poky-contrib/log/?h=sgarman/useradd-rdepends-final

Scott Garman (1):
useradd.bbclass: fix how RDEPENDS is setup

 meta/classes/useradd.bbclass |    6 +++++-
 1 files changed, 5 insertions(+), 1 deletions(-)
Signature · 1 line
1.7.5.4
#1 lore raw

PATCH 1/1 useradd.bbclass: fix how RDEPENDS is setup

Fix bug where only packages named PN included base-passwd in RDEPENDS.

This fixes [YOCTO #1727]

---
 meta/classes/useradd.bbclass |    6 +++++-
 1 files changed, 5 insertions(+), 1 deletions(-)
meta/classes/useradd.bbclass +5 -1
index fb70b3e..0f9b84c 100644
@@ -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
Signature · 1 line
1.7.5.4
#2 lore raw

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

Quoted 9 lines · Scott Garman

Fix bug where only packages named PN included base-passwd in RDEPENDS.

This fixes [YOCTO #1727]

---
 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

#3 lore raw

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

Quoted 11 lines · Richard Purdie
Quoted 9 lines · Scott Garman

Fix bug where only packages named PN included base-passwd in RDEPENDS.

This fixes [YOCTO #1727]

---
  meta/classes/useradd.bbclass |    6 +++++-
  1 files changed, 5 insertions(+), 1 deletions(-)
Quoted 4 lines

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

Signature · 3 lines
Scott Garman
Embedded Linux Engineer - Yocto Project
Intel Open Source Technology Center
#4 lore raw

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

Quoted 12 lines · Scott Garman
Quoted 11 lines · Richard Purdie
Quoted 9 lines · Scott Garman

Fix bug where only packages named PN included base-passwd in RDEPENDS.

This fixes [YOCTO #1727]

---
  meta/classes/useradd.bbclass |    6 +++++-
  1 files changed, 5 insertions(+), 1 deletions(-)
Quoted 8 lines
Quoted 4 lines

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