On 09/01/2013 06:07 AM, Otavio Salvador wrote:
On Sat, Aug 31, 2013 at 7:51 AM, Robert Yang <[email protected]> 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?
Yes, you are right, it should be sent to bitbake-devel mailing list,
and I'm trying to avoid iterating in all packages.
// Robert
_______________________________________________
Openembedded-core mailing list
[email protected]
http://lists.openembedded.org/mailman/listinfo/openembedded-core