Re: [yocto] Reducing the size of the image by optimizing python

2019-10-20 Thread Josef Holzmayr
On Sat, Oct 19, 2019 at 04:32:26PM +, Abhi Arora wrote:
> I am planning to install it in my host machine and see if I am able to run my 
> scripts and manually add or remove modules and python packages to get minimal 
> required system for my scripts.
> 
> For that I need to access python3-misc and what it installs.

Its not something that directly corresponds to a standard desktop
distribution. Rather, its "everything that would otherwise be left
behind", see:

https://git.yoctoproject.org/cgit/cgit.cgi/poky/tree/meta/recipes-devtools/python/python3_3.7.4.bb#n323

So its just like the advice was already: remove it, see what breaks, and
then add smaller bits and pieces again until everything works as
desired.

Greetz
> 
> 
> 
> Get Outlook for Android
> 
> 
> From: Yann Dirson 
> Sent: Saturday, October 19, 2019 8:51:52 PM
> To: richard.pur...@linuxfoundation.org 
> Cc: Abhi Arora ; Khem Raj ; 
> yocto@yoctoproject.org 
> Subject: Re: [yocto] Reducing the size of the image by optimizing python
> 
> You can also look at the package dependency graph (see the file
> generated by bitbake -g) to get a better idea of what pulls what.
> 
> 2019-10-19 17:10 UTC+02:00, richard.pur...@linuxfoundation.org
> :
> > On Sat, 2019-10-19 at 14:55 +, Abhi Arora wrote:
> >> Thanks your for the suggestion.
> >>
> >> From where I can find out what modules and packages python3-misc
> >> downloads and installs? I am new to yocto and Don't know where to
> >> look for. I tried grep but didn't help me.
> >
> > python3-misc is a package. You can look at its dependencies to see what
> > it adds to the image.
> >
> >> And how about optimization using pyc file? Is it doable?
> >
> > Start simple. If you have python3-misc installed its using a lot of
> > space and is the sensible place to start with trimming things down.
> >
> > Optimising to just pyc files is an optimisation further than most
> > people find they need and will be much harder to do.
> >
> > Cheers,
> >
> > Richard
> >
> >
> >
> > --
> > ___
> > yocto mailing list
> > yocto@yoctoproject.org
> > https://lists.yoctoproject.org/listinfo/yocto
> >
> 
> 
> --
> Yann Dirson 
> Blade / Shadow -- http://shadow.tech

> -- 
> ___
> yocto mailing list
> yocto@yoctoproject.org
> https://lists.yoctoproject.org/listinfo/yocto


-- 
———
Josef Holzmayr
Software Developer Embedded Systems

Tel: +49 8444 9204-48
Fax: +49 8444 9204-50

R-S-I Elektrotechnik GmbH & Co. KG
Woelkestrasse 11
D-85301 Schweitenkirchen
www.rsi-elektrotechnik.de
———
Amtsgericht Ingolstadt – GmbH: HRB 191328 – KG: HRA 170393
Geschäftsführer: Dr.-Ing. Michael Sorg, Dipl.-Ing. Franz Sorg
Ust-IdNr: DE 128592548 

_
Amtsgericht Ingolstadt - GmbH: HRB 191328 - KG: HRA 170363
Geschäftsführer: Dr.-Ing. Michael Sorg, Dipl.-Ing. Franz Sorg
USt-IdNr.: DE 128592548

-- 
___
yocto mailing list
yocto@yoctoproject.org
https://lists.yoctoproject.org/listinfo/yocto


Re: [yocto] Reducing the size of the image by optimizing python

2019-10-20 Thread Abhi Arora
Hello,
I have listed the python modules and packages that I don't want. Someone 
recommended to list them with BAD_RECOMMENDATION. Can someone help me where 
this variable should go?

Thank you.

Get Outlook for Android


From: Josef Holzmayr 
Sent: Sunday, October 20, 2019 4:29:00 PM
To: Abhi Arora 
Cc: Yann Dirson ; 
richard.pur...@linuxfoundation.org ; 
yocto@yoctoproject.org 
Subject: Re: [yocto] Reducing the size of the image by optimizing python

