All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/1] rm_work.bbclass: inhibit rm_work per recipe
@ 2013-03-13  7:01 Qi.Chen
  2013-03-13  7:01 ` [PATCH 1/1] " Qi.Chen
  0 siblings, 1 reply; 10+ messages in thread
From: Qi.Chen @ 2013-03-13  7:01 UTC (permalink / raw)
  To: openembedded-core; +Cc: qingtao.cao

From: Chen Qi <Qi.Chen@windriver.com>

The following changes since commit 365eb9b5d22208c967dcd91d8ab52faed20f04b5:

  bitbake: bitbake-layers: fix duplicated help info (2013-03-10 04:36:52 +0000)

are available in the git repository at:

  git://git.pokylinux.org/poky-contrib ChenQi/rm_work
  http://git.pokylinux.org/cgit.cgi/poky-contrib/log/?h=ChenQi/rm_work

Chen Qi (1):
  rm_work.bbclass: inhibit rm_work per recipe

 meta/classes/rm_work.bbclass |   13 +++++++++++++
 1 file changed, 13 insertions(+)

-- 
1.7.9.5




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

* [PATCH 1/1] rm_work.bbclass: inhibit rm_work per recipe
  2013-03-13  7:01 [PATCH 0/1] rm_work.bbclass: inhibit rm_work per recipe Qi.Chen
@ 2013-03-13  7:01 ` Qi.Chen
  2013-03-26 17:12   ` Paul Eggleton
  0 siblings, 1 reply; 10+ messages in thread
From: Qi.Chen @ 2013-03-13  7:01 UTC (permalink / raw)
  To: openembedded-core; +Cc: qingtao.cao

From: Chen Qi <Qi.Chen@windriver.com>

Use RM_WORK_WHITELIST to inhibit rm_work per recipe. In this way,
one can use rm_work for the most of the recipes but still keep the
work area for the recipe(s) one is working on.

As an example, the following settings in local.conf will inhibit
rm_work for icu-native, icu and busybox.
    INHERIT += "rm_work"
    RM_WORK_WHITELIST += "icu-native icu busybox"

If we comment out the RM_WORK_WHITELIST line and do a rebuild, the
working area of these recipes will be cleaned up.

[YOCTO #3675]

Signed-off-by: Chen Qi <Qi.Chen@windriver.com>
---
 meta/classes/rm_work.bbclass |   13 +++++++++++++
 1 file changed, 13 insertions(+)

diff --git a/meta/classes/rm_work.bbclass b/meta/classes/rm_work.bbclass
index d3be0be..54287bf 100644
--- a/meta/classes/rm_work.bbclass
+++ b/meta/classes/rm_work.bbclass
@@ -5,6 +5,11 @@
 #
 # INHERIT += "rm_work"
 #
+# To inhibit rm_work for some recipes, specify them in RM_WORK_WHITELIST.
+# For example, in conf/local.conf:
+#
+# RM_WORK_WHITELIST += "icu-native icu busybox"
+#
 
 # Use the completion scheduler by default when rm_work is active
 # to try and reduce disk usage
@@ -14,6 +19,14 @@ RMWORK_ORIG_TASK := "${BB_DEFAULT_TASK}"
 BB_DEFAULT_TASK = "rm_work_all"
 
 do_rm_work () {
+    # If the recipe name is in the RM_WORK_WHITELIST, skip the recipe.
+    for p in ${RM_WORK_WHITELIST}; do
+        if [ "$p" = "${PN}" ]; then
+            bbnote "rm_work: Skipping ${PN} since it is in RM_WORK_WHITELIST"
+            exit 0
+        fi
+    done
+
     cd ${WORKDIR}
     for dir in *
     do
-- 
1.7.9.5




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

* Re: [PATCH 1/1] rm_work.bbclass: inhibit rm_work per recipe
  2013-03-13  7:01 ` [PATCH 1/1] " Qi.Chen
