diff options
author | Andrew Geissler <geissonator@yahoo.com> | 2020-04-13 21:39:40 +0300 |
---|---|---|
committer | Andrew Geissler <geissonator@yahoo.com> | 2020-05-05 16:30:44 +0300 |
commit | 82c905dc58a36aeae40b1b273a12f63fb1973cf4 (patch) | |
tree | 38caf00263451b5036435cdc36e035b25d32e623 /poky/bitbake/lib/toaster/bldcontrol | |
parent | 83ecb75644b3d677c274188f9ac0b2374d6f6925 (diff) | |
download | openbmc-82c905dc58a36aeae40b1b273a12f63fb1973cf4.tar.xz |
meta-openembedded and poky: subtree updates
Squash of the following due to dependencies among them
and OpenBMC changes:
meta-openembedded: subtree update:d0748372d2..9201611135
meta-openembedded: subtree update:9201611135..17fd382f34
poky: subtree update:9052e5b32a..2e11d97b6c
poky: subtree update:2e11d97b6c..a8544811d7
The change log was too large for the jenkins plugin
to handle therefore it has been removed. Here is
the first and last commit of each subtree:
meta-openembedded:d0748372d2
cppzmq: bump to version 4.6.0
meta-openembedded:17fd382f34
mpv: Remove X11 dependency
poky:9052e5b32a
package_ipk: Remove pointless comment to trigger rebuild
poky:a8544811d7
pbzip2: Fix license warning
Change-Id: If0fc6c37629642ee207a4ca2f7aa501a2c673cd6
Signed-off-by: Andrew Geissler <geissonator@yahoo.com>
Diffstat (limited to 'poky/bitbake/lib/toaster/bldcontrol')
7 files changed, 29 insertions, 38 deletions
diff --git a/poky/bitbake/lib/toaster/bldcontrol/admin.py b/poky/bitbake/lib/toaster/bldcontrol/admin.py index e85c30ed1..1754bc11c 100644 --- a/poky/bitbake/lib/toaster/bldcontrol/admin.py +++ b/poky/bitbake/lib/toaster/bldcontrol/admin.py @@ -3,7 +3,6 @@ # from django.contrib import admin -from django.contrib.admin.filters import RelatedFieldListFilter from .models import BuildEnvironment class BuildEnvironmentAdmin(admin.ModelAdmin): diff --git a/poky/bitbake/lib/toaster/bldcontrol/bbcontroller.py b/poky/bitbake/lib/toaster/bldcontrol/bbcontroller.py index 301df1880..71c288df3 100644 --- a/poky/bitbake/lib/toaster/bldcontrol/bbcontroller.py +++ b/poky/bitbake/lib/toaster/bldcontrol/bbcontroller.py @@ -8,10 +8,8 @@ import os import sys -import re -from django.db import transaction from django.db.models import Q -from bldcontrol.models import BuildEnvironment, BRLayer, BRVariable, BRTarget, BRBitbake +from bldcontrol.models import BuildEnvironment, BRLayer, BRBitbake # load Bitbake components path = os.path.join(os.path.dirname(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))) diff --git a/poky/bitbake/lib/toaster/bldcontrol/localhostbecontroller.py b/poky/bitbake/lib/toaster/bldcontrol/localhostbecontroller.py index 39ea736b5..75674ccbf 100644 --- a/poky/bitbake/lib/toaster/bldcontrol/localhostbecontroller.py +++ b/poky/bitbake/lib/toaster/bldcontrol/localhostbecontroller.py @@ -7,27 +7,24 @@ # import os -import sys import re import shutil import time -from django.db import transaction -from django.db.models import Q -from bldcontrol.models import BuildEnvironment, BuildRequest, BRLayer, BRVariable, BRTarget, BRBitbake, Build -from orm.models import CustomImageRecipe, Layer, Layer_Version, Project, ProjectLayer, ToasterSetting +from bldcontrol.models import BuildEnvironment, BuildRequest, Build +from orm.models import CustomImageRecipe, Layer, Layer_Version, Project, ToasterSetting from orm.models import signal_runbuilds import subprocess from toastermain import settings -from bldcontrol.bbcontroller import BuildEnvironmentController, ShellCmdException, BuildSetupException, BitbakeController +from bldcontrol.bbcontroller import BuildEnvironmentController, ShellCmdException, BuildSetupException import logging logger = logging.getLogger("toaster") install_dir = os.environ.get('TOASTER_DIR') -from pprint import pprint, pformat +from pprint import pformat class LocalhostBEController(BuildEnvironmentController): """ Implementation of the BuildEnvironmentController for the localhost; diff --git a/poky/bitbake/lib/toaster/bldcontrol/management/commands/checksettings.py b/poky/bitbake/lib/toaster/bldcontrol/management/commands/checksettings.py index fe2c4dc2b..20f9dce56 100644 --- a/poky/bitbake/lib/toaster/bldcontrol/management/commands/checksettings.py +++ b/poky/bitbake/lib/toaster/bldcontrol/management/commands/checksettings.py @@ -2,11 +2,9 @@ # SPDX-License-Identifier: GPL-2.0-only # -from django.core.management.base import BaseCommand, CommandError -from django.db import transaction +from django.core.management.base import BaseCommand from django.core.management import call_command -from bldcontrol.bbcontroller import getBuildEnvironmentController, ShellCmdException from bldcontrol.models import BuildRequest, BuildEnvironment, BRError from orm.models import ToasterSetting, Build, Layer @@ -80,7 +78,7 @@ class Command(BaseCommand): template_conf = os.environ.get("TEMPLATECONF", "") custom_xml_only = os.environ.get("CUSTOM_XML_ONLY") - if ToasterSetting.objects.filter(name='CUSTOM_XML_ONLY').count() > 0 or (not custom_xml_only == None): + if ToasterSetting.objects.filter(name='CUSTOM_XML_ONLY').count() > 0 or custom_xml_only is not None: # only use the custom settings pass elif "poky" in template_conf: diff --git a/poky/bitbake/lib/toaster/bldcontrol/management/commands/runbuilds.py b/poky/bitbake/lib/toaster/bldcontrol/management/commands/runbuilds.py index 50ec40986..19f659ec4 100644 --- a/poky/bitbake/lib/toaster/bldcontrol/management/commands/runbuilds.py +++ b/poky/bitbake/lib/toaster/bldcontrol/management/commands/runbuilds.py @@ -168,17 +168,17 @@ class Command(BaseCommand): try: self.cleanup() except Exception as e: - logger.warn("runbuilds: cleanup exception %s" % str(e)) + logger.warning("runbuilds: cleanup exception %s" % str(e)) try: self.archive() except Exception as e: - logger.warn("runbuilds: archive exception %s" % str(e)) + logger.warning("runbuilds: archive exception %s" % str(e)) try: self.schedule() except Exception as e: - logger.warn("runbuilds: schedule exception %s" % str(e)) + logger.warning("runbuilds: schedule exception %s" % str(e)) def handle(self, **options): pidfile_path = os.path.join(os.environ.get("BUILDDIR", "."), diff --git a/poky/bitbake/lib/toaster/bldcontrol/migrations/0001_initial.py b/poky/bitbake/lib/toaster/bldcontrol/migrations/0001_initial.py index 67db37856..7ee19f474 100644 --- a/poky/bitbake/lib/toaster/bldcontrol/migrations/0001_initial.py +++ b/poky/bitbake/lib/toaster/bldcontrol/migrations/0001_initial.py @@ -37,7 +37,7 @@ class Migration(migrations.Migration): ('giturl', models.CharField(max_length=254)), ('commit', models.CharField(max_length=254)), ('dirpath', models.CharField(max_length=254)), - ('layer_version', models.ForeignKey(to='orm.Layer_Version', null=True)), + ('layer_version', models.ForeignKey(to='orm.Layer_Version', null=True, on_delete=models.CASCADE)), ], ), migrations.CreateModel( @@ -80,34 +80,34 @@ class Migration(migrations.Migration): ('state', models.IntegerField(default=0, choices=[(0, b'created'), (1, b'queued'), (2, b'in progress'), (3, b'completed'), (4, b'failed'), (5, b'deleted'), (6, b'archive')])), ('created', models.DateTimeField(auto_now_add=True)), ('updated', models.DateTimeField(auto_now=True)), - ('build', models.OneToOneField(null=True, to='orm.Build')), - ('environment', models.ForeignKey(to='bldcontrol.BuildEnvironment', null=True)), - ('project', models.ForeignKey(to='orm.Project')), + ('build', models.OneToOneField(null=True, to='orm.Build', on_delete=models.CASCADE)), + ('environment', models.ForeignKey(to='bldcontrol.BuildEnvironment', null=True, on_delete=models.CASCADE)), + ('project', models.ForeignKey(to='orm.Project', on_delete=models.CASCADE)), ], ), migrations.AddField( model_name='brvariable', name='req', - field=models.ForeignKey(to='bldcontrol.BuildRequest'), + field=models.ForeignKey(to='bldcontrol.BuildRequest', on_delete=models.CASCADE), ), migrations.AddField( model_name='brtarget', name='req', - field=models.ForeignKey(to='bldcontrol.BuildRequest'), + field=models.ForeignKey(to='bldcontrol.BuildRequest', on_delete=models.CASCADE), ), migrations.AddField( model_name='brlayer', name='req', - field=models.ForeignKey(to='bldcontrol.BuildRequest'), + field=models.ForeignKey(to='bldcontrol.BuildRequest', on_delete=models.CASCADE), ), migrations.AddField( model_name='brerror', name='req', - field=models.ForeignKey(to='bldcontrol.BuildRequest'), + field=models.ForeignKey(to='bldcontrol.BuildRequest', on_delete=models.CASCADE), ), migrations.AddField( model_name='brbitbake', name='req', - field=models.OneToOneField(to='bldcontrol.BuildRequest'), + field=models.OneToOneField(to='bldcontrol.BuildRequest', on_delete=models.CASCADE), ), ] diff --git a/poky/bitbake/lib/toaster/bldcontrol/models.py b/poky/bitbake/lib/toaster/bldcontrol/models.py index bcffcf5e2..c2f302da2 100644 --- a/poky/bitbake/lib/toaster/bldcontrol/models.py +++ b/poky/bitbake/lib/toaster/bldcontrol/models.py @@ -4,9 +4,8 @@ from __future__ import unicode_literals from django.db import models -from django.core.validators import MaxValueValidator, MinValueValidator from django.utils.encoding import force_text -from orm.models import Project, ProjectLayer, ProjectVariable, ProjectTarget, Build, Layer_Version +from orm.models import Project, Build, Layer_Version import logging logger = logging.getLogger("toaster") @@ -86,9 +85,9 @@ class BuildRequest(models.Model): search_allowed_fields = ("brtarget__target", "build__project__name") - project = models.ForeignKey(Project) - build = models.OneToOneField(Build, null = True) # TODO: toasterui should set this when Build is created - environment = models.ForeignKey(BuildEnvironment, null = True) + project = models.ForeignKey(Project, on_delete=models.CASCADE) + build = models.OneToOneField(Build, on_delete=models.CASCADE, null = True) # TODO: toasterui should set this when Build is created + environment = models.ForeignKey(BuildEnvironment, on_delete=models.CASCADE, null = True) state = models.IntegerField(choices = REQUEST_STATE, default = REQ_CREATED) created = models.DateTimeField(auto_now_add = True) updated = models.DateTimeField(auto_now = True) @@ -132,32 +131,32 @@ class BuildRequest(models.Model): class BRLayer(models.Model): - req = models.ForeignKey(BuildRequest) + req = models.ForeignKey(BuildRequest, on_delete=models.CASCADE) name = models.CharField(max_length=100) giturl = models.CharField(max_length=254, null=True) local_source_dir = models.CharField(max_length=254, null=True) commit = models.CharField(max_length=254, null=True) dirpath = models.CharField(max_length=254, null=True) - layer_version = models.ForeignKey(Layer_Version, null=True) + layer_version = models.ForeignKey(Layer_Version, on_delete=models.CASCADE, null=True) class BRBitbake(models.Model): - req = models.OneToOneField(BuildRequest) # only one bitbake for a request + req = models.OneToOneField(BuildRequest, on_delete=models.CASCADE) # only one bitbake for a request giturl = models.CharField(max_length =254) commit = models.CharField(max_length = 254) dirpath = models.CharField(max_length = 254) class BRVariable(models.Model): - req = models.ForeignKey(BuildRequest) + req = models.ForeignKey(BuildRequest, on_delete=models.CASCADE) name = models.CharField(max_length=100) value = models.TextField(blank = True) class BRTarget(models.Model): - req = models.ForeignKey(BuildRequest) + req = models.ForeignKey(BuildRequest, on_delete=models.CASCADE) target = models.CharField(max_length=100) task = models.CharField(max_length=100, null=True) class BRError(models.Model): - req = models.ForeignKey(BuildRequest) + req = models.ForeignKey(BuildRequest, on_delete=models.CASCADE) errtype = models.CharField(max_length=100) errmsg = models.TextField() traceback = models.TextField() |