Openembedded Core Discussions
 help / color / mirror / Atom feed
From: Richard Purdie <richard.purdie@linuxfoundation.org>
To: Peter Kjellerstedt <peter.kjellerstedt@axis.com>,
	Jussi Kukkonen <jussi.kukkonen@intel.com>,
	"openembedded-core@lists.openembedded.org"
	<openembedded-core@lists.openembedded.org>
Subject: Re: [PATCHv3 1/1] native/nativesdk: Use fixed DISTRO_FEATURES
Date: Tue, 11 Apr 2017 22:12:01 +0100	[thread overview]
Message-ID: <1491945121.12091.47.camel@linuxfoundation.org> (raw)
In-Reply-To: <16f574d161924ec89eadf24244d6cf2d@XBOX02.axis.com>

On Tue, 2017-04-11 at 18:06 +0000, Peter Kjellerstedt wrote:
> > 
> > -----Original Message-----
> > From: Richard Purdie [mailto:richard.purdie@linuxfoundation.org]
> > Se
> > On Tue, 2017-04-11 at 15:32 +0000, Peter Kjellerstedt wrote:
> > > 
> > > > +    # Set features here to prevent appends and distro features
> > > > backfill
> > > > +    # from modifying native distro features
> > > > +    features = set(d.getVar("DISTRO_FEATURES_NATIVE").split())
> > > > +    filtered = set(bb.utils.filter("DISTRO_FEATURES",
> > > > d.getVar("DISTRO_FEATURES_FILTER_NATIVE"), d).split())
> > > > +    d.setVar("DISTRO_FEATURES", " ".join(features | filtered))
> > > You should sort the list of features to make it deterministic.
> > Do we sort DISTRO_FEATURES anywhere else?
>
> No, but it is never worked upon via set() as these are here...
> 
> > 
> > I thought we only accessed DISTRO_FEATURES with functions which
> > have
> > support in bitbake (contains/filter) which means that should be
> > unnecessary?
>
> Will the lack of sorting not affect the task hashes (and bitbake -e)
> if these are set via set() operations, which may result in the order
> of the features listed in the final DISTRO_VARIABLE from varying
> based on how Python happens to pull the features out of the set()?

setVar operations don't actually affect task hashes directly. We track
functions which use variables through getVar/getVarFlag and only if
something uses it does its value affect the hash.

We can therefore safely setVar this, its only users of
getVar/getVarFlag which would see its value and with DISTRO_FEATURES,
we only obtain the value through contains/filter which have special
handling in bitbake (similar to getVar).

So I still think sorting is unnecessary, at least in theory.

Cheers,

Richard


      reply	other threads:[~2017-04-11 21:24 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-04-11 14:35 [PATCHv3 0/1] Use fixed DISTRO_FEATURES for native Jussi Kukkonen
2017-04-11 14:35 ` [PATCHv3 1/1] native/nativesdk: Use fixed DISTRO_FEATURES Jussi Kukkonen
2017-04-11 15:32   ` Peter Kjellerstedt
2017-04-11 17:16     ` Richard Purdie
2017-04-11 18:06       ` Peter Kjellerstedt
2017-04-11 21:12         ` Richard Purdie [this message]

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=1491945121.12091.47.camel@linuxfoundation.org \
    --to=richard.purdie@linuxfoundation.org \
    --cc=jussi.kukkonen@intel.com \
    --cc=openembedded-core@lists.openembedded.org \
    --cc=peter.kjellerstedt@axis.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