All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] useradd.bblass: Simplify target overrides
@ 2016-08-09  1:48 Ulf Magnusson
  2016-08-23 20:19 ` Burton, Ross
  2016-08-23 20:57 ` Mark Hatle
  0 siblings, 2 replies; 4+ messages in thread
From: Ulf Magnusson @ 2016-08-09  1:48 UTC (permalink / raw)
  To: OE-core

The current style might be a leftover from when _class-target did not
exist.

Also change the assignment to SSTATECLEANFUNCS to an append, which makes
more sense. useradd.bbclass is the only user of SSTATECLEANFUNCS as of
writing, so it won't make any functional difference.
---
 meta/classes/useradd.bbclass | 31 ++++++++-----------------------
 1 file changed, 8 insertions(+), 23 deletions(-)

diff --git a/meta/classes/useradd.bbclass b/meta/classes/useradd.bbclass
index 8d51fb5..25526ef 100644
--- a/meta/classes/useradd.bbclass
+++ b/meta/classes/useradd.bbclass
@@ -3,11 +3,7 @@ inherit useradd_base
 # 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 = "${USERADDDEPENDS}"
-USERADDDEPENDS = " base-files shadow-native shadow-sysroot shadow"
-USERADDDEPENDS_class-cross = ""
-USERADDDEPENDS_class-native = ""
-USERADDDEPENDS_class-nativesdk = ""
+DEPENDS_append_class-target = " base-files shadow-native shadow-sysroot shadow"

 # This preinstall function can be run in four different contexts:
 #
@@ -157,28 +153,17 @@ if test "x${STAGING_DIR_TARGET}" != "x"; then
 fi
 }

-SSTATECLEANFUNCS = "userdel_sysroot_sstate"
-SSTATECLEANFUNCS_class-cross = ""
-SSTATECLEANFUNCS_class-native = ""
-SSTATECLEANFUNCS_class-nativesdk = ""
+SSTATECLEANFUNCS_append_class-target = " userdel_sysroot_sstate"

 do_install[prefuncs] += "${SYSROOTFUNC}"
-SYSROOTFUNC = "useradd_sysroot"
-SYSROOTFUNC_class-cross = ""
-SYSROOTFUNC_class-native = ""
-SYSROOTFUNC_class-nativesdk = ""
-SSTATEPREINSTFUNCS += "${SYSROOTPOSTFUNC}"
-SYSROOTPOSTFUNC = "useradd_sysroot_sstate"
-SYSROOTPOSTFUNC_class-cross = ""
-SYSROOTPOSTFUNC_class-native = ""
-SYSROOTPOSTFUNC_class-nativesdk = ""
-
-USERADDSETSCENEDEPS =
"${MLPREFIX}base-passwd:do_populate_sysroot_setscene
pseudo-native:do_populate_sysroot_setscene
shadow-native:do_populate_sysroot_setscene
${MLPREFIX}shadow-sysroot:do_populate_sysroot_setscene"
-USERADDSETSCENEDEPS_class-cross = ""
-USERADDSETSCENEDEPS_class-native = ""
-USERADDSETSCENEDEPS_class-nativesdk = ""
+SYSROOTFUNC_class-target = "useradd_sysroot"
+SYSROOTFUNC = ""
+
+SSTATEPREINSTFUNCS_append_class-target = " useradd_sysroot_sstate"
+
 do_package_setscene[depends] += "${USERADDSETSCENEDEPS}"
 do_populate_sysroot_setscene[depends] += "${USERADDSETSCENEDEPS}"
+USERADDSETSCENEDEPS_class-target =
"${MLPREFIX}base-passwd:do_populate_sysroot_setscene
pseudo-native:do_populate_sysroot_setscene
shadow-native:do_populate_sysroot_setscene
${MLPREFIX}shadow-sysroot:do_populate_sysroot_setscene"

 # Recipe parse-time sanity checks
 def update_useradd_after_parse(d):
-- 
2.5.0


^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [PATCH] useradd.bblass: Simplify target overrides
  2016-08-09  1:48 [PATCH] useradd.bblass: Simplify target overrides Ulf Magnusson
@ 2016-08-23 20:19 ` Burton, Ross
  2016-08-23 20:33   ` Ulf Magnusson
  2016-08-23 20:57 ` Mark Hatle
  1 sibling, 1 reply; 4+ messages in thread
From: Burton, Ross @ 2016-08-23 20:19 UTC (permalink / raw)
  To: Ulf Magnusson; +Cc: OE-core

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

On 9 August 2016 at 02:48, Ulf Magnusson <ulfalizer@gmail.com> wrote:

> The current style might be a leftover from when _class-target did not
> exist.
>

Can you rebase and resend this please?  It's a great patch but for some
reason git isn't happy and refuses to apply it.

Ross

[-- Attachment #2: Type: text/html, Size: 707 bytes --]

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] useradd.bblass: Simplify target overrides
  2016-08-23 20:19 ` Burton, Ross