On Sat, Oct 19, 2019 at 04:32:26PM +, Abhi Arora wrote:
> I am planning to install it in my host machine and see if I am able to run my 
> scripts and manually add or remove modules and python packages to get minimal 
> required system for my scripts.
>
> For that I need to access python3-misc and what it installs.

Its not something that directly corresponds to a standard desktop
distribution. Rather, its "everything that would otherwise be left
behind", see:

https://git.yoctoproject.org/cgit/cgit.cgi/poky/tree/meta/recipes-devtools/python/python3_3.7.4.bb#n323

So its just like the advice was already: remove it, see what breaks, and
then add smaller bits and pieces again until everything works as
desired.

Greetz
>
>
>
> Get Outlook for Android
>
> 
> From: Yann Dirson 
> Sent: Saturday, October 19, 2019 8:51:52 PM
> To: richard.pur...@linuxfoundation.org 
> Cc: Abhi Arora ; Khem Raj ; 
> yocto@yoctoproject.org 
> Subject: Re: [yocto] Reducing the size of the image by optimizing python
>
> You can also look at the package dependency graph (see the file
> generated by bitbake -g) to get a better idea of what pulls what.
>
> 2019-10-19 17:10 UTC+02:00, richard.pur...@linuxfoundation.org
> :
> > On Sat, 2019-10-19 at 14:55 +, Abhi Arora wrote:
> >> Thanks your for the suggestion.
> >>
> >> From where I can find out what modules and packages python3-misc
> >> downloads and installs? I am new to yocto and Don't know where to
> >> look for. I tried grep but didn't help me.
> >
> > python3-misc is a package. You can look at its dependencies to see what
> > it adds to the image.
> >
> >> And how about optimization using pyc file? Is it doable?
> >
> > Start simple. If you have python3-misc installed its using a lot of
> > space and is the sensible place to start with trimming things down.
> >
> > Optimising to just pyc files is an optimisation further than most
> > people find they need and will be much harder to do.
> >
> > Cheers,
> >
> > Richard
> >
> >
> >
> > --
> > ___
> > yocto mailing list
> > yocto@yoctoproject.org
> > https://lists.yoctoproject.org/listinfo/yocto
> >
>
>
> --
> Yann Dirson 
> Blade / Shadow -- http://shadow.tech

> --
> ___
> yocto mailing list
> yocto@yoctoproject.org
> https://lists.yoctoproject.org/listinfo/yocto


--
———
Josef Holzmayr
Software Developer Embedded Systems

Tel: +49 8444 9204-48
Fax: +49 8444 9204-50

R-S-I Elektrotechnik GmbH & Co. KG
Woelkestrasse 11
D-85301 Schweitenkirchen
www.rsi-elektrotechnik.de
———
Amtsgericht Ingolstadt – GmbH: HRB 191328 – KG: HRA 170393
Geschäftsführer: Dr.-Ing. Michael Sorg, Dipl.-Ing. Franz Sorg
Ust-IdNr: DE 128592548

_
Amtsgericht Ingolstadt - GmbH: HRB 191328 - KG: HRA 170363
Geschäftsführer: Dr.-Ing. Michael Sorg, Dipl.-Ing. Franz Sorg
USt-IdNr.: DE 128592548

-- 
___
yocto mailing list
yocto@yoctoproject.org
https://lists.yoctoproject.org/listinfo/yocto


[yocto] [layerindex-web][PATCH 0/3] Branch comparison functionality

2019-10-20 Thread Paul Eggleton
Add the ability to compare the available recipes and their versions in
two different branches, plus one unrelated patch to fix an issue I
noticed recently with cgit URLs.


The following changes since commit 1ce4a85d257ac928307ac0de6edf4cb80b50adce:

  editlayer: Be more specific on the searches (2019-10-14 09:20:33 +1300)

are available in the Git repository at:

  git://git.yoctoproject.org/layerindex-web paule/branch_comparison
  
http://git.yoctoproject.org/cgit.cgi/layerindex-web/log/?h=paule/branch_comparison

