* [layerindex-web]
@ 2019-09-23 22:00 Pranay Mankad
2019-09-23 23:06 ` [layerindex-web] PR / PE in layer index Paul Eggleton
0 siblings, 1 reply; 2+ messages in thread
From: Pranay Mankad @ 2019-09-23 22:00 UTC (permalink / raw)
To: yocto@yoctoproject.org; +Cc: Paul Eggleton
[-- Attachment #1: Type: text/plain, Size: 3040 bytes --]
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
[-- Attachment #2: Type: text/html, Size: 10195 bytes --]
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [layerindex-web] PR / PE in layer index
2019-09-23 22:00 [layerindex-web] Pranay Mankad
@ 2019-09-23 23:06 ` Paul Eggleton
0 siblings, 0 replies; 2+ messages in thread
From: Paul Eggleton @ 2019-09-23 23:06 UTC (permalink / raw)
To: Pranay Mankad; +Cc: yocto@yoctoproject.org
Hi Pranay
On Tuesday, 24 September 2019 10:00:46 AM NZST Pranay Mankad wrote:
> 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.
I suppose so yes. Out of interest I did a search of OE-Core and there were
more recipes than I would have guessed that set PR, so it could perhaps be
useful. I'm not sure I'd bother adding it to the UI yet though (and you
haven't, that's fine.)
> Here’s the patch (this is my first time submitting one, hopefully it’s the
> right way to do it):
So unfortunately no, you need to send it as an actual patch and not just
pasted into an email - git-format-patch / git-send-email are the most
effective ways to do that (though it assumes you are able to send email
directly from your linux system). Here's some info:
http://www.openembedded.org/wiki/How_to_submit_a_patch_to_OpenEmbedded
(Of course you'd need to change mailing lists / prefixes in the examples, and
some of the metadata requirements don't apply, but the basics are the same.)
One other thing - you're editing the initial migration (layerindex/migrations/
0001_initial.py) - that's not right. You need to undo the change to
0001_initial.py and then generate a new migration using the following command:
./manage.py createmigrations layerindex
That will give you a new migration in layerindex/migrations/. You can then
apply that migration to the database in the normal way:
./manage.py migrate layerindex
Of course if your database already has those new fields the latter will fail,
in this instance you could simply add --fake since the result would have been
the same.
Cheers,
Paul
--
Paul Eggleton
Intel Open Source Technology Centre
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2019-09-23 23:06 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-09-23 22:00 [layerindex-web] Pranay Mankad
2019-09-23 23:06 ` [layerindex-web] PR / PE in layer index Paul Eggleton
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.