Openembedded Bitbake Development
 help / color / mirror / Atom feed
From: Richard Purdie <richard.purdie@linuxfoundation.org>
To: Jason Wessel <jason.wessel@windriver.com>
Cc: bitbake-devel@lists.openembedded.org
Subject: Re: [PATCH v4 14/18] runqueue.py, build.py: Invalidate setscene tasks based on do_unpack stamps
Date: Mon, 11 Jun 2012 14:52:09 +0100	[thread overview]
Message-ID: <1339422729.28854.3.camel@ted> (raw)
In-Reply-To: <1339162913-23759-15-git-send-email-jason.wessel@windriver.com>

On Fri, 2012-06-08 at 08:41 -0500, Jason Wessel wrote:
> If you have a fully populated sstate cache and have used it to
> execute a build, it is not possible to invalidate repackage
> an intermediate build after you have forced a compiled
> 
> Example when you have build from a complete sstate cache build:
>   bitbake core-image-sato
>   bitbake -c patch acl
>      *** Make some changes to the C files for experimentation.
>   bitbake -f -c compile acl
>   bitbake acl
> 
> The bitbake will refuse to build the acl package at this
> point and instead keep populating it from the sstate.  Using
> the cleanstate is no longer a good option because it will
> also erase the scratch area.
> 
> Signed-off-by: Jason Wessel <jason.wessel@windriver.com>
> ---
>  lib/bb/build.py    |    8 ++++++++
>  lib/bb/runqueue.py |   14 ++++++++++++++
>  2 files changed, 22 insertions(+)
> 
> diff --git a/lib/bb/build.py b/lib/bb/build.py
> index fb61b00..18c28aa 100644
> --- a/lib/bb/build.py
> +++ b/lib/bb/build.py
> @@ -463,6 +463,14 @@ def del_stamp(task, d, file_name = None):
>      stamp = stamp_internal(task, d, file_name)
>      bb.utils.remove(stamp)
>  
> +def exists_stamp(task, d, file_name = None):
> +    """
> +    Removes a stamp for a given task
> +    (d can be a data dict or dataCache)
> +    """
> +    stamp = stamp_internal(task, d, file_name)
> +    return os.path.exists(stamp)
> +
>  def stampfile(taskname, d, file_name = None):
>      """
>      Return the stamp for a given task
> diff --git a/lib/bb/runqueue.py b/lib/bb/runqueue.py
> index da3fdf9..6c802af 100644
> --- a/lib/bb/runqueue.py
> +++ b/lib/bb/runqueue.py
> @@ -718,6 +718,20 @@ class RunQueueData:
>                      for dep in self.runq_depends[task]:
>                          procdep.append(self.taskData.fn_index[self.runq_fnid[dep]] + "." + self.runq_task[dep])
>                      self.runq_hash[task] = bb.parse.siggen.get_taskhash(self.taskData.fn_index[self.runq_fnid[task]], self.runq_task[task], procdep, self.dataCache)
> +        try:
> +            new_setscene = []
> +            for task in self.runq_setscene:
> +                try:
> +                    fn = self.taskData.fn_index[self.rq.rqdata.runq_fnid[task]]
> +                    if bb.build.exists_stamp("do_unpack", self.dataCache, fn):
> +                        logger.debug(2, 'Removing task %s from queue because do_unpack exists', task)
> +                    else:
> +                        new_setscene.append(task)
> +                except:
> +                    logger.debug(2, 'Failed do_unpack check for %s', task)
> +            self.runq_setscene = new_setscene
> +        except:
> +            logger.debug(2, 'Failed to update runq_setscene')

We've gone to quite a bit of trouble to keep knowledge of the specific
tasks out of bitbake. I've noticed a few of your patches are "blurring"
the separation between bitbake and the metadata.

Here, bitbake shouldn't have knowledge of "unpack" or why its special.
I'd also argue its not in fact special and there are probably other
"force" scenarios which would break with a similar problem even with
this patch. I agree there is a problem here but we need to fix it in a
more generic way. There is already a bug open on this kind of problem
(#2256).

Cheers,

Richard








  reply	other threads:[~2012-06-11 14:02 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-06-08 13:41 [PATCH v4 0/18] Multiplexed task logs / bitbake fixes for fetch2 / stamp features Jason Wessel
2012-06-08 13:41 ` [PATCH v4 01/18] process.py, build.py: Fix log truncation problems with flush() Jason Wessel
2012-06-08 13:41 ` [PATCH v4 02/18] knotty: Extend knotty to support "real time" log tail for tasks Jason Wessel
2012-06-08 13:41 ` [PATCH v4 03/18] knotty: Add the ability to dynamically select loglevel from stdin Jason Wessel
2012-06-08 13:41 ` [PATCH v4 04/18] msg.py, knotty.py: Allow dynamic toggle of the debug log level Jason Wessel
2012-06-08 13:41 ` [PATCH v4 05/18] knotty.py: Add the ability to spawn screen directly from knotty with OE_TERMINAL=screen_inline Jason Wessel
2012-06-08 13:41 ` [PATCH v4 06/18] fetch2: Fix missing output from stderr in fetcher logs Jason Wessel
2012-06-08 13:41 ` [PATCH v4 07/18] fetch2/git.py: Use local download dir, when using an external read-only GITDIR Jason Wessel
2012-06-08 13:41 ` [PATCH v4 08/18] knotty.py, knotty2, py: Flush and update footer on dynamic log level change Jason Wessel
2012-06-08 13:41 ` [PATCH v4 09/18] knotty2.py: Fix knotty2 to report something other than 0 of 0 for setscene tasks Jason Wessel
2012-06-08 13:41 ` [PATCH v4 10/18] knotty2: Properly adjust for lines longer than terminal size Jason Wessel
2012-06-08 13:41 ` [PATCH v4 11/18] knotty: Merge knotty2 functionality into knotty Jason Wessel
2012-06-08 13:41 ` [PATCH v4 12/18] knotty: Add ability to dynamically toggle log location Jason Wessel
2012-06-08 13:41 ` [PATCH v4 13/18] bitbake, runqueue: Add --no-setscene to skip all setscene tasks Jason Wessel
2012-06-08 13:41 ` [PATCH v4 14/18] runqueue.py, build.py: Invalidate setscene tasks based on do_unpack stamps Jason Wessel
2012-06-11 13:52   ` Richard Purdie [this message]
2012-06-14  3:00     ` Jason Wessel
2012-06-08 13:41 ` [PATCH v4 15/18] bitbake, runqueue.py: Add -i to invalidate a stamp and rebuild the target Jason Wessel
2012-06-08 13:41 ` [PATCH v4 16/18] meta/lib/oe/terminal.py: Add an additional reference to screen called screen_inline Jason Wessel
2012-06-08 13:41 ` [PATCH v4 17/18] terminal.bbclass: Allow OE_TERMINAL_PREFERRED to override the fallback order for OE_TERMINAL Jason Wessel
2012-06-08 13:41 ` [PATCH v4 18/18] terminal.py: Make screen_inline have a higher priority than screen Jason Wessel

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1339422729.28854.3.camel@ted \
    --to=richard.purdie@linuxfoundation.org \
    --cc=bitbake-devel@lists.openembedded.org \
    --cc=jason.wessel@windriver.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox