All of lore.kernel.org
 help / color / mirror / Atom feed
From: Otavio Salvador <otavio@ossystems.com.br>
To: Robert Yang <liezhi.yang@windriver.com>
Cc: Patches and discussions about the oe-core layer
	<openembedded-core@lists.openembedded.org>
Subject: Re: [PATCH 1/1] sstate.bbclass: check before open the manifest
Date: Sat, 31 Aug 2013 19:07:40 -0300	[thread overview]
Message-ID: <CAP9ODKpEmUuuKs5DiozesCAsU0xCKeZGcs6soBQ=BuvB2=+iTA@mail.gmail.com> (raw)
In-Reply-To: <5221CAA0.60601@windriver.com>

On Sat, Aug 31, 2013 at 7:51 AM, Robert Yang <liezhi.yang@windriver.com> wrote:
>
> Hi RP,
>
> Thanks, I've made a draft patch for fixing why make-3.82 is being built,
> the problem is that when we run "bitbake make-3.81":
> - For 'make' itself, it will build make_3.81.bb
> - But for make-dev/dbg, it will build make_3.82.bb since there is no
> PREFERRED_VERSION and it will use the highest version.
>
> This draft patch sets the PREFERRED_VERSION for the pkg and will fix the
> problem, I will send it to bitbake-devel later.

Nice discovery :-) This does seem to address a core issue.

> diff --git a/bitbake/lib/bb/taskdata.py b/bitbake/lib/bb/taskdata.py
> index 58fe199..fc8ee6d 100644
> --- a/bitbake/lib/bb/taskdata.py
> +++ b/bitbake/lib/bb/taskdata.py
> @@ -429,6 +429,22 @@ class TaskData:
>              return
>
>          all_p = dataCache.providers[item]
> +        logger.warn("pppreferred: %s" % dataCache.preferred)
> +
> +        # Check whether item has the one of following formats and set the
> +        # PREFERRED_VERSION if it does:
> +        # - <pn>-<pv>
> +        # - <pn>-<pv>-<pr> (when no PE)
> +        # - <pn>_<pe>-<pv>-<pr> (when PE)
> +        for fn in all_p:
> +            pn = dataCache.pkg_fn[fn]
> +            pe = dataCache.pkg_pepvpr[fn][0]
> +            pv = dataCache.pkg_pepvpr[fn][1]
> +            pr = dataCache.pkg_pepvpr[fn][2]
> +            if not pe and (item == "%s-%s" % (pn, pv) or item == "%s-%s-%s"
> % (pn, pv, pr)):
> +                cfgData.setVar("PREFERRED_VERSION_" + pn, pv)
> +            elif pe and item == "%s_%s-%s-%s" % (pn, pe, pv, pr):
> +                cfgData.setVar("PREFERRED_VERSION_" + pn, pv)

I understand the problem here but maybe this should be checked in
bitbake and avoid iterate in all packages?

-- 
Otavio Salvador                             O.S. Systems
http://www.ossystems.com.br        http://code.ossystems.com.br
Mobile: +55 (53) 9981-7854            Mobile: +1 (347) 903-9750


  reply	other threads:[~2013-08-31 22:07 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-08-29 13:13 [PATCH 0/1] state.bbclass: check before open the manifest Robert Yang
2013-08-29 13:13 ` [PATCH 1/1] sstate.bbclass: " Robert Yang
2013-08-29 17:00   ` Richard Purdie
2013-08-30  1:24     ` Robert Yang
2013-08-30 15:29       ` Richard Purdie
2013-08-31 10:51         ` Robert Yang
2013-08-31 22:07           ` Otavio Salvador [this message]
2013-09-02  1:59             ` Robert Yang

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='CAP9ODKpEmUuuKs5DiozesCAsU0xCKeZGcs6soBQ=BuvB2=+iTA@mail.gmail.com' \
    --to=otavio@ossystems.com.br \
    --cc=liezhi.yang@windriver.com \
    --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.