mirror of
git://git.yoctoproject.org/layerindex-web.git
synced 2025-07-05 21:24:46 +02:00
Track SRCREV for each recipe
For the purposes of the branch comparison function I'm about to add it would be useful to track the value of SRCREV, so we can see if it has changed even if PV hasn't. Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
This commit is contained in:
parent
1ce4a85d25
commit
73656432b2
20
layerindex/migrations/0043_recipe_srcrev.py
Normal file
20
layerindex/migrations/0043_recipe_srcrev.py
Normal file
|
@ -0,0 +1,20 @@
|
|||
# -*- coding: utf-8 -*-
|
||||
# Generated by Django 1.11.22 on 2019-10-20 22:15
|
||||
from __future__ import unicode_literals
|
||||
|
||||
from django.db import migrations, models
|
||||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
|
||||
dependencies = [
|
||||
('layerindex', '0042_recipe_pe_pr'),
|
||||
]
|
||||
|
||||
operations = [
|
||||
migrations.AddField(
|
||||
model_name='recipe',
|
||||
name='srcrev',
|
||||
field=models.CharField(blank=True, max_length=64),
|
||||
),
|
||||
]
|
|
@ -475,6 +475,7 @@ class Recipe(models.Model):
|
|||
updated = models.DateTimeField(auto_now=True)
|
||||
blacklisted = models.CharField(max_length=255, blank=True)
|
||||
configopts = models.CharField(max_length=4096, blank=True)
|
||||
srcrev = models.CharField(max_length=64, blank=True)
|
||||
|
||||
def vcs_web_url(self):
|
||||
url = self.layerbranch.file_url(os.path.join(self.filepath, self.filename))
|
||||
|
|
|
@ -110,6 +110,10 @@ def update_recipe_file(tinfoil, data, path, recipe, layerdir_start, repodir, sto
|
|||
recipe.pv = envdata.getVar("PV", True)
|
||||
recipe.pr = envdata.getVar("PR", True) or ""
|
||||
recipe.pe = envdata.getVar("PE", True) or ""
|
||||
recipe.srcrev = envdata.getVar('SRCREV', True) or ''
|
||||
if recipe.srcrev == 'INVALID':
|
||||
# INVALID is the default from bitbake.conf, but we don't want to see it
|
||||
recipe.srcrev = ''
|
||||
recipe.summary = envdata.getVar("SUMMARY", True)
|
||||
recipe.description = envdata.getVar("DESCRIPTION", True)
|
||||
recipe.section = envdata.getVar("SECTION", True)
|
||||
|
|
|
@ -54,7 +54,7 @@
|
|||
</tr>
|
||||
<tr>
|
||||
<th>Version</th>
|
||||
<td>{{ recipe.pv }}</td>
|
||||
<td>{{ recipe.pv }}{% if recipe.srcrev %} ({{ recipe.srcrev }}){% endif %}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>Summary</th>
|
||||
|
|
Loading…
Reference in New Issue
Block a user