Various fixes
cover Various fixes
Various fixes to address errors and warnings when running update.py
The following changes since commit 796d2455bb862ed4c71eadfa9fcf4c002752c2f3:
templates/*: staticfiles -> static (2022-01-13 23:36:22 -0800)
are available in the Git repository at:
git://git.yoctoproject.org/layerindex-web timo/fixes
http://git.yoctoproject.org/cgit.cgi/layerindex-web/log/?h=timo/fixes
Tim Orling (4):
layerindex/urls.py: fix about url pattern layerindex/models.py: add Inactive-Upstream recipe{desc,parse}.py: BB_ENV_PASSTHROUGH_ADDITIONS layerindex/utils.py: ignore 'core' in BBFILES_COLLECTIONS
.../migrations/0046_alter_patch_status.py | 18 ++++++++++++++++++ layerindex/models.py | 1 + layerindex/recipedesc.py | 2 +- layerindex/recipeparse.py | 2 +- layerindex/urls.py | 2 +- layerindex/utils.py | 7 ++++++- 6 files changed, 28 insertions(+), 4 deletions(-) create mode 100644 layerindex/migrations/0046_alter_patch_status.py
Signature · 1 line
2.30.2
PATCH 1/4 layerindex/urls.py: fix about url pattern
The url pattern was not including the trailing /
[YOCTO #14445]
--- layerindex/urls.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
layerindex/urls.py +1 -1
@@ -128,7 +128,7 @@ urlpatterns = [ EditProfileFormView.as_view( template_name='layerindex/profile.html'), name="profile"), - url(r'^about$', + url(r'^about/$', TemplateView.as_view( template_name='layerindex/about.html'), name="about"),
Signature · 1 line
2.30.2
PATCH 2/4 layerindex/models.py: add Inactive-Upstream
In reply to Tim OrlingAdd the newish Inactive-Upstream upstream status.
Add 0046_alter_patch_status.py migration.
layerindex/migrations: update patch status
--- .../migrations/0046_alter_patch_status.py | 18 ++++++++++++++++++ layerindex/models.py | 1 + 2 files changed, 19 insertions(+) create mode 100644 layerindex/migrations/0046_alter_patch_status.py
layerindex/migrations/0046_alter_patch_status.py new file +18 -0
@@ -0,0 +1,18 @@ +# Generated by Django 3.2.12 on 2022-04-10 19:20 + +from django.db import migrations, models + + +class Migration(migrations.Migration): + + dependencies = [ + ('layerindex', '0045_layerbranch_classicrecipe'), + ] + + operations = [ + migrations.AlterField( + model_name='patch', + name='status', + field=models.CharField(choices=[('U', 'Unknown'), ('A', 'Accepted'), ('P', 'Pending'), ('I', 'Inappropriate'), ('B', 'Backport'), ('S', 'Submitted'), ('D', 'Denied'), ('N', 'Inactive-Upstream')], default='U', max_length=1), + ), + ]
layerindex/models.py +1 -0
@@ -561,6 +561,7 @@ class Patch(models.Model): ('B', 'Backport'), ('S', 'Submitted'), ('D', 'Denied'), + ('N', 'Inactive-Upstream'), ] recipe = models.ForeignKey(Recipe, on_delete=models.CASCADE) path = models.CharField(max_length=255)
Signature · 1 line
2.30.2
PATCH 3/4 recipe{desc,parse}.py: BB_ENV_PASSTHROUGH_ADDITIONS
In reply to Tim OrlingERROR: Variable BB_ENV_EXTRAWHITE has been renamed to BB_ENV_PASSTHROUGH_ADDITIONS
ERROR: Variable BB_ENV_EXTRAWHITE from the shell environment has been renamed to BB_ENV_PASSTHROUGH_ADDITIONS
ERROR: Exiting to allow enviroment variables to be corrected
Replace BB_ENV_EXTRAWHITE with new variable BB_ENV_PASSTHROUGH_ADDITIONS
--- layerindex/recipedesc.py | 2 +- layerindex/recipeparse.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-)
layerindex/recipedesc.py +1 -1
@@ -63,7 +63,7 @@ def main(): sys.exit(1) # Skip sanity checks - os.environ['BB_ENV_EXTRAWHITE'] = 'DISABLE_SANITY_CHECKS' + os.environ['BB_ENV_PASSTHROUGH_ADDITIONS'] = 'DISABLE_SANITY_CHECKS' os.environ['DISABLE_SANITY_CHECKS'] = '1' sys.path.extend([bitbakepath + '/lib'])
layerindex/recipeparse.py +1 -1
@@ -36,7 +36,7 @@ def init_parser(settings, branch, bitbakepath, enable_tracking=False, nocheckout utils.checkout_repo(bitbakepath, bitbake_ref, logger=logger) # Skip sanity checks - os.environ['BB_ENV_EXTRAWHITE'] = 'DISABLE_SANITY_CHECKS' + os.environ['BB_ENV_PASSTHROUGH_ADDITIONS'] = 'DISABLE_SANITY_CHECKS' os.environ['DISABLE_SANITY_CHECKS'] = '1' fetchdir = settings.LAYER_FETCH_DIR
Signature · 1 line
2.30.2
PATCH 4/4 layerindex/utils.py: ignore 'core' in BBFILES_COLLECTIONS
In reply to Tim OrlingMany layers append BBFILE_COLLECTIONS and therefore have 'core <layer>'
During update.py, this means we are likely not handling the collection we expect:
WARNING: /opt/workdir/git___git_openembedded_org_meta-openembedded/meta-oe: multiple collections found, handling first one (core) only BBFILE_COLLECTIONS = "core"
--- layerindex/utils.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-)
layerindex/utils.py +6 -1
@@ -44,7 +44,12 @@ def get_layer_var(config_data, var, logger): collection = collection_list[0] layerdir = config_data.getVar('LAYERDIR', True) if len(collection_list) > 1: - logger.warn('%s: multiple collections found, handling first one (%s) only' % (layerdir, collection)) + if collection_list[0] == 'core': + # Many layers append BBFILE_COLLECTIONS and therefore have 'core <layer>' + collection = collection_list[1] + logger.warn('%s: multiple collections found, ignoring the first one (\'core\') and handling (%s) only' % (layerdir, collection)) + else: + logger.warn('%s: multiple collections found, handling first one (%s) only' % (layerdir, collection)) if var == 'BBFILE_COLLECTIONS': return collection value = config_data.getVar('%s_%s' % (var, collection), True)
Signature · 1 line
2.30.2