@ 2013-03-26 17:12   ` Paul Eggleton
  2013-03-26 17:15     ` Burton, Ross
                       ` (2 more replies)
  0 siblings, 3 replies; 10+ messages in thread
From: Paul Eggleton @ 2013-03-26 17:12 UTC (permalink / raw)
  To: openembedded-core; +Cc: qingtao.cao

On Wednesday 13 March 2013 15:01:33 Qi.Chen@windriver.com wrote:
> From: Chen Qi <Qi.Chen@windriver.com>
> 
> Use RM_WORK_WHITELIST to inhibit rm_work per recipe. In this way,
> one can use rm_work for the most of the recipes but still keep the
> work area for the recipe(s) one is working on.
> 
> As an example, the following settings in local.conf will inhibit
> rm_work for icu-native, icu and busybox.
>     INHERIT += "rm_work"
>     RM_WORK_WHITELIST += "icu-native icu busybox"
> 
> If we comment out the RM_WORK_WHITELIST line and do a rebuild, the
> working area of these recipes will be cleaned up.

This is a great feature, but I just looked at it and realised that the term 
"whitelist" isn't really correct - this is more of a blacklist.

The question is does it matter? If so we should probably change it now before 
it becomes too hard to change...

Cheers,
Paul

-- 

Paul Eggleton
Intel Open Source Technology Centre



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

* Re: [PATCH 1/1] rm_work.bbclass: inhibit rm_work per recipe
  2013-03-26 17:12   ` Paul Eggleton
@ 2013-03-26 17:15     ` Burton, Ross
  2013-03-26 17:25     ` Phil Blundell
  2013-03-26 17:55     ` Martin Jansa
  2 siblings, 0 replies; 10+ messages in thread
From: Burton, Ross @ 2013-03-26 17:15 UTC (permalink / raw)
  To: Paul Eggleton; +Cc: qingtao.cao, openembedded-core

On 26 March 2013 17:12, Paul Eggleton <paul.eggleton@linux.intel.com> wrote:
> This is a great feature, but I just looked at it and realised that the term
> "whitelist" isn't really correct - this is more of a blacklist.
>
> The question is does it matter? If so we should probably change it now before
> it becomes too hard to change...

A variable called WHITELIST that is actually a blacklist should be
changed asap before we make a release, imho.

Ross



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

* Re: [PATCH 1/1] rm_work.bbclass: inhibit rm_work per recipe
  2013-03-26 17:12   ` Paul Eggleton
  2013-03-26 17:15     ` Burton, Ross
@ 2013-03-26 17:25     ` Phil Blundell
  2013-03-26 17:52       ` Paul Eggleton
  2013-03-26 17:55     ` Martin Jansa
  2 siblings, 1 reply; 10+ messages in thread
From: Phil Blundell @ 2013-03-26 17:25 UTC (permalink / raw)
  To: Paul Eggleton; +Cc: qingtao.cao, openembedded-core

On Tue, 2013-03-26 at 17:12 +0000, Paul Eggleton wrote:
> On Wednesday 13 March 2013 15:01:33 Qi.Chen@windriver.com wrote:
> > From: Chen Qi <Qi.Chen@windriver.com>
> > 
> > Use RM_WORK_WHITELIST to inhibit rm_work per recipe. In this way,
> > one can use rm_work for the most of the recipes but still keep the
> > work area for the recipe(s) one is working on.
> > 
> > As an example, the following settings in local.conf will inhibit
> > rm_work for icu-native, icu and busybox.
> >     INHERIT += "rm_work"
> >     RM_WORK_WHITELIST += "icu-native icu busybox"
> > 
> > If we comment out the RM_WORK_WHITELIST line and do a rebuild, the
> > working area of these recipes will be cleaned up.
> 
> This is a great feature, but I just looked at it and realised that the term 
> "whitelist" isn't really correct - this is more of a blacklist.

This doesn't seem (at the risk of invoking an unintended metaphor)
entirely black or white.  Maybe it should just be "RM_WORK_EXCEPTIONS"
or something.

Of course, you can get the same effect in your distro configuration by
saying:

RM_WORK = "rm_work"
RM_WORK_pn-icu-native = ""
INHERIT += "${RM_WORK}"

so I must admit to being slightly ambivalent about whether the extra
syntactic sugar is all that valuable.  And then again you can always use
rm_old_work instead. :-)

p.





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

