[yocto] [layerindex-web][PATCH] These changes will add the metadata for product revision and epoch if present in the bitbake recipe.
Pranay Mankad
pranaymankad at gmail.com
Mon Sep 30 19:52:59 PDT 2019
Signed-off-by: Pranay Mankad <pranaymankad at gmail.com>
---
.../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
diff --git a/layerindex/migrations/0042_recipe_property_addition.py b/layerindex/migrations/0042_recipe_property_addition.py
new file mode 100644
index 0000000..5583696
--- /dev/null
+++ b/layerindex/migrations/0042_recipe_property_addition.py
@@ -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),
+ ),
+ ]
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)
--
2.15.1
More information about the yocto
mailing list