Skip to contentSkip to conversation

bitbake: bitbake-layers: Make show-recipes show PR

PATCH Superseded Ulf Magnusson 2 participants 4 messages Oct 17, 2016

lore
Share & tools
lore
#0 lore raw

PATCH v2 1/1 bitbake: bitbake-layers: Make show-recipes show PR

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(-)
Signature · 1 line
2.7.4
#1 lore raw

PATCH v2 1/1 bitbake: bitbake-layers: Make show-recipes show PR

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().

---
 bitbake/lib/bblayers/query.py | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
bitbake/lib/bblayers/query.py +3 -3
index ee1e7c8..4d6999a 100644
@@ -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)
 
Signature · 1 line
2.7.4
#2 lore raw

Hi Ulf,

Quoted 3 lines · 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

Signature · 2 lines
Paul Eggleton
Intel Open Source Technology Centre
#3 lore raw
Quoted 11 lines · Paul Eggleton

Hi Ulf,

Quoted 3 lines · 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.

Quoted 2 lines

Cheers,
Paul

Cheers,
Ulf