[yocto] [layerindex-web]

Pranay Mankad Pranay.Mankad at synopsys.com
Mon Sep 23 15:00:46 PDT 2019


Hi All,

Thank you for supporting the recipesExtended view over the last couple of days. Here’s a small patch that includes values from two more variables from the Bitbake cooker – PR and PE.

I read through Paul’s explanation of why PE made sense but not PR, and thinking about it, the PR in layerindexs’ case shows if the untouched recipe had a revision associated with or not. Source metadata is important for information, and hence I’m submitting a change with the same.

Here’s the patch (this is my first time submitting one, hopefully it’s the right way to do it):

diff --git a/layerindex/migrations/0001_initial.py b/layerindex/migrations/0001_initial.py
index d08a1aa..398d7dc 100644
--- a/layerindex/migrations/0001_initial.py
+++ b/layerindex/migrations/0001_initial.py
@@ -154,6 +154,8 @@ class Migration(migrations.Migration):
                 ('filepath', models.CharField(blank=True, max_length=255)),
                 ('pn', models.CharField(blank=True, max_length=100)),
                 ('pv', models.CharField(blank=True, max_length=100)),
+                ('pr', models.CharField(blank=True, max_length=100)),
+                ('pe', models.CharField(blank=True, max_length=100)),
                 ('summary', models.CharField(blank=True, max_length=200)),
                 ('description', models.TextField(blank=True)),
                 ('section', models.CharField(blank=True, max_length=100)),
diff --git a/layerindex/models.py b/layerindex/models.py
index 0ca7c06..332ba39 100644
--- a/layerindex/models.py
+++ b/layerindex/models.py
@@ -461,6 +461,8 @@ class Recipe(models.Model):
     filepath = models.CharField(max_length=255, blank=True)
     pn = models.CharField(max_length=100, blank=True)
     pv = models.CharField(max_length=100, blank=True)
+    pr = models.CharField(max_length=100, blank=True)
+    pe = models.CharField(max_length=100, blank=True)
     summary = models.CharField(max_length=200, blank=True)
     description = models.TextField(blank=True)
     section = models.CharField(max_length=100, blank=True)
diff --git a/layerindex/update_layer.py b/layerindex/update_layer.py
index 9dc395f..7131d70 100644
--- a/layerindex/update_layer.py
+++ b/layerindex/update_layer.py
@@ -108,6 +108,8 @@ def update_recipe_file(tinfoil, data, path, recipe, layerdir_start, repodir, sto
         envdata.setVar('SRCPV', 'X')
         recipe.pn = envdata.getVar("PN", True)
         recipe.pv = envdata.getVar("PV", True)
+        recipe.pr = envdata.getVar("PR", True) or ""
+        recipe.pe = envdata.getVar("PE", True) or ""
         recipe.summary = envdata.getVar("SUMMARY", True)
         recipe.description = envdata.getVar("DESCRIPTION", True)
         recipe.section = envdata.getVar("SECTION", True)

Let me know if this qualifies and can be merged to master. These values would be populated to recipesExtended which makes it even more valuable for projects like ours.

Thank you once more for all your support.

Pranay Mankad
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.yoctoproject.org/pipermail/yocto/attachments/20190923/73c8c18c/attachment-0001.html>


More information about the yocto mailing list