Re: [OE-core] [PATCH v2] bitbake: bitbake-layers: Make show-recipes show PR

2016-10-17 Thread Ulf Magnusson
On Mon, Oct 17, 2016 at 11:42 PM, Paul Eggleton
 wrote:
> Hi Ulf,
>
> On Mon, 17 Oct 2016 20:30:27 Ulf Magnusson wrote:
>> Only PE and PV were shown, which might have been an oversight. The
>> tuples passed to version_str() contain three elements (PE, PV, and PR),
>> not two.
>
> I have to say I don't recall exactly but I think it was deliberate. We're
> talking about the recipe side here - is knowing the PR value actually useful?
> It's not like you can identify the recipe in any meaningful way by the PR
> value.

It's helpful when mapping recipes to packages at least.

Waxing philosophical, maybe PR could be viewed as a "recipe revision"
with PKGR being the "package revision", in the same sense as for
PE/PKGE and PV/PKGV. That's just an excuse I made up just now though.
I intuitively expected PR to be in there.

> Cheers,
> Paul

Cheers,
Ulf
-- 
___
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-core


Re: [OE-core] [PATCH v2] bitbake: bitbake-layers: Make show-recipes show PR

2016-10-17 Thread Paul Eggleton
Hi Ulf,

On Mon, 17 Oct 2016 20:30:27 Ulf Magnusson wrote:
> Only PE and PV were shown, which might have been an oversight. The
> tuples passed to version_str() contain three elements (PE, PV, and PR),
> not two.

I have to say I don't recall exactly but I think it was deliberate. We're 
talking about the recipe side here - is knowing the PR value actually useful? 
It's not like you can identify the recipe in any meaningful way by the PR 
value.

Cheers,
Paul

-- 

Paul Eggleton
Intel Open Source Technology Centre
-- 
___
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-core


[OE-core] [PATCH v2] bitbake: bitbake-layers: Make show-recipes show PR

2016-10-17 Thread Ulf Magnusson
Changes since v1:

Remove now-redundant default 'pr' argument in QueryPlugin.version_str().

Ulf Magnusson (1):
  bitbake: bitbake-layers: Make show-recipes show PR

 bitbake/lib/bblayers/query.py | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

-- 
2.7.4

-- 
___
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-core


[OE-core] [PATCH v2] bitbake: bitbake-layers: Make show-recipes show PR

2016-10-17 Thread Ulf Magnusson
Only PE and PV were shown, which might have been an oversight. The
tuples passed to version_str() contain three elements (PE, PV, and PR),
not two.

Also remove now-redundant default 'pr' argument in
QueryPlugin.version_str().

Signed-off-by: Ulf Magnusson 
---
 bitbake/lib/bblayers/query.py | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/bitbake/lib/bblayers/query.py b/bitbake/lib/bblayers/query.py
index ee1e7c8..4d6999a 100644
--- a/bitbake/lib/bblayers/query.py
+++ b/bitbake/lib/bblayers/query.py
@@ -28,7 +28,7 @@ class QueryPlugin(LayerPlugin):
 layername = self.get_layer_name(layerdir)
 logger.plain("%s  %s  %d" % (layername.ljust(20), 
layerdir.ljust(40), pri))
 
-def version_str(self, pe, pv, pr = None):
+def version_str(self, pe, pv, pr):
 verstr = "%s" % pv
 if pr:
 verstr = "%s-%s" % (verstr, pr)
@@ -212,10 +212,10 @@ skipped recipes will also be listed, with a " (skipped)" 
suffix.
 if not items_listed:
 logger.plain('=== %s ===' % title)
 items_listed = True
-print_item(preffile, p, self.version_str(pref[0][0], 
pref[0][1]), preflayer, True)
+print_item(preffile, p, self.version_str(*pref[0]), 
preflayer, True)
 for (provfile, provlayer, provver) in provs:
 if provfile != preffile:
-print_item(provfile, p, 
self.version_str(provver[0], provver[1]), provlayer, False)
+print_item(provfile, p, 
self.version_str(*provver), provlayer, False)
 # Ensure we don't show two entries for BBCLASSEXTENDed 
recipes
 preffiles.append(preffile)
 
-- 
2.7.4

-- 
___
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-core