Paul Eggleton (3):
  Track SRCREV for each recipe
  Add branch comparison function
  Fix cgit commit URL setting

 layerindex/forms.py  |  19 ++
 layerindex/migrations/0043_recipe_srcrev.py  |  20 ++
 layerindex/models.py |   1 +
 layerindex/update_layer.py   |   4 +
 layerindex/urls.py   |  12 +-
 layerindex/views.py  | 113 +-
 templates/base.html  |   1 +
 templates/layerindex/branchcompare.html  | 214 +++
 templates/layerindex/branchcompare_plain.txt |  17 ++
 templates/layerindex/editlayer.html  |   2 +-
 templates/layerindex/recipedetail.html   |   2 +-
 11 files changed, 401 insertions(+), 4 deletions(-)
 create mode 100644 layerindex/migrations/0043_recipe_srcrev.py
 create mode 100644 templates/layerindex/branchcompare.html
 create mode 100644 templates/layerindex/branchcompare_plain.txt

-- 
2.20.1

-- 
___
yocto mailing list
yocto@yoctoproject.org
https://lists.yoctoproject.org/listinfo/yocto


[yocto] [layerindex-web][PATCH 1/3] Track SRCREV for each recipe

2019-10-20 Thread Paul Eggleton
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 
---
 layerindex/migrations/0043_recipe_srcrev.py | 20 
 layerindex/models.py|  1 +
 layerindex/update_layer.py  |  4 
 templates/layerindex/recipedetail.html  |  2 +-
 4 files changed, 26 insertions(+), 1 deletion(-)
 create mode 100644 layerindex/migrations/0043_recipe_srcrev.py

diff --git a/layerindex/migrations/0043_recipe_srcrev.py 
b/layerindex/migrations/0043_recipe_srcrev.py
new file mode 100644
index ..64293767
--- /dev/null
+++ b/layerindex/migrations/0043_recipe_srcrev.py
@@ -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),
+),
+]
diff --git a/layerindex/models.py b/layerindex/models.py
index 332ba39e..253c725c 100644
--- a/layerindex/models.py
+++ b/layerindex/models.py
@@ -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))
diff --git a/layerindex/update_layer.py b/layerindex/update_layer.py
index fcae54f8..17098379 100644
--- a/layerindex/update_layer.py
+++ b/layerindex/update_layer.py
@@ -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)
diff --git a/templates/layerindex/recipedetail.html 
b/templates/layerindex/recipedetail.html
index b3ba65eb..64463863 100644
--- a/templates/layerindex/recipedetail.html
+++ b/templates/layerindex/recipedetail.html
@@ -54,7 +54,7 @@
 
 
 Version
-{{ recipe.pv }}
+{{ recipe.pv }}{% if recipe.srcrev %} ({{ 
recipe.srcrev }}){% endif %}
 
 
 Summary
-- 
2.20.1

-- 
___
yocto mailing list
yocto@yoctoproject.org
https://lists.yoctoproject.org/listinfo/yocto


[yocto] [layerindex-web][PATCH 2/3] Add branch comparison function

2019-10-20 Thread Paul Eggleton
Add the ability to compare available recipes and their versions between
two branches for a selection of layers (default is just OE-Core). This
was mainly intended to help us with the Yocto Project release notes
preparation (hence the "Plain text" button at the bottom of the page)
but is also useful in its own right.

Note: for readability, SRCREVs are only shown when PV has not changed.

Signed-off-by: Paul Eggleton 
---
 layerindex/forms.py  |  19 ++
 layerindex/urls.py   |  12 +-
 layerindex/views.py  | 113 +-
 templates/base.html  |   1 +
 templates/layerindex/branchcompare.html  | 214 +++
 templates/layerindex/branchcompare_plain.txt |  17 ++
 6 files changed, 374 insertions(+), 2 deletions(-)
 create mode 100644 templates/layerindex/branchcompare.html
 create mode 100644 templates/layerindex/branchcompare_plain.txt

