All of lore.kernel.org
 help / color / mirror / Atom feed
From: Richard Purdie <richard.purdie@linuxfoundation.org>
To: Patches and discussions about the oe-core layer
	<openembedded-core@lists.openembedded.org>
Subject: Re: BB_SIGNATURE_HANDLER = "basichash" unusable strict?
Date: Wed, 09 Nov 2011 10:32:18 +0000	[thread overview]
Message-ID: <1320834738.10843.159.camel@ted> (raw)
In-Reply-To: <20111108143701.GC3641@jama.jama.net>

On Tue, 2011-11-08 at 15:37 +0100, Martin Jansa wrote:
> Today I've started build from scratch and dediced to give basichash a try (as it is supposed to become default IIRC):
> 
> So after cleaning tmpdir, sstate cache, pseudo I've started clean build..
> 
> 1) bitbake -k gcc-cross | tee -a log.${MACHINE}; 
> 2) bitbake -k virtual/kernel | tee -a log.${MACHINE}; 
> 3) bitbake -k core-image-core | tee -a log.${MACHINE}; 
> 4) bitbake -k shr-lite-image  | tee -a log.${MACHINE}; 
> 
> But then I've noticed that after successfull build of gcc-cross in step 1 it started another gcc-* build in step 2..
[...]
> Ah.. yes I did 2 small patches to libxml2 and openssl between step 1 and step2:
> http://patchwork.openembedded.org/patch/14521/
> http://patchwork.openembedded.org/patch/14519/
> 
> But do we want to rebuild everything after every change small like this?

The biggest problem we have here is deciding when to rebuild and when
not to. Can you define when this should/shouldn't happen?

> Or is it configuration issue or just bug in sstate implementation?

I think its behaving as currently configured. Whether that configuration
is right/wrong and what it should be is the question. If we can define
the configuration, we can then work out how to implement it which is a
separate issue.

> Btw libxml2 isn't first difference.. I can dig more..
[...]
> I have few extra patches in my branch so for this particular test case you also need ie
> http://patchwork.openembedded.org/patch/13699/
> 
> But it shouldn't be hard to find similar issue for any other dependency tree (ie with git-native instead of subversion-native).

The situation is currently configurable through:

BB_HASHTASK_WHITELIST ?= "(.*-cross$|.*-native$|.*-cross-initial$|.*-cross-intermediate$|^virtual:native:.*|^virtual:nativesdk:.*)"

however I have to admit looking at the bitbake code handling this its
not that simple.

The code only triggers for recipes which are not matched by the
whitelist. For those not matching, it iterates through their
dependencies and removes anything that matches the expression.

So effectively it only modified target recipes, removes dependencies
matching the above expressions.

This isn't an easy problem and this is reminding me I wanted to revisit
this code. I think we actually need some kind of double expression to
match a regexp against like:

<depender>___<depend>

So we could then do:

REGEXP_NONNATIVE = "(.*-cross|.*-native|.*-cross-initial|.*-cross-intermediate|virtual:native:.*|virtual:nativesdk:.*)"

BB_HASHTASK_WHITELIST ?= "^.(?!${REGEXP_NONNATIVE})___${REGEXP_NONNATIVE}$"

which would function as above but move more of the control into the code.

I was then trying to come up with a further example to extend this but
its not scaling. So lets throw away the idea of using regexps and use
python. Coding off the top of my head, we could have something like:

def filter_dep(depender, depend):
    # Return True if we should keep the dependency, False to drop it
    def isNative(x):
        return x.startswith("virtual:native:") or x.endswith("-native")
    def isCross(x):
        return x.endswith("-cross") or x.endswith("-cross-initial") or x.endswith("-cross-intermediate")
    def isNativeSDK(x):
        return x.startswith("virtual:nativesdk:")

    if isNative(depender) or isCross(depender) or isNativeSDK(depender):
        return True

    # Only target packages beyond here

    if isNative(depend) or isCross(depend) or isNativeSDK(depend):
        return False

    return True

which would then be easy to extend to for example ensure the python
dependency on python-native is kept.

The siggen code was designed to be a plugin so changing it to the above
form isn't the problem. The real problem is deciding what the policy it
implements should be.

So to go back to the original question, out of those changes you made,
which ones would you expect to change the hash and which ones would you
not expect to see changes for?

Cheers,

Richard





  reply	other threads:[~2011-11-09 10:38 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-11-08 14:37 BB_SIGNATURE_HANDLER = "basichash" unusable strict? Martin Jansa
2011-11-09 10:32 ` Richard Purdie [this message]
2011-11-09 11:51   ` Martin Jansa
2011-11-09 12:06     ` Richard Purdie
2011-11-09 12:45       ` Martin Jansa
2011-11-09 14:13         ` Richard Purdie
2011-11-09 14:48           ` Martin Jansa

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=1320834738.10843.159.camel@ted \
    --to=richard.purdie@linuxfoundation.org \
    --cc=openembedded-core@lists.openembedded.org \
    /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 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.