@ 2016-08-23 20:33   ` Ulf Magnusson
  0 siblings, 0 replies; 4+ messages in thread
From: Ulf Magnusson @ 2016-08-23 20:33 UTC (permalink / raw)
  To: Burton, Ross; +Cc: OE-core

On Tue, Aug 23, 2016 at 10:19 PM, Burton, Ross <ross.burton@intel.com> wrote:
>
> On 9 August 2016 at 02:48, Ulf Magnusson <ulfalizer@gmail.com> wrote:
>>
>> The current style might be a leftover from when _class-target did not
>> exist.
>
>
> Can you rebase and resend this please?  It's a great patch but for some
> reason git isn't happy and refuses to apply it.
>
> Ross

Looks like Gmail's web interface wraps long lines even in plain text mode. So
much for getting lazy. Sorry about that.

Sent a new version with git send-email.

Cheers,
Ulf


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] useradd.bblass: Simplify target overrides
  2016-08-09  1:48 [PATCH] useradd.bblass: Simplify target overrides Ulf Magnusson
  2016-08-23 20:19 ` Burton, Ross
@ 2016-08-23 20:57 ` Mark Hatle
  1 sibling, 0 replies; 4+ messages in thread
From: Mark Hatle @ 2016-08-23 20:57 UTC (permalink / raw)
  To: openembedded-core

On 8/8/16 8:48 PM, Ulf Magnusson wrote:
> The current style might be a leftover from when _class-target did not
> exist.
> 
> Also change the assignment to SSTATECLEANFUNCS to an append, which makes
> more sense. useradd.bbclass is the only user of SSTATECLEANFUNCS as of
> writing, so it won't make any functional difference.

Commit is also missing the 'signed-off-by line'.

I don't have any objection.  original version of this was written before
'class-target' existed, thus all of the duplication... nice to get that cleaned up.

--Mark

> ---
>  meta/classes/useradd.bbclass | 31 ++++++++-----------------------
>  1 file changed, 8 insertions(+), 23 deletions(-)
> 
> diff --git a/meta/classes/useradd.bbclass b/meta/classes/useradd.bbclass
> index 8d51fb5..25526ef 100644
> --- a/meta/classes/useradd.bbclass
> +++ b/meta/classes/useradd.bbclass
> @@ -3,11 +3,7 @@ inherit useradd_base
>  # 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 = "${USERADDDEPENDS}"
> -USERADDDEPENDS = " base-files shadow-native shadow-sysroot shadow"
> -USERADDDEPENDS_class-cross = ""
> -USERADDDEPENDS_class-native = ""
> -USERADDDEPENDS_class-nativesdk = ""
> +DEPENDS_append_class-target = " base-files shadow-native shadow-sysroot shadow"
> 
>  # This preinstall function can be run in four different contexts:
>  #
> @@ -157,28 +153,17 @@ if test "x${STAGING_DIR_TARGET}" != "x"; then
>  fi
>  }
> 
> -SSTATECLEANFUNCS = "userdel_sysroot_sstate"
> -SSTATECLEANFUNCS_class-cross = ""
> -SSTATECLEANFUNCS_class-native = ""
> -SSTATECLEANFUNCS_class-nativesdk = ""
> +SSTATECLEANFUNCS_append_class-target = " userdel_sysroot_sstate"
> 
>  do_install[prefuncs] += "${SYSROOTFUNC}"
> -SYSROOTFUNC = "useradd_sysroot"
> -SYSROOTFUNC_class-cross = ""
> -SYSROOTFUNC_class-native = ""
> -SYSROOTFUNC_class-nativesdk = ""
> -SSTATEPREINSTFUNCS += "${SYSROOTPOSTFUNC}"
> -SYSROOTPOSTFUNC = "useradd_sysroot_sstate"
> -SYSROOTPOSTFUNC_class-cross = ""
> -SYSROOTPOSTFUNC_class-native = ""
> -SYSROOTPOSTFUNC_class-nativesdk = ""
> -
> -USERADDSETSCENEDEPS =
> "${MLPREFIX}base-passwd:do_populate_sysroot_setscene
> pseudo-native:do_populate_sysroot_setscene
> shadow-native:do_populate_sysroot_setscene
> ${MLPREFIX}shadow-sysroot:do_populate_sysroot_setscene"
> -USERADDSETSCENEDEPS_class-cross = ""
> -USERADDSETSCENEDEPS_class-native = ""
> -USERADDSETSCENEDEPS_class-nativesdk = ""
> +SYSROOTFUNC_class-target = "useradd_sysroot"
> +SYSROOTFUNC = ""
> +
> +SSTATEPREINSTFUNCS_append_class-target = " useradd_sysroot_sstate"
> +
>  do_package_setscene[depends] += "${USERADDSETSCENEDEPS}"
>  do_populate_sysroot_setscene[depends] += "${USERADDSETSCENEDEPS}"
> +USERADDSETSCENEDEPS_class-target =
> "${MLPREFIX}base-passwd:do_populate_sysroot_setscene
> pseudo-native:do_populate_sysroot_setscene
> shadow-native:do_populate_sysroot_setscene
> ${MLPREFIX}shadow-sysroot:do_populate_sysroot_setscene"
> 
>  # Recipe parse-time sanity checks
>  def update_useradd_after_parse(d):
> 



^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2016-08-23 20:57 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-08-09  1:48 [PATCH] useradd.bblass: Simplify target overrides Ulf Magnusson
2016-08-23 20:19 ` Burton, Ross
2016-08-23 20:33   ` Ulf Magnusson
2016-08-23 20:57 ` Mark Hatle

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.