* Re: [PATCH 1/1] rm_work.bbclass: inhibit rm_work per recipe
  2013-03-26 17:25     ` Phil Blundell
@ 2013-03-26 17:52       ` Paul Eggleton
  2013-04-09 21:01         ` Phil Blundell
  0 siblings, 1 reply; 10+ messages in thread
From: Paul Eggleton @ 2013-03-26 17:52 UTC (permalink / raw)
  To: Phil Blundell; +Cc: openembedded-core

On Tuesday 26 March 2013 17:25:52 Phil Blundell wrote:
> This doesn't seem (at the risk of invoking an unintended metaphor)
> entirely black or white.  Maybe it should just be "RM_WORK_EXCEPTIONS"
> or something.

"exception" has another meaning to my mind. I've sent out a patch to change it 
to RM_WORK_EXCLUDE.

> Of course, you can get the same effect in your distro configuration by
> saying:
> 
> RM_WORK = "rm_work"
> RM_WORK_pn-icu-native = ""
> INHERIT += "${RM_WORK}"
> 
> so I must admit to being slightly ambivalent about whether the extra
> syntactic sugar is all that valuable.  

True, that works; I think having an explicit variable makes it easier to 
understand what's going on though and is a little harder to typo and have your 
work removed when you didn't want it to be ;)

> And then again you can always use rm_old_work instead. :-)

I'm sure this has come up before, but is rm_old_work something we ought to 
have in OE-Core?

Cheers,
Paul

-- 

Paul Eggleton
Intel Open Source Technology Centre



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

* Re: [PATCH 1/1] rm_work.bbclass: inhibit rm_work per recipe
  2013-03-26 17:12   ` Paul Eggleton
  2013-03-26 17:15     ` Burton, Ross
  2013-03-26 17:25     ` Phil Blundell
@ 2013-03-26 17:55     ` Martin Jansa
  2013-03-26 18:02       ` Paul Eggleton
  2 siblings, 1 reply; 10+ messages in thread
From: Martin Jansa @ 2013-03-26 17:55 UTC (permalink / raw)
  To: Paul Eggleton; +Cc: qingtao.cao, openembedded-core

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

On Tue, Mar 26, 2013 at 05:12:16PM +0000, Paul Eggleton wrote:
> On Wednesday 13 March 2013 15:01:33 Qi.Chen@windriver.com wrote:
> > From: Chen Qi <Qi.Chen@windriver.com>
> > 
> > Use RM_WORK_WHITELIST to inhibit rm_work per recipe. In this way,
> > one can use rm_work for the most of the recipes but still keep the
> > work area for the recipe(s) one is working on.
> > 
> > As an example, the following settings in local.conf will inhibit
> > rm_work for icu-native, icu and busybox.
> >     INHERIT += "rm_work"
> >     RM_WORK_WHITELIST += "icu-native icu busybox"
> > 
> > If we comment out the RM_WORK_WHITELIST line and do a rebuild, the
> > working area of these recipes will be cleaned up.
> 
> This is a great feature, but I just looked at it and realised that the term 
> "whitelist" isn't really correct - this is more of a blacklist.
> 
> The question is does it matter? If so we should probably change it now before 
> it becomes too hard to change...

I got similar question yesterday about BB_HASHBASE_WHITELIST:

'And why is it called "WHITELIST"? Shouldn't things that are excluded be
in a "BLACKLIST"?'

Maybe term WHITELIST isn't correct in both of them, at least they are
consistent as it is now :).

-- 
Martin 'JaMa' Jansa     jabber: Martin.Jansa@gmail.com

[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 205 bytes --]

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

* Re: [PATCH 1/1] rm_work.bbclass: inhibit rm_work per recipe
  2013-03-26 17:55     ` Martin Jansa
@ 2013-03-26 18:02       ` Paul Eggleton
  0 siblings, 0 replies; 10+ messages in thread
From: Paul Eggleton @ 2013-03-26 18:02 UTC (permalink / raw)
  To: Martin Jansa; +Cc: qingtao.cao, openembedded-core