diff --git a/layerindex/forms.py b/layerindex/forms.py
index 13ba3aad..51583c60 100644
--- a/layerindex/forms.py
+++ b/layerindex/forms.py
@@ -354,3 +354,22 @@ class PatchDispositionForm(StyledModelForm):
 }
 
 PatchDispositionFormSet = modelformset_factory(PatchDisposition, 
form=PatchDispositionForm, extra=0)
+
+
+class BranchComparisonForm(StyledForm):
+from_branch = forms.ModelChoiceField(label='From', 
queryset=Branch.objects.none())
+to_branch = forms.ModelChoiceField(label='To', 
queryset=Branch.objects.none())
+layers = forms.CharField(widget=forms.HiddenInput())
+
+def __init__(self, *args, request=None, **kwargs):
+super(BranchComparisonForm, self).__init__(*args, **kwargs)
+qs = Branch.objects.filter(comparison=False, 
hidden=False).order_by('sort_priority', 'name')
+self.fields['from_branch'].queryset = qs
+self.fields['to_branch'].queryset = qs
+self.request = request
+
+def clean(self):
+cleaned_data = super(BranchComparisonForm, self).clean()
+if cleaned_data['from_branch'] == cleaned_data['to_branch']:
+raise forms.ValidationError({'to_branch': 'From and to branches 
cannot be the same'})
+return cleaned_data
diff --git a/layerindex/urls.py b/layerindex/urls.py
index 89e70a22..abeb0928 100644
--- a/layerindex/urls.py
+++ b/layerindex/urls.py
@@ -14,7 +14,8 @@ from layerindex.views import LayerListView, 
LayerReviewListView, LayerReviewDeta
 bulk_change_edit_view, bulk_change_patch_view, BulkChangeDeleteView, 
RecipeDetailView, RedirectParamsView, \
 ClassicRecipeSearchView, ClassicRecipeDetailView, ClassicRecipeStatsView, 
LayerUpdateDetailView, UpdateListView, \
 UpdateDetailView, StatsView, publish_view, LayerCheckListView, 
BBClassCheckListView, TaskStatusView, \
-ComparisonRecipeSelectView, ComparisonRecipeSelectDetailView, 
task_log_view, task_stop_view, email_test_view
+ComparisonRecipeSelectView, ComparisonRecipeSelectDetailView, 
task_log_view, task_stop_view, email_test_view, \
+BranchCompareView
 from layerindex.models import LayerItem, Recipe, RecipeChangeset
 from rest_framework import routers
 from . import restviews
@@ -185,6 +186,15 @@ urlpatterns = [
 url(r'^stoptask/(?P[-\w]+)/$',
 task_stop_view,
 name='task_stop'),
+url(r'^branch_comparison/$',
+BranchCompareView.as_view(
+template_name='layerindex/branchcompare.html'),
+name='branch_comparison'),
+url(r'^branch_comparison_plain/$',
+BranchCompareView.as_view(
+content_type='text/plain',
+template_name='layerindex/branchcompare_plain.txt'),
+name='branch_comparison_plain'),
 url(r'^ajax/layerchecklist/(?P[-.\w]+)/$',
 LayerCheckListView.as_view(
 template_name='layerindex/layerchecklist.html'),
diff --git a/layerindex/views.py b/layerindex/views.py
index 2dacf516..12054fe7 100644
--- a/layerindex/views.py
+++ b/layerindex/views.py
@@ -47,7 +47,8 @@ from layerindex.forms import (AdvancedRecipeSearchForm, 
BulkChangeEditFormSet,
   ComparisonRecipeSelectForm, EditLayerForm,
   EditNoteForm, EditProfileForm,
   LayerMaintainerFormSet, RecipeChangesetForm,
-  PatchDispositionForm, PatchDispositionFormSet)
+  PatchDispositionForm, PatchDispositionFormSet,
+  BranchComparisonForm)
 from layerindex.models import (BBAppend, BBClass, Branch, ClassicRecipe,
Distro, DynamicBuildDep, IncFile, LayerBranch,
LayerDependency, LayerItem, LayerMaintainer,
@@ -1705,3 +1706,113 @@ class ComparisonRecipeSelectDetailView(DetailView):
 messages.error(request, 'Failed to save changes: %s' % form.errors)
 
 return self.get(request, *args, **kwargs)
+
+
+class BranchCompareView(FormView):
+form_class = BranchCompar

[yocto] [layerindex-web][PATCH 3/3] Fix cgit commit URL setting

2019-10-20 Thread Paul Eggleton
Typo, there has to be a ? in front of the id or otherwise we don't get
linked to the right commit. This would have affected recently added layers
with a cgit web frontend.

Signed-off-by: Paul Eggleton 
---
 templates/layerindex/editlayer.html | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/templates/layerindex/editlayer.html 
b/templates/layerindex/editlayer.html
index dd95ea30..e21e649d 100644
--- a/templates/layerindex/editlayer.html
+++ b/templates/layerindex/editlayer.html
@@ -286,7 +286,7 @@
 if (e) {
 $('#id_vcs_web_tree_base_url').val(vcs_web_url + 
'/tree/%path%?h=%branch%')
 $('#id_vcs_web_file_base_url').val(vcs_web_url + 
'/tree/%path%?h=%branch%')
-$('#id_vcs_web_commit_url').val(vcs_web_url + 
'/commit/id=%hash%')
+$('#id_vcs_web_commit_url').val(vcs_web_url + 
'/commit/?id=%hash%')
 }
 }
 else if (type == 'gitweb') {
-- 
2.20.1

-- 
___
yocto mailing list
yocto@yoctoproject.org
https://lists.yoctoproject.org/listinfo/yocto


[yocto] [meta-openssl102][PATCH 1/2] conf/layer.conf: Add zeus to LAYERSERIES_COMPAT

2019-10-20 Thread Hongxu Jia
Signed-off-by: Hongxu Jia 
---
 conf/layer.conf | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/conf/layer.conf b/conf/layer.conf
index f1df15d..6e62f62 100644
--- a/conf/layer.conf
+++ b/conf/layer.conf
@@ -10,8 +10,9 @@ BBFILE_PRIORITY_meta-openssl-one-zero-two = "5"
 
 LAYERVERSION_meta-openssl-one-zero-two = "1"
 
-LAYERSERIES_COMPAT_meta-openssl-one-zero-two = "thud warrior"
+LAYERSERIES_COMPAT_meta-openssl-one-zero-two = "thud wrl warrior"
 
 LAYERDEPENDS_meta-openssl-one-zero-two = " \
 core \
 "
+
-- 
2.7.4

-- 
___
yocto mailing list
yocto@yoctoproject.org
https://lists.yoctoproject.org/listinfo/yocto


[yocto] [meta-openssl102][PATCH 2/2] conf/layer.conf: workaround No bb files matched BBFILE_PATTERN_meta-openssl-one-zero-two warning

2019-10-20 Thread Hongxu Jia
No bb but bbappend in meta-openssl102

Signed-off-by: Hongxu Jia 
---
 conf/layer.conf | 1 +
 1 file changed, 1 insertion(+)

diff --git a/conf/layer.conf b/conf/layer.conf
index 6e62f62..be6b8a4 100644
--- a/conf/layer.conf
+++ b/conf/layer.conf
@@ -6,6 +6,7 @@ BBFILES += "${LAYERDIR}/recipes-*/*/*.bb \
 
 BBFILE_COLLECTIONS += "meta-openssl-one-zero-two"
 BBFILE_PATTERN_meta-openssl-one-zero-two = "^${LAYERDIR}/"
+BBFILE_PATTERN_IGNORE_EMPTY_meta-openssl-one-zero-two = "1"
 BBFILE_PRIORITY_meta-openssl-one-zero-two = "5"
 
 LAYERVERSION_meta-openssl-one-zero-two = "1"
-- 
2.7.4

-- 
___
yocto mailing list
yocto@yoctoproject.org
https://lists.yoctoproject.org/listinfo/yocto


[yocto] [meta-openssl102][PATCH V2] conf/layer.conf: Add zeus to LAYERSERIES_COMPAT

2019-10-20 Thread Hongxu Jia
Signed-off-by: Hongxu Jia 
---
 conf/layer.conf | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/conf/layer.conf b/conf/layer.conf
index f1df15d..6e62f62 100644
--- a/conf/layer.conf
+++ b/conf/layer.conf
@@ -10,8 +10,9 @@ BBFILE_PRIORITY_meta-openssl-one-zero-two = "5"
 
 LAYERVERSION_meta-openssl-one-zero-two = "1"
 
-LAYERSERIES_COMPAT_meta-openssl-one-zero-two = "thud warrior"
+LAYERSERIES_COMPAT_meta-openssl-one-zero-two = "thud warrior zeus"
 
 LAYERDEPENDS_meta-openssl-one-zero-two = " \
 core \
 "
+
-- 
2.7.4

-- 
___
yocto mailing list
yocto@yoctoproject.org
https://lists.yoctoproject.org/listinfo/yocto