These changes will add the metadata for product revision and epoch if present in the bitbake recipe.
PATCH 1/1 These changes will add the metadata for product revision and epoch if present in the bitbake recipe.
Signed-off-by Pranay Mankad <[email protected]>
--- .../migrations/0042_recipe_property_addition.py | 20 ++++++++++++++++++++ layerindex/models.py | 2 ++ layerindex/update_layer.py | 2 ++ 3 files changed, 24 insertions(+) create mode 100644 layerindex/migrations/0042_recipe_property_addition.py
layerindex/migrations/0042_recipe_property_addition.py new file +20 -0
@@ -0,0 +1,20 @@ +# -*- coding: utf-8 -*- +# Generated by Django 1.11.24 on 2019-09-24 21:34 +from __future__ import unicode_literals +from django.db import migrations, models +class Migration(migrations.Migration): + dependencies = [ + ('layerindex', '0041_recipe_configopts'), + ] + operations = [ + migrations.AddField( + model_name='recipe', + name='pe', + field=models.CharField(blank=True, max_length=100), + ), + migrations.AddField( + model_name='recipe', + name='pr', + field=models.CharField(blank=True, max_length=100), + ), + ]
layerindex/models.py +2 -0
@@ -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)
layerindex/update_layer.py +2 -0
@@ -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)
Signature · 1 line
2.15.1
Hi Pranay,
Quoted 7 lines · NZDT Pranay Mankad
Signed-off-by Pranay Mankad <[email protected]>--- .../migrations/0042_recipe_property_addition.py | 20 ++++++++++++++++++++ layerindex/models.py | 2 ++ layerindex/update_layer.py | 2 ++ 3 files changed, 24 insertions(+) create mode 100644 layerindex/migrations/0042_recipe_property_addition.py
So the substance of this change is fine, however the commit message needs a bit of reworking.
The shortlog (first line, which is used by git-send-email automatically as the subject) should be shorter and then you can have a fuller explanation of the change after a blank line. It should look something like this:
---------- snip ----------
Track PE and PR for recipes
This will add the metadata for epoch and revision if present in the bitbake recipe. These will be automatically available through the REST API but won't (yet) be visible in the UI.
---------- snip ----------
(Removing snip lines obviously)
Thanks,
Paul
Signature · 2 lines
Paul Eggleton Intel Open Source Technology Centre