On Tuesday 26 March 2013 18:55:14 Martin Jansa wrote:
> On Tue, Mar 26, 2013 at 05:12:16PM +0000, Paul Eggleton wrote:
> > On Wednesday 13 March 2013 15:01:33 Qi.Chen@windriver.com wrote:
> > > From: Chen Qi <Qi.Chen@windriver.com>
> > > 
> > > Use RM_WORK_WHITELIST to inhibit rm_work per recipe. In this way,
> > > one can use rm_work for the most of the recipes but still keep the
> > > work area for the recipe(s) one is working on.
> > > 
> > > As an example, the following settings in local.conf will inhibit
> > > rm_work for icu-native, icu and busybox.
> > > 
> > >     INHERIT += "rm_work"
> > >     RM_WORK_WHITELIST += "icu-native icu busybox"
> > > 
> > > If we comment out the RM_WORK_WHITELIST line and do a rebuild, the
> > > working area of these recipes will be cleaned up.
> > 
> > This is a great feature, but I just looked at it and realised that the
> > term
> > "whitelist" isn't really correct - this is more of a blacklist.
> > 
> > The question is does it matter? If so we should probably change it now
> > before it becomes too hard to change...
> 
> I got similar question yesterday about BB_HASHBASE_WHITELIST:
> 
> 'And why is it called "WHITELIST"? Shouldn't things that are excluded be
> in a "BLACKLIST"?'
> 
> Maybe term WHITELIST isn't correct in both of them, at least they are
> consistent as it is now :)

You may well be right... BB_HASHBASE_WHITELIST has been around for so long 
though that I don't think we could consider changing it.

Cheers,
Paul

-- 

Paul Eggleton
Intel Open Source Technology Centre



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

* Re: [PATCH 1/1] rm_work.bbclass: inhibit rm_work per recipe
  2013-03-26 17:52       ` Paul Eggleton
@ 2013-04-09 21:01         ` Phil Blundell
  2013-04-09 22:55           ` Martin Jansa
  0 siblings, 1 reply; 10+ messages in thread
From: Phil Blundell @ 2013-04-09 21:01 UTC (permalink / raw)
  To: Paul Eggleton; +Cc: openembedded-core

On Tue, 2013-03-26 at 17:52 +0000, Paul Eggleton wrote:
> I'm sure this has come up before, but is rm_old_work something we ought to 
> have in OE-Core?

Obviously it's not for me to say, but I suspect probably not.  It
requires ${WORKDIR} to follow a particular pattern, which not everybody
will necessarily want, and I don't think you could really argue that it
represents "core" functionality either.

p.





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

* Re: [PATCH 1/1] rm_work.bbclass: inhibit rm_work per recipe
  2013-04-09 21:01         ` Phil Blundell
@ 2013-04-09 22:55           ` Martin Jansa
  0 siblings, 0 replies; 10+ messages in thread
From: Martin Jansa @ 2013-04-09 22:55 UTC (permalink / raw)
  To: Phil Blundell; +Cc: Paul Eggleton, openembedded-core

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

On Tue, Apr 09, 2013 at 10:01:05PM +0100, Phil Blundell wrote:
> On Tue, 2013-03-26 at 17:52 +0000, Paul Eggleton wrote:
> > I'm sure this has come up before, but is rm_old_work something we ought to 
> > have in OE-Core?
> 
> Obviously it's not for me to say, but I suspect probably not.  It
> requires ${WORKDIR} to follow a particular pattern, which not everybody

That pattern is now default in oe-core:
commit 05075cf3138d1c61f5cf4fe0e1a4587acc00c692
Author: Richard Purdie <richard.purdie@linuxfoundation.org>
Date:   Fri Nov 16 15:35:53 2012 +0000

    bitbake.conf/sanity: Separate versions and PN stamp components into
separate directories for WORKDIR and STAMP


> will necessarily want, and I don't think you could really argue that it
> represents "core" functionality either.

I think that in some cases it's more useful then rm_work.

IMHO only missing part is good documentation (or better name) describing
rm_work/rm_work_old difference:

1) rm_work is much better for builds in tmpfs
2) rm_work_old is better then rm_work if you have enough space to keep
1 WORKDIR for each component you're building

-- 
Martin 'JaMa' Jansa     jabber: Martin.Jansa@gmail.com

[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 205 bytes --]

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

end of thread, other threads:[~2013-04-09 23:13 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-03-13  7:01 [PATCH 0/1] rm_work.bbclass: inhibit rm_work per recipe Qi.Chen
2013-03-13  7:01 ` [PATCH 1/1] " Qi.Chen
2013-03-26 17:12   ` Paul Eggleton
2013-03-26 17:15     ` Burton, Ross
2013-03-26 17:25     ` Phil Blundell
2013-03-26 17:52       ` Paul Eggleton
2013-04-09 21:01         ` Phil Blundell
2013-04-09 22:55           ` Martin Jansa
2013-03-26 17:55     ` Martin Jansa
2013-03-26 18:02       ` Paul Eggleton

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.