Track PE and PR for recipes
PATCH 1/1 Track PE and PR for recipes
This change is to report PE (epoch) and PR (release) values for recipes from the bitbake cooker. These values will be reflected in the Rest API and will not be exposed on the UI. The aim of this change is to enrich metadata availability to consumers of the feed. `
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