* [PATCH 0/2] taskdata.py: set PREFERRED_VERSION when it is in the item @ 2013-09-02 13:41 Robert Yang 2013-09-02 13:41 ` [PATCH 1/2] providers.py: enhance the runtime debug degbug messgae Robert Yang 2013-09-02 13:41 ` [PATCH 2/2] taskdata.py: set PREFERRED_VERSION when it is in the item Robert Yang 0 siblings, 2 replies; 4+ messages in thread From: Robert Yang @ 2013-09-02 13:41 UTC (permalink / raw) To: bitbake-devel The following changes since commit c7994f83baa678a4670472e1f037bfc16cb1e3be: bitbake: runqueue: Fix scenequeue to pass file descriptors, not a float (2013-09-02 09:16:24 +0100) are available in the git repository at: git://git.pokylinux.org/poky-contrib robert/preferred http://git.pokylinux.org/cgit.cgi/poky-contrib/log/?h=robert/preferred Robert Yang (2): providers.py: enhance the runtime debug degbug messgae taskdata.py: set PREFERRED_VERSION when it is in the item bitbake/lib/bb/providers.py | 2 +- bitbake/lib/bb/taskdata.py | 15 +++++++++++++++ 2 files changed, 16 insertions(+), 1 deletion(-) -- 1.7.10.4 ^ permalink raw reply [flat|nested] 4+ messages in thread
* [PATCH 1/2] providers.py: enhance the runtime debug degbug messgae 2013-09-02 13:41 [PATCH 0/2] taskdata.py: set PREFERRED_VERSION when it is in the item Robert Yang @ 2013-09-02 13:41 ` Robert Yang 2013-09-02 13:41 ` [PATCH 2/2] taskdata.py: set PREFERRED_VERSION when it is in the item Robert Yang 1 sibling, 0 replies; 4+ messages in thread From: Robert Yang @ 2013-09-02 13:41 UTC (permalink / raw) To: bitbake-devel The runtime provider debug message is the same as the build time debug message, make them different would be better. [YOCTO #5067] Signed-off-by: Robert Yang <liezhi.yang@windriver.com> --- bitbake/lib/bb/providers.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bitbake/lib/bb/providers.py b/bitbake/lib/bb/providers.py index cac13ac..3a4f604 100644 --- a/bitbake/lib/bb/providers.py +++ b/bitbake/lib/bb/providers.py @@ -341,7 +341,7 @@ def filterProvidersRunTime(providers, item, cfgData, dataCache): if numberPreferred > 1: logger.error("Trying to resolve runtime dependency %s resulted in conflicting PREFERRED_PROVIDER entries being found.\nThe providers found were: %s\nThe PREFERRED_PROVIDER entries resulting in this conflict were: %s", item, preferred, preferred_vars) - logger.debug(1, "sorted providers for %s are: %s", item, eligible) + logger.debug(1, "sorted runtime providers for %s are: %s", item, eligible) return eligible, numberPreferred -- 1.7.10.4 ^ permalink raw reply related [flat|nested] 4+ messages in thread
* [PATCH 2/2] taskdata.py: set PREFERRED_VERSION when it is in the item 2013-09-02 13:41 [PATCH 0/2] taskdata.py: set PREFERRED_VERSION when it is in the item Robert Yang 2013-09-02 13:41 ` [PATCH 1/2] providers.py: enhance the runtime debug degbug messgae Robert Yang @ 2013-09-02 13:41 ` Robert Yang 2013-09-09 15:32 ` Richard Purdie 1 sibling, 1 reply; 4+ messages in thread From: Robert Yang @ 2013-09-02 13:41 UTC (permalink / raw) To: bitbake-devel There is an error if we: $ bitbake make (the make-3.82 will be built) // Edit make.inc $ bitbake make-3.81 [snip] *** 0004: mfile = open(manifest) 0005: entries = mfile.readlines() 0006: mfile.close() 0007: 0008: for entry in entries: Exception: IOError: [Errno 2] No such file or directory: xxx [snip] Set the PREFERRED_VERSION if we find the version info in the item would fix the problem, I think that we need iterate in all the packages since it seems that we can't know wether the item is just a PN or PN-PV unless we compare them, what can I think is check len(all_p) == 1, but this doesn't work when the same recipe is multiple layers. [YOCTO #5067] Signed-off-by: Robert Yang <liezhi.yang@windriver.com> --- bitbake/lib/bb/taskdata.py | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/bitbake/lib/bb/taskdata.py b/bitbake/lib/bb/taskdata.py index 58fe199..38a3191 100644 --- a/bitbake/lib/bb/taskdata.py +++ b/bitbake/lib/bb/taskdata.py @@ -430,6 +430,21 @@ class TaskData: all_p = dataCache.providers[item] + # 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) + eligible, foundUnique = bb.providers.filterProviders(all_p, item, cfgData, dataCache) eligible = [p for p in eligible if not self.getfn_id(p) in self.failed_fnids] -- 1.7.10.4 ^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH 2/2] taskdata.py: set PREFERRED_VERSION when it is in the item 2013-09-02 13:41 ` [PATCH 2/2] taskdata.py: set PREFERRED_VERSION when it is in the item Robert Yang @ 2013-09-09 15:32 ` Richard Purdie 0 siblings, 0 replies; 4+ messages in thread From: Richard Purdie @ 2013-09-09 15:32 UTC (permalink / raw) To: Robert Yang; +Cc: bitbake-devel On Mon, 2013-09-02 at 09:41 -0400, Robert Yang wrote: > There is an error if we: > > $ bitbake make (the make-3.82 will be built) > // Edit make.inc > $ bitbake make-3.81 > [snip] > *** 0004: mfile = open(manifest) > 0005: entries = mfile.readlines() > 0006: mfile.close() > 0007: > 0008: for entry in entries: > Exception: IOError: [Errno 2] No such file or directory: xxx > [snip] > > Set the PREFERRED_VERSION if we find the version info in the item would fix the > problem, I think that we need iterate in all the packages since it seems that > we can't know wether the item is just a PN or PN-PV unless we compare them, > what can I think is check len(all_p) == 1, but this doesn't work when the same > recipe is multiple layers. > > [YOCTO #5067] > > Signed-off-by: Robert Yang <liezhi.yang@windriver.com> > --- > bitbake/lib/bb/taskdata.py | 15 +++++++++++++++ > 1 file changed, 15 insertions(+) > > diff --git a/bitbake/lib/bb/taskdata.py b/bitbake/lib/bb/taskdata.py > index 58fe199..38a3191 100644 > --- a/bitbake/lib/bb/taskdata.py > +++ b/bitbake/lib/bb/taskdata.py > @@ -430,6 +430,21 @@ class TaskData: > > all_p = dataCache.providers[item] > > + # 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) > + > eligible, foundUnique = bb.providers.filterProviders(all_p, item, cfgData, dataCache) > eligible = [p for p in eligible if not self.getfn_id(p) in self.failed_fnids] > This is a neat solution and I'm torn over it. On the one hand it does address the problem. On the other hand: a) Its implementation specific knowledge since bitbake.conf in OE-Core is responsible for the extra PROVIDES b) It would confuse things if some recipe does DEPENDS = "make-3.81" c) The performance of this code isn't going to be good b) can be fixed by adding a bb.warn(), c) might be either not much of an issue or could be fixed, a) is a real problem though. I've put a counter proposal on the OE-Core mailing list suggesting we simplify PROVIDES in bitbake.conf. Depending on the feedback, we can either take that patch or this one with a bb.warn() added. Need some user feedback... Cheers, Richard ^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2013-09-09 15:33 UTC | newest] Thread overview: 4+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2013-09-02 13:41 [PATCH 0/2] taskdata.py: set PREFERRED_VERSION when it is in the item Robert Yang 2013-09-02 13:41 ` [PATCH 1/2] providers.py: enhance the runtime debug degbug messgae Robert Yang 2013-09-02 13:41 ` [PATCH 2/2] taskdata.py: set PREFERRED_VERSION when it is in the item Robert Yang 2013-09-09 15:32 ` Richard Purdie
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.