summaryrefslogtreecommitdiffstats
path: root/external/poky/bitbake/lib/toaster
diff options
context:
space:
mode:
Diffstat (limited to 'external/poky/bitbake/lib/toaster')
-rw-r--r--external/poky/bitbake/lib/toaster/bldcollector/admin.py4
-rw-r--r--external/poky/bitbake/lib/toaster/bldcollector/urls.py15
-rw-r--r--external/poky/bitbake/lib/toaster/bldcollector/views.py22
-rw-r--r--external/poky/bitbake/lib/toaster/bldcontrol/admin.py5
-rw-r--r--external/poky/bitbake/lib/toaster/bldcontrol/bbcontroller.py20
-rw-r--r--external/poky/bitbake/lib/toaster/bldcontrol/localhostbecontroller.py27
-rw-r--r--external/poky/bitbake/lib/toaster/bldcontrol/management/commands/checksettings.py10
-rw-r--r--external/poky/bitbake/lib/toaster/bldcontrol/management/commands/runbuilds.py10
-rw-r--r--external/poky/bitbake/lib/toaster/bldcontrol/migrations/0001_initial.py18
-rw-r--r--external/poky/bitbake/lib/toaster/bldcontrol/models.py25
-rw-r--r--external/poky/bitbake/lib/toaster/bldcontrol/views.py4
-rwxr-xr-xexternal/poky/bitbake/lib/toaster/manage.py4
-rw-r--r--external/poky/bitbake/lib/toaster/orm/fixtures/oe-core.xml24
-rw-r--r--external/poky/bitbake/lib/toaster/orm/fixtures/poky.xml36
-rw-r--r--external/poky/bitbake/lib/toaster/orm/management/commands/lsupdates.py17
-rw-r--r--external/poky/bitbake/lib/toaster/orm/migrations/0001_initial.py100
-rw-r--r--external/poky/bitbake/lib/toaster/orm/migrations/0002_customimagerecipe.py6
-rw-r--r--external/poky/bitbake/lib/toaster/orm/migrations/0003_customimagepackage.py2
-rw-r--r--external/poky/bitbake/lib/toaster/orm/migrations/0004_provides.py4
-rw-r--r--external/poky/bitbake/lib/toaster/orm/migrations/0008_refactor_artifact_models.py4
-rw-r--r--external/poky/bitbake/lib/toaster/orm/migrations/0011_delete_layersource.py2
-rw-r--r--external/poky/bitbake/lib/toaster/orm/migrations/0012_use_release_instead_of_up_branch.py2
-rw-r--r--external/poky/bitbake/lib/toaster/orm/migrations/0017_distro_clone.py2
-rw-r--r--external/poky/bitbake/lib/toaster/orm/migrations/0019_django_2_2.py23
-rw-r--r--external/poky/bitbake/lib/toaster/orm/models.py127
-rw-r--r--external/poky/bitbake/lib/toaster/tests/browser/selenium_helpers.py17
-rw-r--r--external/poky/bitbake/lib/toaster/tests/browser/selenium_helpers_base.py18
-rw-r--r--external/poky/bitbake/lib/toaster/tests/browser/test_all_builds_page.py18
-rw-r--r--external/poky/bitbake/lib/toaster/tests/browser/test_all_projects_page.py18
-rw-r--r--external/poky/bitbake/lib/toaster/tests/browser/test_builddashboard_page.py18
-rw-r--r--external/poky/bitbake/lib/toaster/tests/browser/test_builddashboard_page_artifacts.py18
-rw-r--r--external/poky/bitbake/lib/toaster/tests/browser/test_builddashboard_page_recipes.py18
-rw-r--r--external/poky/bitbake/lib/toaster/tests/browser/test_builddashboard_page_tasks.py18
-rw-r--r--external/poky/bitbake/lib/toaster/tests/browser/test_js_unit_tests.py18
-rw-r--r--external/poky/bitbake/lib/toaster/tests/browser/test_landing_page.py20
-rw-r--r--external/poky/bitbake/lib/toaster/tests/browser/test_layerdetails_page.py20
-rw-r--r--external/poky/bitbake/lib/toaster/tests/browser/test_most_recent_builds_states.py20
-rw-r--r--external/poky/bitbake/lib/toaster/tests/browser/test_new_custom_image_page.py18
-rw-r--r--external/poky/bitbake/lib/toaster/tests/browser/test_new_project_page.py18
-rw-r--r--external/poky/bitbake/lib/toaster/tests/browser/test_project_builds_page.py18
-rw-r--r--external/poky/bitbake/lib/toaster/tests/browser/test_project_config_page.py24
-rw-r--r--external/poky/bitbake/lib/toaster/tests/browser/test_project_page.py18
-rw-r--r--external/poky/bitbake/lib/toaster/tests/browser/test_sample.py18
-rw-r--r--external/poky/bitbake/lib/toaster/tests/browser/test_task_page.py18
-rw-r--r--external/poky/bitbake/lib/toaster/tests/browser/test_toastertable_ui.py18
-rw-r--r--external/poky/bitbake/lib/toaster/tests/builds/buildtest.py16
-rw-r--r--external/poky/bitbake/lib/toaster/tests/builds/test_core_image_min.py17
-rw-r--r--external/poky/bitbake/lib/toaster/tests/commands/test_loaddata.py16
-rw-r--r--external/poky/bitbake/lib/toaster/tests/commands/test_lsupdates.py16
-rw-r--r--external/poky/bitbake/lib/toaster/tests/commands/test_runbuilds.py16
-rw-r--r--external/poky/bitbake/lib/toaster/tests/db/test_db.py2
-rw-r--r--external/poky/bitbake/lib/toaster/tests/eventreplay/__init__.py16
-rw-r--r--external/poky/bitbake/lib/toaster/tests/functional/functional_helpers.py16
-rw-r--r--external/poky/bitbake/lib/toaster/tests/functional/test_functional_basic.py17
-rw-r--r--external/poky/bitbake/lib/toaster/tests/views/test_views.py18
-rw-r--r--external/poky/bitbake/lib/toaster/toastergui/api.py18
-rw-r--r--external/poky/bitbake/lib/toaster/toastergui/buildtables.py15
-rw-r--r--external/poky/bitbake/lib/toaster/toastergui/static/js/importlayer.js12
-rw-r--r--external/poky/bitbake/lib/toaster/toastergui/tablefilter.py15
-rw-r--r--external/poky/bitbake/lib/toaster/toastergui/tables.py24
-rw-r--r--external/poky/bitbake/lib/toaster/toastergui/templatetags/field_values_filter.py4
-rw-r--r--external/poky/bitbake/lib/toaster/toastergui/templatetags/objects_to_dictionaries_filter.py5
-rw-r--r--external/poky/bitbake/lib/toaster/toastergui/templatetags/project_url_tag.py6
-rw-r--r--external/poky/bitbake/lib/toaster/toastergui/templatetags/projecttags.py25
-rw-r--r--external/poky/bitbake/lib/toaster/toastergui/typeaheads.py14
-rw-r--r--external/poky/bitbake/lib/toaster/toastergui/urls.py17
-rw-r--r--external/poky/bitbake/lib/toaster/toastergui/views.py61
-rw-r--r--external/poky/bitbake/lib/toaster/toastergui/widgets.py17
-rw-r--r--external/poky/bitbake/lib/toaster/toastermain/management/commands/builddelete.py8
-rw-r--r--external/poky/bitbake/lib/toaster/toastermain/management/commands/buildimport.py37
-rw-r--r--external/poky/bitbake/lib/toaster/toastermain/management/commands/buildslist.py7
-rw-r--r--external/poky/bitbake/lib/toaster/toastermain/management/commands/checksocket.py16
-rw-r--r--external/poky/bitbake/lib/toaster/toastermain/management/commands/perf.py4
-rw-r--r--external/poky/bitbake/lib/toaster/toastermain/settings.py32
-rw-r--r--external/poky/bitbake/lib/toaster/toastermain/settings_production_example.py15
-rw-r--r--external/poky/bitbake/lib/toaster/toastermain/settings_test.py15
-rw-r--r--external/poky/bitbake/lib/toaster/toastermain/urls.py19
-rw-r--r--external/poky/bitbake/lib/toaster/toastermain/wsgi.py7
78 files changed, 435 insertions, 992 deletions
diff --git a/external/poky/bitbake/lib/toaster/bldcollector/admin.py b/external/poky/bitbake/lib/toaster/bldcollector/admin.py
index 1f2e07f5..feaa888c 100644
--- a/external/poky/bitbake/lib/toaster/bldcollector/admin.py
+++ b/external/poky/bitbake/lib/toaster/bldcollector/admin.py
@@ -1,3 +1,7 @@
+#
+# SPDX-License-Identifier: GPL-2.0-only
+#
+
from django.contrib import admin
from orm.models import BitbakeVersion, Release, ToasterSetting, Layer_Version
from django import forms
diff --git a/external/poky/bitbake/lib/toaster/bldcollector/urls.py b/external/poky/bitbake/lib/toaster/bldcollector/urls.py
index 888175d0..efd67a81 100644
--- a/external/poky/bitbake/lib/toaster/bldcollector/urls.py
+++ b/external/poky/bitbake/lib/toaster/bldcollector/urls.py
@@ -3,21 +3,10 @@
#
# Copyright (C) 2014-2017 Intel Corporation
#
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License version 2 as
-# published by the Free Software Foundation.
+# SPDX-License-Identifier: GPL-2.0-only
#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License along
-# with this program; if not, write to the Free Software Foundation, Inc.,
-# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
-
-from django.conf.urls import include, url
+from django.conf.urls import url
import bldcollector.views
diff --git a/external/poky/bitbake/lib/toaster/bldcollector/views.py b/external/poky/bitbake/lib/toaster/bldcollector/views.py
index f32fa4d2..04cd8b3d 100644
--- a/external/poky/bitbake/lib/toaster/bldcollector/views.py
+++ b/external/poky/bitbake/lib/toaster/bldcollector/views.py
@@ -3,29 +3,11 @@
#
# Copyright (C) 2014 Intel Corporation
#
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License version 2 as
-# published by the Free Software Foundation.
+# SPDX-License-Identifier: GPL-2.0-only
#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License along
-# with this program; if not, write to the Free Software Foundation, Inc.,
-# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
-from django.views.decorators.cache import cache_control
-from django.core.urlresolvers import reverse
-from django.core.paginator import Paginator, EmptyPage, PageNotAnInteger
+from django.urls import reverse
from django.http import HttpResponseBadRequest, HttpResponse
-from django.utils import timezone
-from django.utils.html import escape
-from datetime import timedelta
-from django.utils import formats
-from toastergui.templatetags.projecttags import json as jsonfilter
-import json
import os
import tempfile
import subprocess
diff --git a/external/poky/bitbake/lib/toaster/bldcontrol/admin.py b/external/poky/bitbake/lib/toaster/bldcontrol/admin.py
index fcbe5f59..1754bc11 100644
--- a/external/poky/bitbake/lib/toaster/bldcontrol/admin.py
+++ b/external/poky/bitbake/lib/toaster/bldcontrol/admin.py
@@ -1,5 +1,8 @@
+#
+# SPDX-License-Identifier: GPL-2.0-only
+#
+
from django.contrib import admin
-from django.contrib.admin.filters import RelatedFieldListFilter
from .models import BuildEnvironment
class BuildEnvironmentAdmin(admin.ModelAdmin):
diff --git a/external/poky/bitbake/lib/toaster/bldcontrol/bbcontroller.py b/external/poky/bitbake/lib/toaster/bldcontrol/bbcontroller.py
index 5195600d..71c288df 100644
--- a/external/poky/bitbake/lib/toaster/bldcontrol/bbcontroller.py
+++ b/external/poky/bitbake/lib/toaster/bldcontrol/bbcontroller.py
@@ -1,31 +1,15 @@
#
-# ex:ts=4:sw=4:sts=4:et
-# -*- tab-width: 4; c-basic-offset: 4; indent-tabs-mode: nil -*-
-#
# BitBake Toaster Implementation
#
# Copyright (C) 2014 Intel Corporation
#
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License version 2 as
-# published by the Free Software Foundation.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
+# SPDX-License-Identifier: GPL-2.0-only
#
-# You should have received a copy of the GNU General Public License along
-# with this program; if not, write to the Free Software Foundation, Inc.,
-# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
-
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/external/poky/bitbake/lib/toaster/bldcontrol/localhostbecontroller.py b/external/poky/bitbake/lib/toaster/bldcontrol/localhostbecontroller.py
index 94906359..75674ccb 100644
--- a/external/poky/bitbake/lib/toaster/bldcontrol/localhostbecontroller.py
+++ b/external/poky/bitbake/lib/toaster/bldcontrol/localhostbecontroller.py
@@ -1,47 +1,30 @@
#
-# ex:ts=4:sw=4:sts=4:et
-# -*- tab-width: 4; c-basic-offset: 4; indent-tabs-mode: nil -*-
-#
# BitBake Toaster Implementation
#
# Copyright (C) 2014 Intel Corporation
#
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License version 2 as
-# published by the Free Software Foundation.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
+# SPDX-License-Identifier: GPL-2.0-only
#
-# You should have received a copy of the GNU General Public License along
-# with this program; if not, write to the Free Software Foundation, Inc.,
-# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
-
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/external/poky/bitbake/lib/toaster/bldcontrol/management/commands/checksettings.py b/external/poky/bitbake/lib/toaster/bldcontrol/management/commands/checksettings.py
index 14298d9d..20f9dce5 100644
--- a/external/poky/bitbake/lib/toaster/bldcontrol/management/commands/checksettings.py
+++ b/external/poky/bitbake/lib/toaster/bldcontrol/management/commands/checksettings.py
@@ -1,8 +1,10 @@
-from django.core.management.base import BaseCommand, CommandError
-from django.db import transaction
+#
+# SPDX-License-Identifier: GPL-2.0-only
+#
+
+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
@@ -76,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/external/poky/bitbake/lib/toaster/bldcontrol/management/commands/runbuilds.py b/external/poky/bitbake/lib/toaster/bldcontrol/management/commands/runbuilds.py
index 6a55dd46..19f659ec 100644
--- a/external/poky/bitbake/lib/toaster/bldcontrol/management/commands/runbuilds.py
+++ b/external/poky/bitbake/lib/toaster/bldcontrol/management/commands/runbuilds.py
@@ -1,3 +1,7 @@
+#
+# SPDX-License-Identifier: GPL-2.0-only
+#
+
from django.core.management.base import BaseCommand
from django.db import transaction
from django.db.models import Q
@@ -164,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/external/poky/bitbake/lib/toaster/bldcontrol/migrations/0001_initial.py b/external/poky/bitbake/lib/toaster/bldcontrol/migrations/0001_initial.py
index 67db3785..7ee19f47 100644
--- a/external/poky/bitbake/lib/toaster/bldcontrol/migrations/0001_initial.py
+++ b/external/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/external/poky/bitbake/lib/toaster/bldcontrol/models.py b/external/poky/bitbake/lib/toaster/bldcontrol/models.py
index 409614b9..c2f302da 100644
--- a/external/poky/bitbake/lib/toaster/bldcontrol/models.py
+++ b/external/poky/bitbake/lib/toaster/bldcontrol/models.py
@@ -1,8 +1,11 @@
+#
+# SPDX-License-Identifier: GPL-2.0-only
+#
+
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")
@@ -82,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)
@@ -128,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()
diff --git a/external/poky/bitbake/lib/toaster/bldcontrol/views.py b/external/poky/bitbake/lib/toaster/bldcontrol/views.py
index 60f00ef0..286d88b4 100644
--- a/external/poky/bitbake/lib/toaster/bldcontrol/views.py
+++ b/external/poky/bitbake/lib/toaster/bldcontrol/views.py
@@ -1 +1,5 @@
+#
+# SPDX-License-Identifier: GPL-2.0-only
+#
+
# Create your views here.
diff --git a/external/poky/bitbake/lib/toaster/manage.py b/external/poky/bitbake/lib/toaster/manage.py
index 0c7ea508..ae32619d 100755
--- a/external/poky/bitbake/lib/toaster/manage.py
+++ b/external/poky/bitbake/lib/toaster/manage.py
@@ -1,4 +1,8 @@
#!/usr/bin/env python3
+#
+# SPDX-License-Identifier: GPL-2.0-only
+#
+
import os
import sys
diff --git a/external/poky/bitbake/lib/toaster/orm/fixtures/oe-core.xml b/external/poky/bitbake/lib/toaster/orm/fixtures/oe-core.xml
index 3ed234ca..fd93f4d8 100644
--- a/external/poky/bitbake/lib/toaster/orm/fixtures/oe-core.xml
+++ b/external/poky/bitbake/lib/toaster/orm/fixtures/oe-core.xml
@@ -8,9 +8,9 @@
<!-- Bitbake versions which correspond to the metadata release -->
<object model="orm.bitbakeversion" pk="1">
- <field type="CharField" name="name">sumo</field>
+ <field type="CharField" name="name">dunfell</field>
<field type="CharField" name="giturl">git://git.openembedded.org/bitbake</field>
- <field type="CharField" name="branch">1.38</field>
+ <field type="CharField" name="branch">1.46</field>
</object>
<object model="orm.bitbakeversion" pk="2">
<field type="CharField" name="name">HEAD</field>
@@ -23,18 +23,18 @@
<field type="CharField" name="branch">master</field>
</object>
<object model="orm.bitbakeversion" pk="4">
- <field type="CharField" name="name">thud</field>
+ <field type="CharField" name="name">zeus</field>
<field type="CharField" name="giturl">git://git.openembedded.org/bitbake</field>
- <field type="CharField" name="branch">1.40</field>
+ <field type="CharField" name="branch">1.44</field>
</object>
<!-- Releases available -->
<object model="orm.release" pk="1">
- <field type="CharField" name="name">sumo</field>
- <field type="CharField" name="description">Openembedded Sumo</field>
+ <field type="CharField" name="name">dunfell</field>
+ <field type="CharField" name="description">Openembedded Dunfell</field>
<field rel="ManyToOneRel" to="orm.bitbakeversion" name="bitbake_version">1</field>
- <field type="CharField" name="branch_name">sumo</field>
- <field type="TextField" name="helptext">Toaster will run your builds using the tip of the &lt;a href=\"http://cgit.openembedded.org/openembedded-core/log/?h=sumo\"&gt;OpenEmbedded Sumo&lt;/a&gt; branch.</field>
+ <field type="CharField" name="branch_name">dunfell</field>
+ <field type="TextField" name="helptext">Toaster will run your builds using the tip of the &lt;a href=\"http://cgit.openembedded.org/openembedded-core/log/?h=dunfell\"&gt;OpenEmbedded Dunfell&lt;/a&gt; branch.</field>
</object>
<object model="orm.release" pk="2">
<field type="CharField" name="name">local</field>
@@ -51,11 +51,11 @@
<field type="TextField" name="helptext">Toaster will run your builds using the tip of the &lt;a href=\"http://cgit.openembedded.org/openembedded-core/log/\"&gt;OpenEmbedded master&lt;/a&gt; branch.</field>
</object>
<object model="orm.release" pk="4">
- <field type="CharField" name="name">thud</field>
- <field type="CharField" name="description">Openembedded Thud</field>
+ <field type="CharField" name="name">zeus</field>
+ <field type="CharField" name="description">Openembedded Zeus</field>
<field rel="ManyToOneRel" to="orm.bitbakeversion" name="bitbake_version">4</field>
- <field type="CharField" name="branch_name">thud</field>
- <field type="TextField" name="helptext">Toaster will run your builds using the tip of the &lt;a href=\"http://cgit.openembedded.org/openembedded-core/log/?h=thud\"&gt;OpenEmbedded Thud&lt;/a&gt; branch.</field>
+ <field type="CharField" name="branch_name">zeus</field>
+ <field type="TextField" name="helptext">Toaster will run your builds using the tip of the &lt;a href=\"http://cgit.openembedded.org/openembedded-core/log/?h=zeus\"&gt;OpenEmbedded Zeus&lt;/a&gt; branch.</field>
</object>
<!-- Default layers for each release -->
diff --git a/external/poky/bitbake/lib/toaster/orm/fixtures/poky.xml b/external/poky/bitbake/lib/toaster/orm/fixtures/poky.xml
index 80b7ef5e..902bc88a 100644
--- a/external/poky/bitbake/lib/toaster/orm/fixtures/poky.xml
+++ b/external/poky/bitbake/lib/toaster/orm/fixtures/poky.xml
@@ -8,9 +8,9 @@
<!-- Bitbake versions which correspond to the metadata release -->
<object model="orm.bitbakeversion" pk="1">
- <field type="CharField" name="name">sumo</field>
+ <field type="CharField" name="name">dunfell</field>
<field type="CharField" name="giturl">git://git.yoctoproject.org/poky</field>
- <field type="CharField" name="branch">sumo</field>
+ <field type="CharField" name="branch">dunfell</field>
<field type="CharField" name="dirpath">bitbake</field>
</object>
<object model="orm.bitbakeversion" pk="2">
@@ -26,20 +26,20 @@
<field type="CharField" name="dirpath">bitbake</field>
</object>
<object model="orm.bitbakeversion" pk="4">
- <field type="CharField" name="name">thud</field>
+ <field type="CharField" name="name">zeus</field>
<field type="CharField" name="giturl">git://git.yoctoproject.org/poky</field>
- <field type="CharField" name="branch">thud</field>
+ <field type="CharField" name="branch">zeus</field>
<field type="CharField" name="dirpath">bitbake</field>
</object>
<!-- Releases available -->
<object model="orm.release" pk="1">
- <field type="CharField" name="name">sumo</field>
- <field type="CharField" name="description">Yocto Project 2.5 "Sumo"</field>
+ <field type="CharField" name="name">dunfell</field>
+ <field type="CharField" name="description">Yocto Project 3.1 "Dunfell"</field>
<field rel="ManyToOneRel" to="orm.bitbakeversion" name="bitbake_version">1</field>
- <field type="CharField" name="branch_name">sumo</field>
- <field type="TextField" name="helptext">Toaster will run your builds using the tip of the &lt;a href="http://git.yoctoproject.org/cgit/cgit.cgi/poky/log/?h=sumo"&gt;Yocto Project Sumo branch&lt;/a&gt;.</field>
+ <field type="CharField" name="branch_name">dunfell</field>
+ <field type="TextField" name="helptext">Toaster will run your builds using the tip of the &lt;a href="http://git.yoctoproject.org/cgit/cgit.cgi/poky/log/?h=dunfell"&gt;Yocto Project Dunfell branch&lt;/a&gt;.</field>
</object>
<object model="orm.release" pk="2">
<field type="CharField" name="name">local</field>
@@ -56,11 +56,11 @@
<field type="TextField" name="helptext">Toaster will run your builds using the tip of the &lt;a href="http://git.yoctoproject.org/cgit/cgit.cgi/poky/log/"&gt;Yocto Project Master branch&lt;/a&gt;.</field>
</object>
<object model="orm.release" pk="4">
- <field type="CharField" name="name">thud</field>
- <field type="CharField" name="description">Yocto Project 2.6 "Thud"</field>
+ <field type="CharField" name="name">zeus</field>
+ <field type="CharField" name="description">Yocto Project 3.0 "Zeus"</field>
<field rel="ManyToOneRel" to="orm.bitbakeversion" name="bitbake_version">4</field>
- <field type="CharField" name="branch_name">thud</field>
- <field type="TextField" name="helptext">Toaster will run your builds using the tip of the &lt;a href="http://git.yoctoproject.org/cgit/cgit.cgi/poky/log/?h=thud"&gt;Yocto Project Thud branch&lt;/a&gt;.</field>
+ <field type="CharField" name="branch_name">zeus</field>
+ <field type="TextField" name="helptext">Toaster will run your builds using the tip of the &lt;a href="http://git.yoctoproject.org/cgit/cgit.cgi/poky/log/?h=zeus"&gt;Yocto Project Zeus branch&lt;/a&gt;.</field>
</object>
<!-- Default project layers for each release -->
@@ -130,7 +130,7 @@
<field rel="ManyToOneRel" to="orm.layer" name="layer">1</field>
<field type="IntegerField" name="layer_source">0</field>
<field rel="ManyToOneRel" to="orm.release" name="release">1</field>
- <field type="CharField" name="branch">sumo</field>
+ <field type="CharField" name="branch">dunfell</field>
<field type="CharField" name="dirpath">meta</field>
</object>
<object model="orm.layer_version" pk="2">
@@ -152,7 +152,7 @@
<field rel="ManyToOneRel" to="orm.layer" name="layer">1</field>
<field type="IntegerField" name="layer_source">0</field>
<field rel="ManyToOneRel" to="orm.release" name="release">4</field>
- <field type="CharField" name="branch">thud</field>
+ <field type="CharField" name="branch">zeus</field>
<field type="CharField" name="dirpath">meta</field>
</object>
@@ -168,7 +168,7 @@
<field rel="ManyToOneRel" to="orm.layer" name="layer">2</field>
<field type="IntegerField" name="layer_source">0</field>
<field rel="ManyToOneRel" to="orm.release" name="release">1</field>
- <field type="CharField" name="branch">sumo</field>
+ <field type="CharField" name="branch">dunfell</field>
<field type="CharField" name="dirpath">meta-poky</field>
</object>
<object model="orm.layer_version" pk="6">
@@ -190,7 +190,7 @@
<field rel="ManyToOneRel" to="orm.layer" name="layer">2</field>
<field type="IntegerField" name="layer_source">0</field>
<field rel="ManyToOneRel" to="orm.release" name="release">4</field>
- <field type="CharField" name="branch">thud</field>
+ <field type="CharField" name="branch">zeus</field>
<field type="CharField" name="dirpath">meta-poky</field>
</object>
@@ -206,7 +206,7 @@
<field rel="ManyToOneRel" to="orm.layer" name="layer">3</field>
<field type="IntegerField" name="layer_source">0</field>
<field rel="ManyToOneRel" to="orm.release" name="release">1</field>
- <field type="CharField" name="branch">sumo</field>
+ <field type="CharField" name="branch">dunfell</field>
<field type="CharField" name="dirpath">meta-yocto-bsp</field>
</object>
<object model="orm.layer_version" pk="10">
@@ -228,7 +228,7 @@
<field rel="ManyToOneRel" to="orm.layer" name="layer">3</field>
<field type="IntegerField" name="layer_source">0</field>
<field rel="ManyToOneRel" to="orm.release" name="release">4</field>
- <field type="CharField" name="branch">thud</field>
+ <field type="CharField" name="branch">zeus</field>
<field type="CharField" name="dirpath">meta-yocto-bsp</field>
</object>
</django-objects>
diff --git a/external/poky/bitbake/lib/toaster/orm/management/commands/lsupdates.py b/external/poky/bitbake/lib/toaster/orm/management/commands/lsupdates.py
index 66114ff8..a4dbcaa7 100644
--- a/external/poky/bitbake/lib/toaster/orm/management/commands/lsupdates.py
+++ b/external/poky/bitbake/lib/toaster/orm/management/commands/lsupdates.py
@@ -1,27 +1,14 @@
#
-# ex:ts=4:sw=4:sts=4:et
-# -*- tab-width: 4; c-basic-offset: 4; indent-tabs-mode: nil -*-
-#
# BitBake Toaster Implementation
#
# Copyright (C) 2016-2017 Intel Corporation
#
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License version 2 as
-# published by the Free Software Foundation.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
+# SPDX-License-Identifier: GPL-2.0-only
#
-# You should have received a copy of the GNU General Public License along
-# with this program; if not, write to the Free Software Foundation, Inc.,
-# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
from django.core.management.base import BaseCommand
-from orm.models import LayerSource, Layer, Release, Layer_Version
+from orm.models import Layer, Release, Layer_Version
from orm.models import LayerVersionDependency, Machine, Recipe
from orm.models import Distro
from orm.models import ToasterSetting
diff --git a/external/poky/bitbake/lib/toaster/orm/migrations/0001_initial.py b/external/poky/bitbake/lib/toaster/orm/migrations/0001_initial.py
index 760462f6..a8ac23bf 100644
--- a/external/poky/bitbake/lib/toaster/orm/migrations/0001_initial.py
+++ b/external/poky/bitbake/lib/toaster/orm/migrations/0001_initial.py
@@ -54,7 +54,7 @@ class Migration(migrations.Migration):
('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)),
('file_name', models.FilePathField()),
('file_size', models.IntegerField()),
- ('build', models.ForeignKey(to='orm.Build')),
+ ('build', models.ForeignKey(to='orm.Build', on_delete=models.CASCADE)),
],
),
migrations.CreateModel(
@@ -64,7 +64,7 @@ class Migration(migrations.Migration):
('area', models.IntegerField(choices=[(0, b'variable')])),
('key', models.CharField(max_length=100)),
('text', models.TextField()),
- ('build', models.ForeignKey(related_name='helptext_build', to='orm.Build')),
+ ('build', models.ForeignKey(related_name='helptext_build', to='orm.Build', on_delete=models.CASCADE)),
],
),
migrations.CreateModel(
@@ -94,8 +94,8 @@ class Migration(migrations.Migration):
('dirpath', models.CharField(default=None, max_length=255, null=True)),
('priority', models.IntegerField(default=0)),
('local_path', models.FilePathField(default=b'/', max_length=1024)),
- ('build', models.ForeignKey(related_name='layer_version_build', default=None, to='orm.Build', null=True)),
- ('layer', models.ForeignKey(related_name='layer_version_layer', to='orm.Layer')),
+ ('build', models.ForeignKey(related_name='layer_version_build', default=None, to='orm.Build', null=True, on_delete=models.CASCADE)),
+ ('layer', models.ForeignKey(related_name='layer_version_layer', to='orm.Layer', on_delete=models.CASCADE)),
],
),
migrations.CreateModel(
@@ -112,9 +112,9 @@ class Migration(migrations.Migration):
fields=[
('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)),
('up_id', models.IntegerField(default=None, null=True)),
- ('depends_on', models.ForeignKey(related_name='dependees', to='orm.Layer_Version')),
- ('layer_source', models.ForeignKey(default=None, to='orm.LayerSource', null=True)),
- ('layer_version', models.ForeignKey(related_name='dependencies', to='orm.Layer_Version')),
+ ('depends_on', models.ForeignKey(related_name='dependees', to='orm.Layer_Version', on_delete=models.CASCADE)),
+ ('layer_source', models.ForeignKey(default=None, to='orm.LayerSource', null=True, on_delete=models.CASCADE)),
+ ('layer_version', models.ForeignKey(related_name='dependencies', to='orm.Layer_Version', on_delete=models.CASCADE)),
],
),
migrations.CreateModel(
@@ -125,7 +125,7 @@ class Migration(migrations.Migration):
('message', models.TextField(null=True, blank=True)),
('pathname', models.FilePathField(max_length=255, blank=True)),
('lineno', models.IntegerField(null=True)),
- ('build', models.ForeignKey(to='orm.Build')),
+ ('build', models.ForeignKey(to='orm.Build', on_delete=models.CASCADE)),
],
),
migrations.CreateModel(
@@ -136,8 +136,8 @@ class Migration(migrations.Migration):
('up_date', models.DateTimeField(default=None, null=True)),
('name', models.CharField(max_length=255)),
('description', models.CharField(max_length=255)),
- ('layer_source', models.ForeignKey(default=None, to='orm.LayerSource', null=True)),
- ('layer_version', models.ForeignKey(to='orm.Layer_Version')),
+ ('layer_source', models.ForeignKey(default=None, to='orm.LayerSource', null=True, on_delete=models.CASCADE)),
+ ('layer_version', models.ForeignKey(to='orm.Layer_Version', on_delete=models.CASCADE)),
],
),
migrations.CreateModel(
@@ -154,7 +154,7 @@ class Migration(migrations.Migration):
('installed_size', models.IntegerField(default=0)),
('section', models.CharField(max_length=80, blank=True)),
('license', models.CharField(max_length=80, blank=True)),
- ('build', models.ForeignKey(to='orm.Build', null=True)),
+ ('build', models.ForeignKey(to='orm.Build', null=True, on_delete=models.CASCADE)),
],
),
migrations.CreateModel(
@@ -162,8 +162,8 @@ class Migration(migrations.Migration):
fields=[
('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)),
('dep_type', models.IntegerField(choices=[(0, b'depends'), (1, b'depends'), (3, b'recommends'), (2, b'recommends'), (4, b'suggests'), (5, b'provides'), (6, b'replaces'), (7, b'conflicts')])),
- ('depends_on', models.ForeignKey(related_name='package_dependencies_target', to='orm.Package')),
- ('package', models.ForeignKey(related_name='package_dependencies_source', to='orm.Package')),
+ ('depends_on', models.ForeignKey(related_name='package_dependencies_target', to='orm.Package', on_delete=models.CASCADE)),
+ ('package', models.ForeignKey(related_name='package_dependencies_source', to='orm.Package', on_delete=models.CASCADE)),
],
),
migrations.CreateModel(
@@ -172,7 +172,7 @@ class Migration(migrations.Migration):
('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)),
('path', models.FilePathField(max_length=255, blank=True)),
('size', models.IntegerField()),
- ('package', models.ForeignKey(related_name='buildfilelist_package', to='orm.Package')),
+ ('package', models.ForeignKey(related_name='buildfilelist_package', to='orm.Package', on_delete=models.CASCADE)),
],
),
migrations.CreateModel(
@@ -185,7 +185,7 @@ class Migration(migrations.Migration):
('updated', models.DateTimeField(auto_now=True)),
('user_id', models.IntegerField(null=True)),
('is_default', models.BooleanField(default=False)),
- ('bitbake_version', models.ForeignKey(to='orm.BitbakeVersion', null=True)),
+ ('bitbake_version', models.ForeignKey(to='orm.BitbakeVersion', null=True, on_delete=models.CASCADE)),
],
),
migrations.CreateModel(
@@ -193,8 +193,8 @@ class Migration(migrations.Migration):
fields=[
('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)),
('optional', models.BooleanField(default=True)),
- ('layercommit', models.ForeignKey(to='orm.Layer_Version', null=True)),
- ('project', models.ForeignKey(to='orm.Project')),
+ ('layercommit', models.ForeignKey(to='orm.Layer_Version', null=True, on_delete=models.CASCADE)),
+ ('project', models.ForeignKey(to='orm.Project', on_delete=models.CASCADE)),
],
),
migrations.CreateModel(
@@ -203,7 +203,7 @@ class Migration(migrations.Migration):
('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)),
('target', models.CharField(max_length=100)),
('task', models.CharField(max_length=100, null=True)),
- ('project', models.ForeignKey(to='orm.Project')),
+ ('project', models.ForeignKey(to='orm.Project', on_delete=models.CASCADE)),
],
),
migrations.CreateModel(
@@ -212,7 +212,7 @@ class Migration(migrations.Migration):
('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)),
('name', models.CharField(max_length=100)),
('value', models.TextField(blank=True)),
- ('project', models.ForeignKey(to='orm.Project')),
+ ('project', models.ForeignKey(to='orm.Project', on_delete=models.CASCADE)),
],
),
migrations.CreateModel(
@@ -232,8 +232,8 @@ class Migration(migrations.Migration):
('file_path', models.FilePathField(max_length=255)),
('pathflags', models.CharField(max_length=200, blank=True)),
('is_image', models.BooleanField(default=False)),
- ('layer_source', models.ForeignKey(default=None, to='orm.LayerSource', null=True)),
- ('layer_version', models.ForeignKey(related_name='recipe_layer_version', to='orm.Layer_Version')),
+ ('layer_source', models.ForeignKey(default=None, to='orm.LayerSource', null=True, on_delete=models.CASCADE)),
+ ('layer_version', models.ForeignKey(related_name='recipe_layer_version', to='orm.Layer_Version', on_delete=models.CASCADE)),
],
),
migrations.CreateModel(
@@ -241,8 +241,8 @@ class Migration(migrations.Migration):
fields=[
('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)),
('dep_type', models.IntegerField(choices=[(0, b'depends'), (1, b'rdepends')])),
- ('depends_on', models.ForeignKey(related_name='r_dependencies_depends', to='orm.Recipe')),
- ('recipe', models.ForeignKey(related_name='r_dependencies_recipe', to='orm.Recipe')),
+ ('depends_on', models.ForeignKey(related_name='r_dependencies_depends', to='orm.Recipe', on_delete=models.CASCADE)),
+ ('recipe', models.ForeignKey(related_name='r_dependencies_recipe', to='orm.Recipe', on_delete=models.CASCADE)),
],
),
migrations.CreateModel(
@@ -253,7 +253,7 @@ class Migration(migrations.Migration):
('description', models.CharField(max_length=255)),
('branch_name', models.CharField(default=b'', max_length=50)),
('helptext', models.TextField(null=True)),
- ('bitbake_version', models.ForeignKey(to='orm.BitbakeVersion')),
+ ('bitbake_version', models.ForeignKey(to='orm.BitbakeVersion', on_delete=models.CASCADE)),
],
),
migrations.CreateModel(
@@ -261,7 +261,7 @@ class Migration(migrations.Migration):
fields=[
('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)),
('layer_name', models.CharField(default=b'', max_length=100)),
- ('release', models.ForeignKey(to='orm.Release')),
+ ('release', models.ForeignKey(to='orm.Release', on_delete=models.CASCADE)),
],
),
migrations.CreateModel(
@@ -269,8 +269,8 @@ class Migration(migrations.Migration):
fields=[
('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)),
('priority', models.IntegerField(default=0)),
- ('layer_source', models.ForeignKey(to='orm.LayerSource')),
- ('release', models.ForeignKey(to='orm.Release')),
+ ('layer_source', models.ForeignKey(to='orm.LayerSource', on_delete=models.CASCADE)),
+ ('release', models.ForeignKey(to='orm.Release', on_delete=models.CASCADE)),
],
),
migrations.CreateModel(
@@ -282,7 +282,7 @@ class Migration(migrations.Migration):
('is_image', models.BooleanField(default=False)),
('image_size', models.IntegerField(default=0)),
('license_manifest_path', models.CharField(max_length=500, null=True)),
- ('build', models.ForeignKey(to='orm.Build')),
+ ('build', models.ForeignKey(to='orm.Build', on_delete=models.CASCADE)),
],
),
migrations.CreateModel(
@@ -295,9 +295,9 @@ class Migration(migrations.Migration):
('permission', models.CharField(max_length=16)),
('owner', models.CharField(max_length=128)),
('group', models.CharField(max_length=128)),
- ('directory', models.ForeignKey(related_name='directory_set', to='orm.Target_File', null=True)),
- ('sym_target', models.ForeignKey(related_name='symlink_set', to='orm.Target_File', null=True)),
- ('target', models.ForeignKey(to='orm.Target')),
+ ('directory', models.ForeignKey(related_name='directory_set', to='orm.Target_File', null=True, on_delete=models.CASCADE)),
+ ('sym_target', models.ForeignKey(related_name='symlink_set', to='orm.Target_File', null=True, on_delete=models.CASCADE)),
+ ('target', models.ForeignKey(to='orm.Target', on_delete=models.CASCADE)),
],
),
migrations.CreateModel(
@@ -306,15 +306,15 @@ class Migration(migrations.Migration):
('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)),
('file_name', models.FilePathField(max_length=254)),
('file_size', models.IntegerField()),
- ('target', models.ForeignKey(to='orm.Target')),
+ ('target', models.ForeignKey(to='orm.Target', on_delete=models.CASCADE)),
],
),
migrations.CreateModel(
name='Target_Installed_Package',
fields=[
('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)),
- ('package', models.ForeignKey(related_name='buildtargetlist_package', to='orm.Package')),
- ('target', models.ForeignKey(to='orm.Target')),
+ ('package', models.ForeignKey(related_name='buildtargetlist_package', to='orm.Package', on_delete=models.CASCADE)),
+ ('target', models.ForeignKey(to='orm.Target', on_delete=models.CASCADE)),
],
),
migrations.CreateModel(
@@ -337,8 +337,8 @@ class Migration(migrations.Migration):
('sstate_result', models.IntegerField(default=0, choices=[(0, b'Not Applicable'), (1, b'File not in cache'), (2, b'Failed'), (3, b'Succeeded')])),
('message', models.CharField(max_length=240)),
('logfile', models.FilePathField(max_length=255, blank=True)),
- ('build', models.ForeignKey(related_name='task_build', to='orm.Build')),
- ('recipe', models.ForeignKey(related_name='tasks', to='orm.Recipe')),
+ ('build', models.ForeignKey(related_name='task_build', to='orm.Build', on_delete=models.CASCADE)),
+ ('recipe', models.ForeignKey(related_name='tasks', to='orm.Recipe', on_delete=models.CASCADE)),
],
options={
'ordering': ('order', 'recipe'),
@@ -348,8 +348,8 @@ class Migration(migrations.Migration):
name='Task_Dependency',
fields=[
('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)),
- ('depends_on', models.ForeignKey(related_name='task_dependencies_depends', to='orm.Task')),
- ('task', models.ForeignKey(related_name='task_dependencies_task', to='orm.Task')),
+ ('depends_on', models.ForeignKey(related_name='task_dependencies_depends', to='orm.Task', on_delete=models.CASCADE)),
+ ('task', models.ForeignKey(related_name='task_dependencies_task', to='orm.Task', on_delete=models.CASCADE)),
],
),
migrations.CreateModel(
@@ -370,7 +370,7 @@ class Migration(migrations.Migration):
('changed', models.BooleanField(default=False)),
('human_readable_name', models.CharField(max_length=200)),
('description', models.TextField(blank=True)),
- ('build', models.ForeignKey(related_name='variable_build', to='orm.Build')),
+ ('build', models.ForeignKey(related_name='variable_build', to='orm.Build', on_delete=models.CASCADE)),
],
),
migrations.CreateModel(
@@ -381,28 +381,28 @@ class Migration(migrations.Migration):
('file_name', models.FilePathField(max_length=255)),
('line_number', models.IntegerField(null=True)),
('operation', models.CharField(max_length=64)),
- ('variable', models.ForeignKey(related_name='vhistory', to='orm.Variable')),
+ ('variable', models.ForeignKey(related_name='vhistory', to='orm.Variable', on_delete=models.CASCADE)),
],
),
migrations.AddField(
model_name='project',
name='release',
- field=models.ForeignKey(to='orm.Release', null=True),
+ field=models.ForeignKey(to='orm.Release', null=True, on_delete=models.CASCADE),
),
migrations.AddField(
model_name='package_dependency',
name='target',
- field=models.ForeignKey(to='orm.Target', null=True),
+ field=models.ForeignKey(to='orm.Target', null=True, on_delete=models.CASCADE),
),
migrations.AddField(
model_name='package',
name='recipe',
- field=models.ForeignKey(to='orm.Recipe', null=True),
+ field=models.ForeignKey(to='orm.Recipe', null=True, on_delete=models.CASCADE),
),
migrations.AddField(
model_name='logmessage',
name='task',
- field=models.ForeignKey(blank=True, to='orm.Task', null=True),
+ field=models.ForeignKey(blank=True, to='orm.Task', null=True, on_delete=models.CASCADE),
),
migrations.AlterUniqueTogether(
name='layersource',
@@ -411,32 +411,32 @@ class Migration(migrations.Migration):
migrations.AddField(
model_name='layer_version',
name='layer_source',
- field=models.ForeignKey(default=None, to='orm.LayerSource', null=True),
+ field=models.ForeignKey(default=None, to='orm.LayerSource', null=True, on_delete=models.CASCADE),
),
migrations.AddField(
model_name='layer_version',
name='project',
- field=models.ForeignKey(default=None, to='orm.Project', null=True),
+ field=models.ForeignKey(default=None, to='orm.Project', null=True, on_delete=models.CASCADE),
),
migrations.AddField(
model_name='layer_version',
name='up_branch',
- field=models.ForeignKey(default=None, to='orm.Branch', null=True),
+ field=models.ForeignKey(default=None, to='orm.Branch', null=True, on_delete=models.CASCADE),
),
migrations.AddField(
model_name='layer',
name='layer_source',
- field=models.ForeignKey(default=None, to='orm.LayerSource', null=True),
+ field=models.ForeignKey(default=None, to='orm.LayerSource', null=True, on_delete=models.CASCADE),
),
migrations.AddField(
model_name='build',
name='project',
- field=models.ForeignKey(to='orm.Project'),
+ field=models.ForeignKey(to='orm.Project', on_delete=models.CASCADE),
),
migrations.AddField(
model_name='branch',
name='layer_source',
- field=models.ForeignKey(default=True, to='orm.LayerSource', null=True),
+ field=models.ForeignKey(default=True, to='orm.LayerSource', null=True, on_delete=models.CASCADE),
),
migrations.CreateModel(
name='ImportedLayerSource',
diff --git a/external/poky/bitbake/lib/toaster/orm/migrations/0002_customimagerecipe.py b/external/poky/bitbake/lib/toaster/orm/migrations/0002_customimagerecipe.py
index 9cec82e8..09c2bffa 100644
--- a/external/poky/bitbake/lib/toaster/orm/migrations/0002_customimagerecipe.py
+++ b/external/poky/bitbake/lib/toaster/orm/migrations/0002_customimagerecipe.py
@@ -14,10 +14,10 @@ class Migration(migrations.Migration):
migrations.CreateModel(
name='CustomImageRecipe',
fields=[
- ('recipe_ptr', models.OneToOneField(parent_link=True, auto_created=True, primary_key=True, serialize=False, to='orm.Recipe')),
+ ('recipe_ptr', models.OneToOneField(parent_link=True, auto_created=True, primary_key=True, serialize=False, to='orm.Recipe', on_delete=models.CASCADE)),
('last_updated', models.DateTimeField(default=None, null=True)),
- ('base_recipe', models.ForeignKey(related_name='based_on_recipe', to='orm.Recipe')),
- ('project', models.ForeignKey(to='orm.Project')),
+ ('base_recipe', models.ForeignKey(related_name='based_on_recipe', to='orm.Recipe', on_delete=models.CASCADE)),
+ ('project', models.ForeignKey(to='orm.Project', on_delete=models.CASCADE)),
],
bases=('orm.recipe',),
),
diff --git a/external/poky/bitbake/lib/toaster/orm/migrations/0003_customimagepackage.py b/external/poky/bitbake/lib/toaster/orm/migrations/0003_customimagepackage.py
index b027f661..8cb81d7b 100644
--- a/external/poky/bitbake/lib/toaster/orm/migrations/0003_customimagepackage.py
+++ b/external/poky/bitbake/lib/toaster/orm/migrations/0003_customimagepackage.py
@@ -14,7 +14,7 @@ class Migration(migrations.Migration):
migrations.CreateModel(
name='CustomImagePackage',
fields=[
- ('package_ptr', models.OneToOneField(parent_link=True, auto_created=True, primary_key=True, serialize=False, to='orm.Package')),
+ ('package_ptr', models.OneToOneField(parent_link=True, auto_created=True, primary_key=True, serialize=False, to='orm.Package', on_delete=models.CASCADE)),
('recipe_appends', models.ManyToManyField(related_name='appends_set', to='orm.CustomImageRecipe')),
('recipe_excludes', models.ManyToManyField(related_name='excludes_set', to='orm.CustomImageRecipe')),
('recipe_includes', models.ManyToManyField(related_name='includes_set', to='orm.CustomImageRecipe')),
diff --git a/external/poky/bitbake/lib/toaster/orm/migrations/0004_provides.py b/external/poky/bitbake/lib/toaster/orm/migrations/0004_provides.py
index dfde2d13..84496049 100644
--- a/external/poky/bitbake/lib/toaster/orm/migrations/0004_provides.py
+++ b/external/poky/bitbake/lib/toaster/orm/migrations/0004_provides.py
@@ -16,12 +16,12 @@ class Migration(migrations.Migration):
fields=[
('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)),
('name', models.CharField(max_length=100)),
- ('recipe', models.ForeignKey(to='orm.Recipe')),
+ ('recipe', models.ForeignKey(to='orm.Recipe', on_delete=models.CASCADE)),
],
),
migrations.AddField(
model_name='recipe_dependency',
name='via',
- field=models.ForeignKey(null=True, default=None, to='orm.Provides'),
+ field=models.ForeignKey(null=True, default=None, to='orm.Provides', on_delete=models.CASCADE),
),
]
diff --git a/external/poky/bitbake/lib/toaster/orm/migrations/0008_refactor_artifact_models.py b/external/poky/bitbake/lib/toaster/orm/migrations/0008_refactor_artifact_models.py
index 3367582a..41a547a6 100644
--- a/external/poky/bitbake/lib/toaster/orm/migrations/0008_refactor_artifact_models.py
+++ b/external/poky/bitbake/lib/toaster/orm/migrations/0008_refactor_artifact_models.py
@@ -17,7 +17,7 @@ class Migration(migrations.Migration):
('id', models.AutoField(auto_created=True, primary_key=True, verbose_name='ID', serialize=False)),
('file_name', models.FilePathField()),
('file_size', models.IntegerField()),
- ('target', models.ForeignKey(to='orm.Target')),
+ ('target', models.ForeignKey(to='orm.Target', on_delete=models.CASCADE)),
],
),
migrations.CreateModel(
@@ -26,7 +26,7 @@ class Migration(migrations.Migration):
('id', models.AutoField(auto_created=True, primary_key=True, verbose_name='ID', serialize=False)),
('file_name', models.FilePathField()),
('file_size', models.IntegerField()),
- ('target', models.ForeignKey(to='orm.Target')),
+ ('target', models.ForeignKey(to='orm.Target', on_delete=models.CASCADE)),
],
),
migrations.RemoveField(
diff --git a/external/poky/bitbake/lib/toaster/orm/migrations/0011_delete_layersource.py b/external/poky/bitbake/lib/toaster/orm/migrations/0011_delete_layersource.py
index 75506961..3f3a2e16 100644
--- a/external/poky/bitbake/lib/toaster/orm/migrations/0011_delete_layersource.py
+++ b/external/poky/bitbake/lib/toaster/orm/migrations/0011_delete_layersource.py
@@ -1,7 +1,7 @@
# -*- coding: utf-8 -*-
from __future__ import unicode_literals
-from django.db import migrations, models
+from django.db import migrations
class Migration(migrations.Migration):
diff --git a/external/poky/bitbake/lib/toaster/orm/migrations/0012_use_release_instead_of_up_branch.py b/external/poky/bitbake/lib/toaster/orm/migrations/0012_use_release_instead_of_up_branch.py
index 0e6bb833..4b96bf09 100644
--- a/external/poky/bitbake/lib/toaster/orm/migrations/0012_use_release_instead_of_up_branch.py
+++ b/external/poky/bitbake/lib/toaster/orm/migrations/0012_use_release_instead_of_up_branch.py
@@ -46,7 +46,7 @@ class Migration(migrations.Migration):
migrations.AddField(
model_name='layer_version',
name='release',
- field=models.ForeignKey(to='orm.Release', default=None, null=True),
+ field=models.ForeignKey(to='orm.Release', default=None, null=True, on_delete=models.CASCADE),
),
migrations.RunPython(branch_to_release,
reverse_code=migrations.RunPython.noop),
diff --git a/external/poky/bitbake/lib/toaster/orm/migrations/0017_distro_clone.py b/external/poky/bitbake/lib/toaster/orm/migrations/0017_distro_clone.py
index d3c59012..731c0deb 100644
--- a/external/poky/bitbake/lib/toaster/orm/migrations/0017_distro_clone.py
+++ b/external/poky/bitbake/lib/toaster/orm/migrations/0017_distro_clone.py
@@ -18,7 +18,7 @@ class Migration(migrations.Migration):
('up_date', models.DateTimeField(default=None, null=True)),
('name', models.CharField(max_length=255)),
('description', models.CharField(max_length=255)),
- ('layer_version', models.ForeignKey(to='orm.Layer_Version')),
+ ('layer_version', models.ForeignKey(to='orm.Layer_Version', on_delete=models.CASCADE)),
],
),
]
diff --git a/external/poky/bitbake/lib/toaster/orm/migrations/0019_django_2_2.py b/external/poky/bitbake/lib/toaster/orm/migrations/0019_django_2_2.py
new file mode 100644
index 00000000..666aef18
--- /dev/null
+++ b/external/poky/bitbake/lib/toaster/orm/migrations/0019_django_2_2.py
@@ -0,0 +1,23 @@
+# Generated by Django 2.2.7 on 2019-11-19 03:38
+
+from django.db import migrations, models
+import django.db.models.deletion
+
+
+class Migration(migrations.Migration):
+
+ dependencies = [
+ ('orm', '0018_project_specific'),
+ ]
+
+ operations = [
+ migrations.RemoveField(
+ model_name='distro',
+ name='up_id',
+ ),
+ migrations.AlterField(
+ model_name='build',
+ name='recipes_parsed',
+ field=models.IntegerField(default=1),
+ ),
+ ]
diff --git a/external/poky/bitbake/lib/toaster/orm/models.py b/external/poky/bitbake/lib/toaster/orm/models.py
index 77202902..7f7e922a 100644
--- a/external/poky/bitbake/lib/toaster/orm/models.py
+++ b/external/poky/bitbake/lib/toaster/orm/models.py
@@ -1,23 +1,10 @@
#
-# ex:ts=4:sw=4:sts=4:et
-# -*- tab-width: 4; c-basic-offset: 4; indent-tabs-mode: nil -*-
-#
# BitBake Toaster Implementation
#
# Copyright (C) 2013 Intel Corporation
#
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License version 2 as
-# published by the Free Software Foundation.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
+# SPDX-License-Identifier: GPL-2.0-only
#
-# You should have received a copy of the GNU General Public License along
-# with this program; if not, write to the Free Software Foundation, Inc.,
-# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
from __future__ import unicode_literals
@@ -26,7 +13,7 @@ from django.db.models import F, Q, Sum, Count
from django.utils import timezone
from django.utils.encoding import force_bytes
-from django.core.urlresolvers import reverse
+from django.urls import reverse
from django.core import validators
from django.conf import settings
@@ -191,8 +178,8 @@ class Project(models.Model):
'release__branch_name']
name = models.CharField(max_length=100)
short_description = models.CharField(max_length=50, blank=True)
- bitbake_version = models.ForeignKey('BitbakeVersion', null=True)
- release = models.ForeignKey("Release", null=True)
+ bitbake_version = models.ForeignKey('BitbakeVersion', on_delete=models.CASCADE, null=True)
+ release = models.ForeignKey("Release", on_delete=models.CASCADE, null=True)
created = models.DateTimeField(auto_now_add=True)
updated = models.DateTimeField(auto_now=True)
# This is a horrible hack; since Toaster has no "User" model available when
@@ -482,7 +469,7 @@ class Build(models.Model):
search_allowed_fields = ['machine', 'cooker_log_path', "target__target", "target__target_image_file__file_name"]
- project = models.ForeignKey(Project) # must have a project
+ project = models.ForeignKey(Project, on_delete=models.CASCADE) # must have a project
machine = models.CharField(max_length=100)
distro = models.CharField(max_length=100)
distro_version = models.CharField(max_length=100)
@@ -790,13 +777,13 @@ class Build(models.Model):
return "%d %s %s" % (self.id, self.project, ",".join([t.target for t in self.target_set.all()]))
class ProjectTarget(models.Model):
- project = models.ForeignKey(Project)
+ project = models.ForeignKey(Project, on_delete=models.CASCADE)
target = models.CharField(max_length=100)
task = models.CharField(max_length=100, null=True)
class Target(models.Model):
search_allowed_fields = ['target', 'file_name']
- build = models.ForeignKey(Build)
+ build = models.ForeignKey(Build, on_delete=models.CASCADE)
target = models.CharField(max_length=100)
task = models.CharField(max_length=100, null=True)
is_image = models.BooleanField(default = False)
@@ -957,7 +944,7 @@ class Target(models.Model):
# kernel artifacts for a target: bzImage and modules*
class TargetKernelFile(models.Model):
- target = models.ForeignKey(Target)
+ target = models.ForeignKey(Target, on_delete=models.CASCADE)
file_name = models.FilePathField()
file_size = models.IntegerField()
@@ -967,7 +954,7 @@ class TargetKernelFile(models.Model):
# SDK artifacts for a target: sh and manifest files
class TargetSDKFile(models.Model):
- target = models.ForeignKey(Target)
+ target = models.ForeignKey(Target, on_delete=models.CASCADE)
file_name = models.FilePathField()
file_size = models.IntegerField()
@@ -978,15 +965,15 @@ class TargetSDKFile(models.Model):
class Target_Image_File(models.Model):
# valid suffixes for image files produced by a build
SUFFIXES = {
- 'btrfs', 'cpio', 'cpio.gz', 'cpio.lz4', 'cpio.lzma', 'cpio.xz',
- 'cramfs', 'elf', 'ext2', 'ext2.bz2', 'ext2.gz', 'ext2.lzma', 'ext4',
- 'ext4.gz', 'ext3', 'ext3.gz', 'hdddirect', 'hddimg', 'iso', 'jffs2',
- 'jffs2.sum', 'multiubi', 'qcow2', 'squashfs', 'squashfs-lzo',
+ 'btrfs', 'container', 'cpio', 'cpio.gz', 'cpio.lz4', 'cpio.lzma',
+ 'cpio.xz', 'cramfs', 'ext2', 'ext2.bz2', 'ext2.gz', 'ext2.lzma',
+ 'ext3', 'ext3.gz', 'ext4', 'ext4.gz', 'f2fs', 'hddimg', 'iso', 'jffs2',
+ 'jffs2.sum', 'multiubi', 'squashfs', 'squashfs-lz4', 'squashfs-lzo',
'squashfs-xz', 'tar', 'tar.bz2', 'tar.gz', 'tar.lz4', 'tar.xz', 'ubi',
- 'ubifs', 'vdi', 'vmdk', 'wic', 'wic.bmap', 'wic.bz2', 'wic.gz', 'wic.lzma'
+ 'ubifs', 'wic', 'wic.bz2', 'wic.gz', 'wic.lzma'
}
- target = models.ForeignKey(Target)
+ target = models.ForeignKey(Target, on_delete=models.CASCADE)
file_name = models.FilePathField(max_length=254)
file_size = models.IntegerField()
@@ -1020,15 +1007,15 @@ class Target_File(models.Model):
( ITYPE_BLOCK ,'block'),
)
- target = models.ForeignKey(Target)
+ target = models.ForeignKey(Target, on_delete=models.CASCADE)
path = models.FilePathField()
size = models.IntegerField()
inodetype = models.IntegerField(choices = ITYPES)
permission = models.CharField(max_length=16)
owner = models.CharField(max_length=128)
group = models.CharField(max_length=128)
- directory = models.ForeignKey('Target_File', related_name="directory_set", null=True)
- sym_target = models.ForeignKey('Target_File', related_name="symlink_set", null=True)
+ directory = models.ForeignKey('Target_File', on_delete=models.CASCADE, related_name="directory_set", null=True)
+ sym_target = models.ForeignKey('Target_File', on_delete=models.CASCADE, related_name="symlink_set", null=True)
class Task(models.Model):
@@ -1115,13 +1102,13 @@ class Task(models.Model):
def get_description(self):
return self._helptext
- build = models.ForeignKey(Build, related_name='task_build')
+ build = models.ForeignKey(Build, on_delete=models.CASCADE, related_name='task_build')
order = models.IntegerField(null=True)
task_executed = models.BooleanField(default=False) # True means Executed, False means Not/Executed
outcome = models.IntegerField(choices=TASK_OUTCOME, default=OUTCOME_NA)
sstate_checksum = models.CharField(max_length=100, blank=True)
path_to_sstate_obj = models.FilePathField(max_length=500, blank=True)
- recipe = models.ForeignKey('Recipe', related_name='tasks')
+ recipe = models.ForeignKey('Recipe', on_delete=models.CASCADE, related_name='tasks')
task_name = models.CharField(max_length=100)
source_url = models.FilePathField(max_length=255, blank=True)
work_directory = models.FilePathField(max_length=255, blank=True)
@@ -1160,13 +1147,13 @@ class Task(models.Model):
class Task_Dependency(models.Model):
- task = models.ForeignKey(Task, related_name='task_dependencies_task')
- depends_on = models.ForeignKey(Task, related_name='task_dependencies_depends')
+ task = models.ForeignKey(Task, on_delete=models.CASCADE, related_name='task_dependencies_task')
+ depends_on = models.ForeignKey(Task, on_delete=models.CASCADE, related_name='task_dependencies_depends')
class Package(models.Model):
search_allowed_fields = ['name', 'version', 'revision', 'recipe__name', 'recipe__version', 'recipe__license', 'recipe__layer_version__layer__name', 'recipe__layer_version__branch', 'recipe__layer_version__commit', 'recipe__layer_version__local_path', 'installed_name']
- build = models.ForeignKey('Build', null=True)
- recipe = models.ForeignKey('Recipe', null=True)
+ build = models.ForeignKey('Build', on_delete=models.CASCADE, null=True)
+ recipe = models.ForeignKey('Recipe', on_delete=models.CASCADE, null=True)
name = models.CharField(max_length=100)
installed_name = models.CharField(max_length=100, default='')
version = models.CharField(max_length=100, blank=True)
@@ -1302,19 +1289,19 @@ class Package_Dependency(models.Model):
TYPE_RCONFLICTS : ("conflicts", "%s conflicts with %s, which will not be installed if this package is not first removed"),
}
- package = models.ForeignKey(Package, related_name='package_dependencies_source')
- depends_on = models.ForeignKey(Package, related_name='package_dependencies_target') # soft dependency
+ package = models.ForeignKey(Package, on_delete=models.CASCADE, related_name='package_dependencies_source')
+ depends_on = models.ForeignKey(Package, on_delete=models.CASCADE, related_name='package_dependencies_target') # soft dependency
dep_type = models.IntegerField(choices=DEPENDS_TYPE)
- target = models.ForeignKey(Target, null=True)
+ target = models.ForeignKey(Target, on_delete=models.CASCADE, null=True)
objects = Package_DependencyManager()
class Target_Installed_Package(models.Model):
- target = models.ForeignKey(Target)
- package = models.ForeignKey(Package, related_name='buildtargetlist_package')
+ target = models.ForeignKey(Target, on_delete=models.CASCADE)
+ package = models.ForeignKey(Package, on_delete=models.CASCADE, related_name='buildtargetlist_package')
class Package_File(models.Model):
- package = models.ForeignKey(Package, related_name='buildfilelist_package')
+ package = models.ForeignKey(Package, on_delete=models.CASCADE, related_name='buildfilelist_package')
path = models.FilePathField(max_length=255, blank=True)
size = models.IntegerField()
@@ -1331,7 +1318,7 @@ class Recipe(models.Model):
name = models.CharField(max_length=100, blank=True)
version = models.CharField(max_length=100, blank=True)
- layer_version = models.ForeignKey('Layer_Version',
+ layer_version = models.ForeignKey('Layer_Version', on_delete=models.CASCADE,
related_name='recipe_layer_version')
summary = models.TextField(blank=True)
description = models.TextField(blank=True)
@@ -1369,7 +1356,7 @@ class Recipe_DependencyManager(models.Manager):
class Provides(models.Model):
name = models.CharField(max_length=100)
- recipe = models.ForeignKey(Recipe)
+ recipe = models.ForeignKey(Recipe, on_delete=models.CASCADE)
class Recipe_Dependency(models.Model):
TYPE_DEPENDS = 0
@@ -1379,9 +1366,9 @@ class Recipe_Dependency(models.Model):
(TYPE_DEPENDS, "depends"),
(TYPE_RDEPENDS, "rdepends"),
)
- recipe = models.ForeignKey(Recipe, related_name='r_dependencies_recipe')
- depends_on = models.ForeignKey(Recipe, related_name='r_dependencies_depends')
- via = models.ForeignKey(Provides, null=True, default=None)
+ recipe = models.ForeignKey(Recipe, on_delete=models.CASCADE, related_name='r_dependencies_recipe')
+ depends_on = models.ForeignKey(Recipe, on_delete=models.CASCADE, related_name='r_dependencies_depends')
+ via = models.ForeignKey(Provides, on_delete=models.CASCADE, null=True, default=None)
dep_type = models.IntegerField(choices=DEPENDS_TYPE)
objects = Recipe_DependencyManager()
@@ -1390,7 +1377,7 @@ class Machine(models.Model):
search_allowed_fields = ["name", "description", "layer_version__layer__name"]
up_date = models.DateTimeField(null = True, default = None)
- layer_version = models.ForeignKey('Layer_Version')
+ layer_version = models.ForeignKey('Layer_Version', on_delete=models.CASCADE)
name = models.CharField(max_length=255)
description = models.CharField(max_length=255)
@@ -1421,7 +1408,7 @@ class Release(models.Model):
""" A release is a project template, used to pre-populate Project settings with a configuration set """
name = models.CharField(max_length=32, unique = True)
description = models.CharField(max_length=255)
- bitbake_version = models.ForeignKey(BitbakeVersion)
+ bitbake_version = models.ForeignKey(BitbakeVersion, on_delete=models.CASCADE)
branch_name = models.CharField(max_length=50, default = "")
helptext = models.TextField(null=True)
@@ -1432,7 +1419,7 @@ class Release(models.Model):
return self.name
class ReleaseDefaultLayer(models.Model):
- release = models.ForeignKey(Release)
+ release = models.ForeignKey(Release, on_delete=models.CASCADE)
layer_name = models.CharField(max_length=100, default="")
@@ -1487,10 +1474,10 @@ class Layer_Version(models.Model):
"layer__description", "layer__vcs_url",
"dirpath", "release__name", "commit", "branch"]
- build = models.ForeignKey(Build, related_name='layer_version_build',
+ build = models.ForeignKey(Build, on_delete=models.CASCADE, related_name='layer_version_build',
default=None, null=True)
- layer = models.ForeignKey(Layer, related_name='layer_version_layer')
+ layer = models.ForeignKey(Layer, on_delete=models.CASCADE, related_name='layer_version_layer')
layer_source = models.IntegerField(choices=LayerSource.SOURCE_TYPE,
default=0)
@@ -1498,7 +1485,7 @@ class Layer_Version(models.Model):
up_date = models.DateTimeField(null=True, default=timezone.now)
# To which metadata release does this layer version belong to
- release = models.ForeignKey(Release, null=True, default=None)
+ release = models.ForeignKey(Release, on_delete=models.CASCADE, null=True, default=None)
branch = models.CharField(max_length=80)
commit = models.CharField(max_length=100)
@@ -1512,7 +1499,7 @@ class Layer_Version(models.Model):
local_path = models.FilePathField(max_length=1024, default="/")
# Set if this layer is restricted to a particular project
- project = models.ForeignKey('Project', null=True, default=None)
+ project = models.ForeignKey('Project', on_delete=models.CASCADE, null=True, default=None)
# code lifted, with adaptations, from the layerindex-web application
# https://git.yoctoproject.org/cgit/cgit.cgi/layerindex-web/
@@ -1621,14 +1608,14 @@ class Layer_Version(models.Model):
class LayerVersionDependency(models.Model):
- layer_version = models.ForeignKey(Layer_Version,
+ layer_version = models.ForeignKey(Layer_Version, on_delete=models.CASCADE,
related_name="dependencies")
- depends_on = models.ForeignKey(Layer_Version,
+ depends_on = models.ForeignKey(Layer_Version, on_delete=models.CASCADE,
related_name="dependees")
class ProjectLayer(models.Model):
- project = models.ForeignKey(Project)
- layercommit = models.ForeignKey(Layer_Version, null=True)
+ project = models.ForeignKey(Project, on_delete=models.CASCADE)
+ layercommit = models.ForeignKey(Layer_Version, on_delete=models.CASCADE, null=True)
optional = models.BooleanField(default = True)
def __unicode__(self):
@@ -1643,8 +1630,8 @@ class CustomImageRecipe(Recipe):
LAYER_NAME = "toaster-custom-images"
search_allowed_fields = ['name']
- base_recipe = models.ForeignKey(Recipe, related_name='based_on_recipe')
- project = models.ForeignKey(Project)
+ base_recipe = models.ForeignKey(Recipe, on_delete=models.CASCADE, related_name='based_on_recipe')
+ project = models.ForeignKey(Project, on_delete=models.CASCADE)
last_updated = models.DateTimeField(null=True, default=None)
def get_last_successful_built_target(self):
@@ -1660,14 +1647,14 @@ class CustomImageRecipe(Recipe):
"""
# Check if we're aldready up-to-date or not
target = self.get_last_successful_built_target()
- if target == None:
+ if target is None:
# So we've never actually built this Custom recipe but what about
# the recipe it's based on?
target = \
Target.objects.filter(Q(build__outcome=Build.SUCCEEDED) &
Q(build__project=self.project) &
Q(target=self.base_recipe.name)).last()
- if target == None:
+ if target is None:
return
if target.build.completed_on == self.last_updated:
@@ -1797,14 +1784,14 @@ class CustomImageRecipe(Recipe):
return recipe_contents
class ProjectVariable(models.Model):
- project = models.ForeignKey(Project)
+ project = models.ForeignKey(Project, on_delete=models.CASCADE)
name = models.CharField(max_length=100)
value = models.TextField(blank = True)
class Variable(models.Model):
search_allowed_fields = ['variable_name', 'variable_value',
'vhistory__file_name', "description"]
- build = models.ForeignKey(Build, related_name='variable_build')
+ build = models.ForeignKey(Build, on_delete=models.CASCADE, related_name='variable_build')
variable_name = models.CharField(max_length=100)
variable_value = models.TextField(blank=True)
changed = models.BooleanField(default=False)
@@ -1812,7 +1799,7 @@ class Variable(models.Model):
description = models.TextField(blank=True)
class VariableHistory(models.Model):
- variable = models.ForeignKey(Variable, related_name='vhistory')
+ variable = models.ForeignKey(Variable, on_delete=models.CASCADE, related_name='vhistory')
value = models.TextField(blank=True)
file_name = models.FilePathField(max_length=255)
line_number = models.IntegerField(null=True)
@@ -1822,7 +1809,7 @@ class HelpText(models.Model):
VARIABLE = 0
HELPTEXT_AREA = ((VARIABLE, 'variable'), )
- build = models.ForeignKey(Build, related_name='helptext_build')
+ build = models.ForeignKey(Build, on_delete=models.CASCADE, related_name='helptext_build')
area = models.IntegerField(choices=HELPTEXT_AREA)
key = models.CharField(max_length=100)
text = models.TextField()
@@ -1842,8 +1829,8 @@ class LogMessage(models.Model):
(EXCEPTION, "toaster exception")
)
- build = models.ForeignKey(Build)
- task = models.ForeignKey(Task, blank = True, null=True)
+ build = models.ForeignKey(Build, on_delete=models.CASCADE)
+ task = models.ForeignKey(Task, on_delete=models.CASCADE, blank = True, null=True)
level = models.IntegerField(choices=LOG_LEVEL, default=INFO)
message = models.TextField(blank=True, null=True)
pathname = models.FilePathField(max_length=255, blank=True)
@@ -1872,7 +1859,7 @@ class Distro(models.Model):
search_allowed_fields = ["name", "description", "layer_version__layer__name"]
up_date = models.DateTimeField(null = True, default = None)
- layer_version = models.ForeignKey('Layer_Version')
+ layer_version = models.ForeignKey('Layer_Version', on_delete=models.CASCADE)
name = models.CharField(max_length=255)
description = models.CharField(max_length=255)
diff --git a/external/poky/bitbake/lib/toaster/tests/browser/selenium_helpers.py b/external/poky/bitbake/lib/toaster/tests/browser/selenium_helpers.py
index 08711e45..02d4f4b5 100644
--- a/external/poky/bitbake/lib/toaster/tests/browser/selenium_helpers.py
+++ b/external/poky/bitbake/lib/toaster/tests/browser/selenium_helpers.py
@@ -1,23 +1,10 @@
-#! /usr/bin/env python
-# ex:ts=4:sw=4:sts=4:et
-# -*- tab-width: 4; c-basic-offset: 4; indent-tabs-mode: nil -*-
+#! /usr/bin/env python3
#
# BitBake Toaster Implementation
#
# Copyright (C) 2013-2016 Intel Corporation
#
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License version 2 as
-# published by the Free Software Foundation.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License along
-# with this program; if not, write to the Free Software Foundation, Inc.,
-# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+# SPDX-License-Identifier: GPL-2.0-only
#
# The Wait class and some of SeleniumDriverHelper and SeleniumTestCase are
# modified from Patchwork, released under the same licence terms as Toaster:
diff --git a/external/poky/bitbake/lib/toaster/tests/browser/selenium_helpers_base.py b/external/poky/bitbake/lib/toaster/tests/browser/selenium_helpers_base.py
index 156d639b..644d45fe 100644
--- a/external/poky/bitbake/lib/toaster/tests/browser/selenium_helpers_base.py
+++ b/external/poky/bitbake/lib/toaster/tests/browser/selenium_helpers_base.py
@@ -1,23 +1,10 @@
-#! /usr/bin/env python
-# ex:ts=4:sw=4:sts=4:et
-# -*- tab-width: 4; c-basic-offset: 4; indent-tabs-mode: nil -*-
+#! /usr/bin/env python3
#
# BitBake Toaster Implementation
#
# Copyright (C) 2013-2016 Intel Corporation
#
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License version 2 as
-# published by the Free Software Foundation.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License along
-# with this program; if not, write to the Free Software Foundation, Inc.,
-# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+# SPDX-License-Identifier: GPL-2.0-only
#
# The Wait class and some of SeleniumDriverHelper and SeleniumTestCase are
# modified from Patchwork, released under the same licence terms as Toaster:
@@ -32,7 +19,6 @@ import os
import time
import unittest
-from django.contrib.staticfiles.testing import StaticLiveServerTestCase
from selenium import webdriver
from selenium.webdriver.support.ui import WebDriverWait
from selenium.webdriver.common.desired_capabilities import DesiredCapabilities
diff --git a/external/poky/bitbake/lib/toaster/tests/browser/test_all_builds_page.py b/external/poky/bitbake/lib/toaster/tests/browser/test_all_builds_page.py
index b86f29bd..8423d3da 100644
--- a/external/poky/bitbake/lib/toaster/tests/browser/test_all_builds_page.py
+++ b/external/poky/bitbake/lib/toaster/tests/browser/test_all_builds_page.py
@@ -1,27 +1,15 @@
-#! /usr/bin/env python
-# ex:ts=4:sw=4:sts=4:et
-# -*- tab-width: 4; c-basic-offset: 4; indent-tabs-mode: nil -*-
+#! /usr/bin/env python3
#
# BitBake Toaster Implementation
#
# Copyright (C) 2013-2016 Intel Corporation
#
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License version 2 as
-# published by the Free Software Foundation.
+# SPDX-License-Identifier: GPL-2.0-only
#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License along
-# with this program; if not, write to the Free Software Foundation, Inc.,
-# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
import re
-from django.core.urlresolvers import reverse
+from django.urls import reverse
from django.utils import timezone
from tests.browser.selenium_helpers import SeleniumTestCase
diff --git a/external/poky/bitbake/lib/toaster/tests/browser/test_all_projects_page.py b/external/poky/bitbake/lib/toaster/tests/browser/test_all_projects_page.py
index 44da6407..15b03400 100644
--- a/external/poky/bitbake/lib/toaster/tests/browser/test_all_projects_page.py
+++ b/external/poky/bitbake/lib/toaster/tests/browser/test_all_projects_page.py
@@ -1,27 +1,15 @@
-#! /usr/bin/env python
-# ex:ts=4:sw=4:sts=4:et
-# -*- tab-width: 4; c-basic-offset: 4; indent-tabs-mode: nil -*-
+#! /usr/bin/env python3
#
# BitBake Toaster Implementation
#
# Copyright (C) 2013-2016 Intel Corporation
#
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License version 2 as
-# published by the Free Software Foundation.
+# SPDX-License-Identifier: GPL-2.0-only
#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License along
-# with this program; if not, write to the Free Software Foundation, Inc.,
-# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
import re
-from django.core.urlresolvers import reverse
+from django.urls import reverse
from django.utils import timezone
from tests.browser.selenium_helpers import SeleniumTestCase
diff --git a/external/poky/bitbake/lib/toaster/tests/browser/test_builddashboard_page.py b/external/poky/bitbake/lib/toaster/tests/browser/test_builddashboard_page.py
index f8ccb545..efcd89b3 100644
--- a/external/poky/bitbake/lib/toaster/tests/browser/test_builddashboard_page.py
+++ b/external/poky/bitbake/lib/toaster/tests/browser/test_builddashboard_page.py
@@ -1,25 +1,13 @@
-#! /usr/bin/env python
-# ex:ts=4:sw=4:sts=4:et
-# -*- tab-width: 4; c-basic-offset: 4; indent-tabs-mode: nil -*-
+#! /usr/bin/env python3
#
# BitBake Toaster Implementation
#
# Copyright (C) 2013-2016 Intel Corporation
#
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License version 2 as
-# published by the Free Software Foundation.
+# SPDX-License-Identifier: GPL-2.0-only
#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License along
-# with this program; if not, write to the Free Software Foundation, Inc.,
-# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
-from django.core.urlresolvers import reverse
+from django.urls import reverse
from django.utils import timezone
from tests.browser.selenium_helpers import SeleniumTestCase
diff --git a/external/poky/bitbake/lib/toaster/tests/browser/test_builddashboard_page_artifacts.py b/external/poky/bitbake/lib/toaster/tests/browser/test_builddashboard_page_artifacts.py
index 1c627ad4..c6226d60 100644
--- a/external/poky/bitbake/lib/toaster/tests/browser/test_builddashboard_page_artifacts.py
+++ b/external/poky/bitbake/lib/toaster/tests/browser/test_builddashboard_page_artifacts.py
@@ -1,25 +1,13 @@
-#! /usr/bin/env python
-# ex:ts=4:sw=4:sts=4:et
-# -*- tab-width: 4; c-basic-offset: 4; indent-tabs-mode: nil -*-
+#! /usr/bin/env python3
#
# BitBake Toaster Implementation
#
# Copyright (C) 2013-2016 Intel Corporation
#
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License version 2 as
-# published by the Free Software Foundation.
+# SPDX-License-Identifier: GPL-2.0-only
#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License along
-# with this program; if not, write to the Free Software Foundation, Inc.,
-# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
-from django.core.urlresolvers import reverse
+from django.urls import reverse
from django.utils import timezone
from tests.browser.selenium_helpers import SeleniumTestCase
diff --git a/external/poky/bitbake/lib/toaster/tests/browser/test_builddashboard_page_recipes.py b/external/poky/bitbake/lib/toaster/tests/browser/test_builddashboard_page_recipes.py
index ed18324e..9d85ba99 100644
--- a/external/poky/bitbake/lib/toaster/tests/browser/test_builddashboard_page_recipes.py
+++ b/external/poky/bitbake/lib/toaster/tests/browser/test_builddashboard_page_recipes.py
@@ -1,25 +1,13 @@
-#! /usr/bin/env python
-# ex:ts=4:sw=4:sts=4:et
-# -*- tab-width: 4; c-basic-offset: 4; indent-tabs-mode: nil -*-
+#! /usr/bin/env python3
#
# BitBake Toaster Implementation
#
# Copyright (C) 2013-2016 Intel Corporation
#
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License version 2 as
-# published by the Free Software Foundation.
+# SPDX-License-Identifier: GPL-2.0-only
#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License along
-# with this program; if not, write to the Free Software Foundation, Inc.,
-# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
-from django.core.urlresolvers import reverse
+from django.urls import reverse
from django.utils import timezone
from tests.browser.selenium_helpers import SeleniumTestCase
from orm.models import Project, Build, Recipe, Task, Layer, Layer_Version
diff --git a/external/poky/bitbake/lib/toaster/tests/browser/test_builddashboard_page_tasks.py b/external/poky/bitbake/lib/toaster/tests/browser/test_builddashboard_page_tasks.py
index da50f160..7fdf75d0 100644
--- a/external/poky/bitbake/lib/toaster/tests/browser/test_builddashboard_page_tasks.py
+++ b/external/poky/bitbake/lib/toaster/tests/browser/test_builddashboard_page_tasks.py
@@ -1,25 +1,13 @@
-#! /usr/bin/env python
-# ex:ts=4:sw=4:sts=4:et
-# -*- tab-width: 4; c-basic-offset: 4; indent-tabs-mode: nil -*-
+#! /usr/bin/env python3
#
# BitBake Toaster Implementation
#
# Copyright (C) 2013-2016 Intel Corporation
#
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License version 2 as
-# published by the Free Software Foundation.
+# SPDX-License-Identifier: GPL-2.0-only
#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License along
-# with this program; if not, write to the Free Software Foundation, Inc.,
-# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
-from django.core.urlresolvers import reverse
+from django.urls import reverse
from django.utils import timezone
from tests.browser.selenium_helpers import SeleniumTestCase
from orm.models import Project, Build, Recipe, Task, Layer, Layer_Version
diff --git a/external/poky/bitbake/lib/toaster/tests/browser/test_js_unit_tests.py b/external/poky/bitbake/lib/toaster/tests/browser/test_js_unit_tests.py
index 3c0b9625..e6163bb3 100644
--- a/external/poky/bitbake/lib/toaster/tests/browser/test_js_unit_tests.py
+++ b/external/poky/bitbake/lib/toaster/tests/browser/test_js_unit_tests.py
@@ -1,29 +1,17 @@
-#! /usr/bin/env python
-# ex:ts=4:sw=4:sts=4:et
-# -*- tab-width: 4; c-basic-offset: 4; indent-tabs-mode: nil -*-
+#! /usr/bin/env python3
#
# BitBake Toaster Implementation
#
# Copyright (C) 2013-2016 Intel Corporation
#
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License version 2 as
-# published by the Free Software Foundation.
+# SPDX-License-Identifier: GPL-2.0-only
#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License along
-# with this program; if not, write to the Free Software Foundation, Inc.,
-# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
"""
Run the js unit tests
"""
-from django.core.urlresolvers import reverse
+from django.urls import reverse
from tests.browser.selenium_helpers import SeleniumTestCase
import logging
diff --git a/external/poky/bitbake/lib/toaster/tests/browser/test_landing_page.py b/external/poky/bitbake/lib/toaster/tests/browser/test_landing_page.py
index 4d4cd660..8bb64b9f 100644
--- a/external/poky/bitbake/lib/toaster/tests/browser/test_landing_page.py
+++ b/external/poky/bitbake/lib/toaster/tests/browser/test_landing_page.py
@@ -1,25 +1,13 @@
-#! /usr/bin/env python
-# ex:ts=4:sw=4:sts=4:et
-# -*- tab-width: 4; c-basic-offset: 4; indent-tabs-mode: nil -*-
+#! /usr/bin/env python3
#
# BitBake Toaster Implementation
#
-# Copyright (C) 2013-2016 Intel Corporation
-#
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License version 2 as
-# published by the Free Software Foundation.
+# SPDX-License-Identifier: GPL-2.0-only
#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
+# Copyright (C) 2013-2016 Intel Corporation
#
-# You should have received a copy of the GNU General Public License along
-# with this program; if not, write to the Free Software Foundation, Inc.,
-# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
-from django.core.urlresolvers import reverse
+from django.urls import reverse
from django.utils import timezone
from tests.browser.selenium_helpers import SeleniumTestCase
diff --git a/external/poky/bitbake/lib/toaster/tests/browser/test_layerdetails_page.py b/external/poky/bitbake/lib/toaster/tests/browser/test_layerdetails_page.py
index f24fb093..71bdd2aa 100644
--- a/external/poky/bitbake/lib/toaster/tests/browser/test_layerdetails_page.py
+++ b/external/poky/bitbake/lib/toaster/tests/browser/test_layerdetails_page.py
@@ -1,25 +1,13 @@
-#! /usr/bin/env python
-# ex:ts=4:sw=4:sts=4:et
-# -*- tab-width: 4; c-basic-offset: 4; indent-tabs-mode: nil -*-
+#! /usr/bin/env python3
#
# BitBake Toaster Implementation
#
-# Copyright (C) 2013-2016 Intel Corporation
-#
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License version 2 as
-# published by the Free Software Foundation.
+# SPDX-License-Identifier: GPL-2.0-only
#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
+# Copyright (C) 2013-2016 Intel Corporation
#
-# You should have received a copy of the GNU General Public License along
-# with this program; if not, write to the Free Software Foundation, Inc.,
-# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
-from django.core.urlresolvers import reverse
+from django.urls import reverse
from tests.browser.selenium_helpers import SeleniumTestCase
from orm.models import Layer, Layer_Version, Project, LayerSource, Release
diff --git a/external/poky/bitbake/lib/toaster/tests/browser/test_most_recent_builds_states.py b/external/poky/bitbake/lib/toaster/tests/browser/test_most_recent_builds_states.py
index abc0b0bc..7844aaa3 100644
--- a/external/poky/bitbake/lib/toaster/tests/browser/test_most_recent_builds_states.py
+++ b/external/poky/bitbake/lib/toaster/tests/browser/test_most_recent_builds_states.py
@@ -1,25 +1,13 @@
-#! /usr/bin/env python
-# ex:ts=4:sw=4:sts=4:et
-# -*- tab-width: 4; c-basic-offset: 4; indent-tabs-mode: nil -*-
+#! /usr/bin/env python3
#
# BitBake Toaster Implementation
#
-# Copyright (C) 2013-2016 Intel Corporation
-#
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License version 2 as
-# published by the Free Software Foundation.
+# SPDX-License-Identifier: GPL-2.0-only
#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
+# Copyright (C) 2013-2016 Intel Corporation
#
-# You should have received a copy of the GNU General Public License along
-# with this program; if not, write to the Free Software Foundation, Inc.,
-# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
-from django.core.urlresolvers import reverse
+from django.urls import reverse
from django.utils import timezone
from tests.browser.selenium_helpers import SeleniumTestCase
from tests.browser.selenium_helpers_base import Wait
diff --git a/external/poky/bitbake/lib/toaster/tests/browser/test_new_custom_image_page.py b/external/poky/bitbake/lib/toaster/tests/browser/test_new_custom_image_page.py
index ab5a8e66..9906ae42 100644
--- a/external/poky/bitbake/lib/toaster/tests/browser/test_new_custom_image_page.py
+++ b/external/poky/bitbake/lib/toaster/tests/browser/test_new_custom_image_page.py
@@ -1,25 +1,13 @@
-#! /usr/bin/env python
-# ex:ts=4:sw=4:sts=4:et
-# -*- tab-width: 4; c-basic-offset: 4; indent-tabs-mode: nil -*-
+#! /usr/bin/env python3
#
# BitBake Toaster Implementation
#
# Copyright (C) 2013-2016 Intel Corporation
#
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License version 2 as
-# published by the Free Software Foundation.
+# SPDX-License-Identifier: GPL-2.0-only
#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License along
-# with this program; if not, write to the Free Software Foundation, Inc.,
-# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
-from django.core.urlresolvers import reverse
+from django.urls import reverse
from tests.browser.selenium_helpers import SeleniumTestCase
from orm.models import BitbakeVersion, Release, Project, ProjectLayer, Layer
diff --git a/external/poky/bitbake/lib/toaster/tests/browser/test_new_project_page.py b/external/poky/bitbake/lib/toaster/tests/browser/test_new_project_page.py
index 77e5f152..e20a1f68 100644
--- a/external/poky/bitbake/lib/toaster/tests/browser/test_new_project_page.py
+++ b/external/poky/bitbake/lib/toaster/tests/browser/test_new_project_page.py
@@ -1,25 +1,13 @@
-#! /usr/bin/env python
-# ex:ts=4:sw=4:sts=4:et
-# -*- tab-width: 4; c-basic-offset: 4; indent-tabs-mode: nil -*-
+#! /usr/bin/env python3
#
# BitBake Toaster Implementation
#
# Copyright (C) 2013-2016 Intel Corporation
#
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License version 2 as
-# published by the Free Software Foundation.
+# SPDX-License-Identifier: GPL-2.0-only
#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License along
-# with this program; if not, write to the Free Software Foundation, Inc.,
-# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
-from django.core.urlresolvers import reverse
+from django.urls import reverse
from tests.browser.selenium_helpers import SeleniumTestCase
from selenium.webdriver.support.ui import Select
from selenium.common.exceptions import InvalidElementStateException
diff --git a/external/poky/bitbake/lib/toaster/tests/browser/test_project_builds_page.py b/external/poky/bitbake/lib/toaster/tests/browser/test_project_builds_page.py
index 9fe91ab0..51717e72 100644
--- a/external/poky/bitbake/lib/toaster/tests/browser/test_project_builds_page.py
+++ b/external/poky/bitbake/lib/toaster/tests/browser/test_project_builds_page.py
@@ -1,27 +1,15 @@
-#! /usr/bin/env python
-# ex:ts=4:sw=4:sts=4:et
-# -*- tab-width: 4; c-basic-offset: 4; indent-tabs-mode: nil -*-
+#! /usr/bin/env python3
#
# BitBake Toaster Implementation
#
# Copyright (C) 2013-2016 Intel Corporation
#
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License version 2 as
-# published by the Free Software Foundation.
+# SPDX-License-Identifier: GPL-2.0-only
#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License along
-# with this program; if not, write to the Free Software Foundation, Inc.,
-# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
import re
-from django.core.urlresolvers import reverse
+from django.urls import reverse
from django.utils import timezone
from tests.browser.selenium_helpers import SeleniumTestCase
diff --git a/external/poky/bitbake/lib/toaster/tests/browser/test_project_config_page.py b/external/poky/bitbake/lib/toaster/tests/browser/test_project_config_page.py
index 07100849..944bcb26 100644
--- a/external/poky/bitbake/lib/toaster/tests/browser/test_project_config_page.py
+++ b/external/poky/bitbake/lib/toaster/tests/browser/test_project_config_page.py
@@ -1,28 +1,13 @@
-#! /usr/bin/env python
-# ex:ts=4:sw=4:sts=4:et
-# -*- tab-width: 4; c-basic-offset: 4; indent-tabs-mode: nil -*-
+#! /usr/bin/env python3
#
# BitBake Toaster Implementation
#
# Copyright (C) 2013-2016 Intel Corporation
#
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License version 2 as
-# published by the Free Software Foundation.
+# SPDX-License-Identifier: GPL-2.0-only
#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License along
-# with this program; if not, write to the Free Software Foundation, Inc.,
-# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
-
-import re
-from django.core.urlresolvers import reverse
-from django.utils import timezone
+from django.urls import reverse
from tests.browser.selenium_helpers import SeleniumTestCase
from orm.models import BitbakeVersion, Release, Project, ProjectVariable
@@ -228,4 +213,5 @@ class TestProjectConfigsPage(SeleniumTestCase):
hidden_element = self.driver.find_element_by_id('hintError-sstate_dir')
self.assertEqual(hidden_element.is_displayed(), False,
- 'sstate directory path valid but treated as invalid') \ No newline at end of file
+ 'sstate directory path valid but treated as invalid')
+
diff --git a/external/poky/bitbake/lib/toaster/tests/browser/test_project_page.py b/external/poky/bitbake/lib/toaster/tests/browser/test_project_page.py
index 01864633..546293f1 100644
--- a/external/poky/bitbake/lib/toaster/tests/browser/test_project_page.py
+++ b/external/poky/bitbake/lib/toaster/tests/browser/test_project_page.py
@@ -1,25 +1,13 @@
-#! /usr/bin/env python
-# ex:ts=4:sw=4:sts=4:et
-# -*- tab-width: 4; c-basic-offset: 4; indent-tabs-mode: nil -*-
+#! /usr/bin/env python3
#
# BitBake Toaster Implementation
#
# Copyright (C) 2013-2016 Intel Corporation
#
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License version 2 as
-# published by the Free Software Foundation.
+# SPDX-License-Identifier: GPL-2.0-only
#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License along
-# with this program; if not, write to the Free Software Foundation, Inc.,
-# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
-from django.core.urlresolvers import reverse
+from django.urls import reverse
from django.utils import timezone
from tests.browser.selenium_helpers import SeleniumTestCase
diff --git a/external/poky/bitbake/lib/toaster/tests/browser/test_sample.py b/external/poky/bitbake/lib/toaster/tests/browser/test_sample.py
index 20ec53c2..b0067c21 100644
--- a/external/poky/bitbake/lib/toaster/tests/browser/test_sample.py
+++ b/external/poky/bitbake/lib/toaster/tests/browser/test_sample.py
@@ -1,23 +1,11 @@
-#! /usr/bin/env python
-# ex:ts=4:sw=4:sts=4:et
-# -*- tab-width: 4; c-basic-offset: 4; indent-tabs-mode: nil -*-
+#! /usr/bin/env python3
#
# BitBake Toaster Implementation
#
# Copyright (C) 2013-2016 Intel Corporation
#
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License version 2 as
-# published by the Free Software Foundation.
+# SPDX-License-Identifier: GPL-2.0-only
#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License along
-# with this program; if not, write to the Free Software Foundation, Inc.,
-# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
"""
A small example test demonstrating the basics of writing a test with
@@ -28,7 +16,7 @@ New test files should follow this structure, should be named "test_*.py",
and should be in the same directory as this sample.
"""
-from django.core.urlresolvers import reverse
+from django.urls import reverse
from tests.browser.selenium_helpers import SeleniumTestCase
class TestSample(SeleniumTestCase):
diff --git a/external/poky/bitbake/lib/toaster/tests/browser/test_task_page.py b/external/poky/bitbake/lib/toaster/tests/browser/test_task_page.py
index 690d116c..011b5854 100644
--- a/external/poky/bitbake/lib/toaster/tests/browser/test_task_page.py
+++ b/external/poky/bitbake/lib/toaster/tests/browser/test_task_page.py
@@ -1,25 +1,13 @@
-#! /usr/bin/env python
-# ex:ts=4:sw=4:sts=4:et
-# -*- tab-width: 4; c-basic-offset: 4; indent-tabs-mode: nil -*-
+#! /usr/bin/env python3
#
# BitBake Toaster Implementation
#
# Copyright (C) 2013-2016 Intel Corporation
#
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License version 2 as
-# published by the Free Software Foundation.
+# SPDX-License-Identifier: GPL-2.0-only
#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License along
-# with this program; if not, write to the Free Software Foundation, Inc.,
-# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
-from django.core.urlresolvers import reverse
+from django.urls import reverse
from django.utils import timezone
from tests.browser.selenium_helpers import SeleniumTestCase
from orm.models import Project, Build, Layer, Layer_Version, Recipe, Target
diff --git a/external/poky/bitbake/lib/toaster/tests/browser/test_toastertable_ui.py b/external/poky/bitbake/lib/toaster/tests/browser/test_toastertable_ui.py
index 53ddf30c..e82d5ec6 100644
--- a/external/poky/bitbake/lib/toaster/tests/browser/test_toastertable_ui.py
+++ b/external/poky/bitbake/lib/toaster/tests/browser/test_toastertable_ui.py
@@ -1,27 +1,15 @@
-#! /usr/bin/env python
-# ex:ts=4:sw=4:sts=4:et
-# -*- tab-width: 4; c-basic-offset: 4; indent-tabs-mode: nil -*-
+#! /usr/bin/env python3
#
# BitBake Toaster Implementation
#
# Copyright (C) 2013-2016 Intel Corporation
#
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License version 2 as
-# published by the Free Software Foundation.
+# SPDX-License-Identifier: GPL-2.0-only
#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License along
-# with this program; if not, write to the Free Software Foundation, Inc.,
-# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
from datetime import datetime
-from django.core.urlresolvers import reverse
+from django.urls import reverse
from django.utils import timezone
from tests.browser.selenium_helpers import SeleniumTestCase
from orm.models import BitbakeVersion, Release, Project, Build
diff --git a/external/poky/bitbake/lib/toaster/tests/builds/buildtest.py b/external/poky/bitbake/lib/toaster/tests/builds/buildtest.py
index 5a56a110..872bbd37 100644
--- a/external/poky/bitbake/lib/toaster/tests/builds/buildtest.py
+++ b/external/poky/bitbake/lib/toaster/tests/builds/buildtest.py
@@ -1,23 +1,11 @@
-#! /usr/bin/env python
-# ex:ts=4:sw=4:sts=4:et
-# -*- tab-width: 4; c-basic-offset: 4; indent-tabs-mode: nil -*-
+#! /usr/bin/env python3
#
# BitBake Toaster Implementation
#
# Copyright (C) 2016 Intel Corporation
#
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License version 2 as
-# published by the Free Software Foundation.
+# SPDX-License-Identifier: GPL-2.0-only
#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License along
-# with this program; if not, write to the Free Software Foundation, Inc.,
-# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
import os
import sys
diff --git a/external/poky/bitbake/lib/toaster/tests/builds/test_core_image_min.py b/external/poky/bitbake/lib/toaster/tests/builds/test_core_image_min.py
index 586f4a8f..44b6cbec 100644
--- a/external/poky/bitbake/lib/toaster/tests/builds/test_core_image_min.py
+++ b/external/poky/bitbake/lib/toaster/tests/builds/test_core_image_min.py
@@ -1,24 +1,11 @@
-#! /usr/bin/env python
-# ex:ts=4:sw=4:sts=4:et
-# -*- tab-width: 4; c-basic-offset: 4; indent-tabs-mode: nil -*-
+#! /usr/bin/env python3
#
# BitBake Toaster Implementation
#
# Copyright (C) 2016 Intel Corporation
#
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License version 2 as
-# published by the Free Software Foundation.
+# SPDX-License-Identifier: GPL-2.0-only
#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License along
-# with this program; if not, write to the Free Software Foundation, Inc.,
-# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
-
# Tests were part of openembedded-core oe selftest Authored by: Lucian Musat
# Ionut Chisanovici, Paul Eggleton and Cristian Iorga
diff --git a/external/poky/bitbake/lib/toaster/tests/commands/test_loaddata.py b/external/poky/bitbake/lib/toaster/tests/commands/test_loaddata.py
index 951f6ff5..9e8d5553 100644
--- a/external/poky/bitbake/lib/toaster/tests/commands/test_loaddata.py
+++ b/external/poky/bitbake/lib/toaster/tests/commands/test_loaddata.py
@@ -1,23 +1,11 @@
-#! /usr/bin/env python
-# ex:ts=4:sw=4:sts=4:et
-# -*- tab-width: 4; c-basic-offset: 4; indent-tabs-mode: nil -*-
+#! /usr/bin/env python3
#
# BitBake Toaster Implementation
#
# Copyright (C) 2016 Intel Corporation
#
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License version 2 as
-# published by the Free Software Foundation.
+# SPDX-License-Identifier: GPL-2.0-only
#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License along
-# with this program; if not, write to the Free Software Foundation, Inc.,
-# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
from django.test import TestCase
from django.core import management
diff --git a/external/poky/bitbake/lib/toaster/tests/commands/test_lsupdates.py b/external/poky/bitbake/lib/toaster/tests/commands/test_lsupdates.py
index 49897a47..3c4fbe05 100644
--- a/external/poky/bitbake/lib/toaster/tests/commands/test_lsupdates.py
+++ b/external/poky/bitbake/lib/toaster/tests/commands/test_lsupdates.py
@@ -1,23 +1,11 @@
-#! /usr/bin/env python
-# ex:ts=4:sw=4:sts=4:et
-# -*- tab-width: 4; c-basic-offset: 4; indent-tabs-mode: nil -*-
+#! /usr/bin/env python3
#
# BitBake Toaster Implementation
#
# Copyright (C) 2016 Intel Corporation
#
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License version 2 as
-# published by the Free Software Foundation.
+# SPDX-License-Identifier: GPL-2.0-only
#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License along
-# with this program; if not, write to the Free Software Foundation, Inc.,
-# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
from django.test import TestCase
from django.core import management
diff --git a/external/poky/bitbake/lib/toaster/tests/commands/test_runbuilds.py b/external/poky/bitbake/lib/toaster/tests/commands/test_runbuilds.py
index 3e634835..e223b95f 100644
--- a/external/poky/bitbake/lib/toaster/tests/commands/test_runbuilds.py
+++ b/external/poky/bitbake/lib/toaster/tests/commands/test_runbuilds.py
@@ -1,23 +1,11 @@
-#! /usr/bin/env python
-# ex:ts=4:sw=4:sts=4:et
-# -*- tab-width: 4; c-basic-offset: 4; indent-tabs-mode: nil -*-
+#! /usr/bin/env python3
#
# BitBake Toaster Implementation
#
# Copyright (C) 2016 Intel Corporation
#
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License version 2 as
-# published by the Free Software Foundation.
+# SPDX-License-Identifier: GPL-2.0-only
#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License along
-# with this program; if not, write to the Free Software Foundation, Inc.,
-# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
import os
diff --git a/external/poky/bitbake/lib/toaster/tests/db/test_db.py b/external/poky/bitbake/lib/toaster/tests/db/test_db.py
index a0f5f6ec..04104222 100644
--- a/external/poky/bitbake/lib/toaster/tests/db/test_db.py
+++ b/external/poky/bitbake/lib/toaster/tests/db/test_db.py
@@ -2,6 +2,8 @@
#
# Copyright (c) 2016 Damien Lespiau
#
+# SPDX-License-Identifier: MIT
+#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
# in the Software without restriction, including without limitation the rights
diff --git a/external/poky/bitbake/lib/toaster/tests/eventreplay/__init__.py b/external/poky/bitbake/lib/toaster/tests/eventreplay/__init__.py
index 69566194..8ed6792e 100644
--- a/external/poky/bitbake/lib/toaster/tests/eventreplay/__init__.py
+++ b/external/poky/bitbake/lib/toaster/tests/eventreplay/__init__.py
@@ -1,23 +1,11 @@
-#! /usr/bin/env python
-# ex:ts=4:sw=4:sts=4:et
-# -*- tab-width: 4; c-basic-offset: 4; indent-tabs-mode: nil -*-
+#! /usr/bin/env python3
#
# BitBake Toaster Implementation
#
# Copyright (C) 2016 Intel Corporation
#
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License version 2 as
-# published by the Free Software Foundation.
+# SPDX-License-Identifier: GPL-2.0-only
#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License along
-# with this program; if not, write to the Free Software Foundation, Inc.,
-# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
# Tests were part of openembedded-core oe selftest Authored by: Lucian Musat
# Ionut Chisanovici, Paul Eggleton and Cristian Iorga
diff --git a/external/poky/bitbake/lib/toaster/tests/functional/functional_helpers.py b/external/poky/bitbake/lib/toaster/tests/functional/functional_helpers.py
index 486078a6..455c408e 100644
--- a/external/poky/bitbake/lib/toaster/tests/functional/functional_helpers.py
+++ b/external/poky/bitbake/lib/toaster/tests/functional/functional_helpers.py
@@ -1,23 +1,11 @@
-#! /usr/bin/env python
-# ex:ts=4:sw=4:sts=4:et
-# -*- tab-width: 4; c-basic-offset: 4; indent-tabs-mode: nil -*-
+#! /usr/bin/env python3
#
# BitBake Toaster functional tests implementation
#
# Copyright (C) 2017 Intel Corporation
#
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License version 2 as
-# published by the Free Software Foundation.
+# SPDX-License-Identifier: GPL-2.0-only
#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License along
-# with this program; if not, write to the Free Software Foundation, Inc.,
-# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
import os
import logging
diff --git a/external/poky/bitbake/lib/toaster/tests/functional/test_functional_basic.py b/external/poky/bitbake/lib/toaster/tests/functional/test_functional_basic.py
index cfa2b0fd..5683e387 100644
--- a/external/poky/bitbake/lib/toaster/tests/functional/test_functional_basic.py
+++ b/external/poky/bitbake/lib/toaster/tests/functional/test_functional_basic.py
@@ -1,25 +1,12 @@
-#! /usr/bin/env python
-# ex:ts=4:sw=4:sts=4:et
-# -*- tab-width: 4; c-basic-offset: 4; indent-tabs-mode: nil -*-
+#! /usr/bin/env python3
#
# BitBake Toaster functional tests implementation
#
# Copyright (C) 2017 Intel Corporation
#
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License version 2 as
-# published by the Free Software Foundation.
+# SPDX-License-Identifier: GPL-2.0-only
#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License along
-# with this program; if not, write to the Free Software Foundation, Inc.,
-# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
-import time
import re
from tests.functional.functional_helpers import SeleniumFunctionalTestCase
from orm.models import Project
diff --git a/external/poky/bitbake/lib/toaster/tests/views/test_views.py b/external/poky/bitbake/lib/toaster/tests/views/test_views.py
index 1463077e..735d596b 100644
--- a/external/poky/bitbake/lib/toaster/tests/views/test_views.py
+++ b/external/poky/bitbake/lib/toaster/tests/views/test_views.py
@@ -1,29 +1,17 @@
-#! /usr/bin/env python
-# ex:ts=4:sw=4:sts=4:et
-# -*- tab-width: 4; c-basic-offset: 4; indent-tabs-mode: nil -*-
+#! /usr/bin/env python3
#
# BitBake Toaster Implementation
#
# Copyright (C) 2013-2015 Intel Corporation
#
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License version 2 as
-# published by the Free Software Foundation.
+# SPDX-License-Identifier: GPL-2.0-only
#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License along
-# with this program; if not, write to the Free Software Foundation, Inc.,
-# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
"""Test cases for Toaster GUI and ReST."""
from django.test import TestCase
from django.test.client import RequestFactory
-from django.core.urlresolvers import reverse
+from django.urls import reverse
from django.db.models import Q
from orm.models import Project, Package
diff --git a/external/poky/bitbake/lib/toaster/toastergui/api.py b/external/poky/bitbake/lib/toaster/toastergui/api.py
index 564d595a..b4cdc335 100644
--- a/external/poky/bitbake/lib/toaster/toastergui/api.py
+++ b/external/poky/bitbake/lib/toaster/toastergui/api.py
@@ -3,19 +3,8 @@
#
# Copyright (C) 2016 Intel Corporation
#
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License version 2 as
-# published by the Free Software Foundation.
+# SPDX-License-Identifier: GPL-2.0-only
#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License along
-# with this program; if not, write to the Free Software Foundation, Inc.,
-# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
-
# Please run flake8 on this file before sending patches
import os
@@ -24,7 +13,6 @@ import logging
import json
import subprocess
from collections import Counter
-from shutil import copyfile
from orm.models import Project, ProjectTarget, Build, Layer_Version
from orm.models import LayerVersionDependency, LayerSource, ProjectLayer
@@ -36,12 +24,10 @@ from bldcontrol import bbcontroller
from django.http import HttpResponse, JsonResponse
from django.views.generic import View
-from django.core.urlresolvers import reverse
+from django.urls import reverse
from django.db.models import Q, F
from django.db import Error
from toastergui.templatetags.projecttags import filtered_filesizeformat
-from django.utils import timezone
-import pytz
# development/debugging support
verbose = 2
diff --git a/external/poky/bitbake/lib/toaster/toastergui/buildtables.py b/external/poky/bitbake/lib/toaster/toastergui/buildtables.py
index 755a7c2e..327059d0 100644
--- a/external/poky/bitbake/lib/toaster/toastergui/buildtables.py
+++ b/external/poky/bitbake/lib/toaster/toastergui/buildtables.py
@@ -1,23 +1,10 @@
#
-# ex:ts=4:sw=4:sts=4:et
-# -*- tab-width: 4; c-basic-offset: 4; indent-tabs-mode: nil -*-
-#
# BitBake Toaster Implementation
#
# Copyright (C) 2016 Intel Corporation
#
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License version 2 as
-# published by the Free Software Foundation.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
+# SPDX-License-Identifier: GPL-2.0-only
#
-# You should have received a copy of the GNU General Public License along
-# with this program; if not, write to the Free Software Foundation, Inc.,
-# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
from orm.models import Build, Task, Target, Package
from django.db.models import Q, Sum
diff --git a/external/poky/bitbake/lib/toaster/toastergui/static/js/importlayer.js b/external/poky/bitbake/lib/toaster/toastergui/static/js/importlayer.js
index 29648398..8e2032de 100644
--- a/external/poky/bitbake/lib/toaster/toastergui/static/js/importlayer.js
+++ b/external/poky/bitbake/lib/toaster/toastergui/static/js/importlayer.js
@@ -17,11 +17,15 @@ function importLayerPageInit (ctx) {
var currentLayerDepSelection;
var validLayerName = /^(\w|-)+$/;
+ /* Catch 'disable' race condition between type-ahead started and "input change" */
+ var typeAheadStarted = 0;
+
libtoaster.makeTypeahead(layerDepInput,
libtoaster.ctx.layersTypeAheadUrl,
{ include_added: "true" }, function(item){
currentLayerDepSelection = item;
layerDepBtn.removeAttr("disabled");
+ typeAheadStarted = 1;
});
layerDepInput.on("typeahead:select", function(event, data){
@@ -34,7 +38,10 @@ function importLayerPageInit (ctx) {
// disable the "Add layer" button when the layer input typeahead is empty
// or not in the typeahead choices
layerDepInput.on("input change", function(){
- layerDepBtn.attr("disabled","disabled");
+ if (0 == typeAheadStarted) {
+ layerDepBtn.attr("disabled","disabled");
+ }
+ typeAheadStarted = 0;
});
/* We automatically add "openembedded-core" layer for convenience as a
@@ -50,6 +57,7 @@ function importLayerPageInit (ctx) {
});
layerDepBtn.click(function(){
+ typeAheadStarted = 0;
if (currentLayerDepSelection == undefined)
return;
@@ -77,7 +85,7 @@ function importLayerPageInit (ctx) {
$("#layer-deps-list").append(newLayerDep);
- libtoaster.getLayerDepsForProject(currentLayerDepSelection.layerdetailurl,
+ libtoaster.getLayerDepsForProject(currentLayerDepSelection.xhrLayerUrl,
function (data){
/* These are the dependencies of the layer added as a dependency */
if (data.list.length > 0) {
diff --git a/external/poky/bitbake/lib/toaster/toastergui/tablefilter.py b/external/poky/bitbake/lib/toaster/toastergui/tablefilter.py
index 65454e14..ffef7955 100644
--- a/external/poky/bitbake/lib/toaster/toastergui/tablefilter.py
+++ b/external/poky/bitbake/lib/toaster/toastergui/tablefilter.py
@@ -1,23 +1,10 @@
#
-# ex:ts=4:sw=4:sts=4:et
-# -*- tab-width: 4; c-basic-offset: 4; indent-tabs-mode: nil -*-
-#
# BitBake Toaster Implementation
#
# Copyright (C) 2015 Intel Corporation
#
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License version 2 as
-# published by the Free Software Foundation.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
+# SPDX-License-Identifier: GPL-2.0-only
#
-# You should have received a copy of the GNU General Public License along
-# with this program; if not, write to the Free Software Foundation, Inc.,
-# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
from django.db.models import Q, Max, Min
from django.utils import dateparse, timezone
diff --git a/external/poky/bitbake/lib/toaster/toastergui/tables.py b/external/poky/bitbake/lib/toaster/toastergui/tables.py
index 9ff756bc..528dd32b 100644
--- a/external/poky/bitbake/lib/toaster/toastergui/tables.py
+++ b/external/poky/bitbake/lib/toaster/toastergui/tables.py
@@ -1,34 +1,16 @@
#
-# ex:ts=4:sw=4:sts=4:et
-# -*- tab-width: 4; c-basic-offset: 4; indent-tabs-mode: nil -*-
-#
# BitBake Toaster Implementation
#
# Copyright (C) 2015 Intel Corporation
#
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License version 2 as
-# published by the Free Software Foundation.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
+# SPDX-License-Identifier: GPL-2.0-only
#
-# You should have received a copy of the GNU General Public License along
-# with this program; if not, write to the Free Software Foundation, Inc.,
-# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
from toastergui.widgets import ToasterTable
-from orm.models import Recipe, ProjectLayer, Layer_Version, Machine, Project
+from orm.models import Recipe, ProjectLayer, Layer_Version, Project
from orm.models import CustomImageRecipe, Package, Target, Build, LogMessage, Task
from orm.models import CustomImagePackage, Package_DependencyManager
-from orm.models import Distro
-from django.db.models import Q, Max, Sum, Count, When, Case, Value, IntegerField
-from django.conf.urls import url
-from django.core.urlresolvers import reverse, resolve
-from django.http import HttpResponse
-from django.views.generic import TemplateView
+from django.db.models import Q, Sum, Count, When, Case, Value, IntegerField
from toastergui.tablefilter import TableFilter
from toastergui.tablefilter import TableFilterActionToggle
diff --git a/external/poky/bitbake/lib/toaster/toastergui/templatetags/field_values_filter.py b/external/poky/bitbake/lib/toaster/toastergui/templatetags/field_values_filter.py
index 5a73af79..eb483396 100644
--- a/external/poky/bitbake/lib/toaster/toastergui/templatetags/field_values_filter.py
+++ b/external/poky/bitbake/lib/toaster/toastergui/templatetags/field_values_filter.py
@@ -1,3 +1,7 @@
+#
+# SPDX-License-Identifier: GPL-2.0-only
+#
+
from django import template
register = template.Library()
diff --git a/external/poky/bitbake/lib/toaster/toastergui/templatetags/objects_to_dictionaries_filter.py b/external/poky/bitbake/lib/toaster/toastergui/templatetags/objects_to_dictionaries_filter.py
index 0dcc7d27..e242234b 100644
--- a/external/poky/bitbake/lib/toaster/toastergui/templatetags/objects_to_dictionaries_filter.py
+++ b/external/poky/bitbake/lib/toaster/toastergui/templatetags/objects_to_dictionaries_filter.py
@@ -1,5 +1,8 @@
+#
+# SPDX-License-Identifier: GPL-2.0-only
+#
+
from django import template
-import json
register = template.Library()
diff --git a/external/poky/bitbake/lib/toaster/toastergui/templatetags/project_url_tag.py b/external/poky/bitbake/lib/toaster/toastergui/templatetags/project_url_tag.py
index 04770ac6..7b6f15b2 100644
--- a/external/poky/bitbake/lib/toaster/toastergui/templatetags/project_url_tag.py
+++ b/external/poky/bitbake/lib/toaster/toastergui/templatetags/project_url_tag.py
@@ -1,5 +1,9 @@
+#
+# SPDX-License-Identifier: GPL-2.0-only
+#
+
from django import template
-from django.core.urlresolvers import reverse
+from django.urls import reverse
register = template.Library()
diff --git a/external/poky/bitbake/lib/toaster/toastergui/templatetags/projecttags.py b/external/poky/bitbake/lib/toaster/toastergui/templatetags/projecttags.py
index b170a161..c432f59a 100644
--- a/external/poky/bitbake/lib/toaster/toastergui/templatetags/projecttags.py
+++ b/external/poky/bitbake/lib/toaster/toastergui/templatetags/projecttags.py
@@ -1,25 +1,12 @@
#
-# ex:ts=4:sw=4:sts=4:et
-# -*- tab-width: 4; c-basic-offset: 4; indent-tabs-mode: nil -*-
-#
# BitBake Toaster Implementation
#
# Copyright (C) 2013 Intel Corporation
#
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License version 2 as
-# published by the Free Software Foundation.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
+# SPDX-License-Identifier: GPL-2.0-only
#
-# You should have received a copy of the GNU General Public License along
-# with this program; if not, write to the Free Software Foundation, Inc.,
-# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
-from datetime import datetime, timedelta
+from datetime import timedelta
from os.path import relpath
import re
from django import template
@@ -57,7 +44,7 @@ def json(value, default = None):
# it manually here
return mark_safe(JsonLib.dumps(value, indent=2, default = default, ensure_ascii=False).replace('</', '<\\/'))
-@register.assignment_tag
+@register.simple_tag
def query(qs, **kwargs):
""" template tag which allows queryset filtering. Usage:
{% query books author=author as mybooks %}
@@ -96,7 +83,7 @@ def divide(value, arg):
def multiply(value, arg):
return int(value) * int(arg)
-@register.assignment_tag
+@register.simple_tag
def datecompute(delta, start = timezone.now()):
return start + timedelta(delta)
@@ -225,7 +212,7 @@ def filtered_installedsize(size, installed_size):
"""If package.installed_size not null and not empty return it,
else return package.size
"""
- return size if (installed_size == 0) or (installed_size == "") or (installed_size == None) else installed_size
+ return size if (installed_size == 0) or (installed_size == "") or (installed_size is None) else installed_size
@register.filter
def filtered_packageversion(version, revision):
@@ -241,7 +228,7 @@ def filter_sizeovertotal(package_object, total_size):
formatted nicely.
"""
size = package_object.installed_size
- if size == None or size == '':
+ if size is None or size == '':
size = package_object.size
return '{:.1%}'.format(float(size)/float(total_size))
diff --git a/external/poky/bitbake/lib/toaster/toastergui/typeaheads.py b/external/poky/bitbake/lib/toaster/toastergui/typeaheads.py
index 5aa0f8d8..a1e6fe90 100644
--- a/external/poky/bitbake/lib/toaster/toastergui/typeaheads.py
+++ b/external/poky/bitbake/lib/toaster/toastergui/typeaheads.py
@@ -3,24 +3,14 @@
#
# Copyright (C) 2015 Intel Corporation
#
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License version 2 as
-# published by the Free Software Foundation.
+# SPDX-License-Identifier: GPL-2.0-only
#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License along
-# with this program; if not, write to the Free Software Foundation, Inc.,
-# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
import subprocess
from toastergui.widgets import ToasterTypeAhead
from orm.models import Project
-from django.core.urlresolvers import reverse
+from django.urls import reverse
from django.core.cache import cache
diff --git a/external/poky/bitbake/lib/toaster/toastergui/urls.py b/external/poky/bitbake/lib/toaster/toastergui/urls.py
index dc03e303..d2df4e60 100644
--- a/external/poky/bitbake/lib/toaster/toastergui/urls.py
+++ b/external/poky/bitbake/lib/toaster/toastergui/urls.py
@@ -3,23 +3,12 @@
#
# Copyright (C) 2013-2017 Intel Corporation
#
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License version 2 as
-# published by the Free Software Foundation.
+# SPDX-License-Identifier: GPL-2.0-only
#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License along
-# with this program; if not, write to the Free Software Foundation, Inc.,
-# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
-from django.conf.urls import include, url
-from django.views.generic import RedirectView, TemplateView
+from django.conf.urls import url
+from django.views.generic import RedirectView
-from django.http import HttpResponseBadRequest
from toastergui import tables
from toastergui import buildtables
from toastergui import typeaheads
diff --git a/external/poky/bitbake/lib/toaster/toastergui/views.py b/external/poky/bitbake/lib/toaster/toastergui/views.py
index c712b06a..9a5e48e3 100644
--- a/external/poky/bitbake/lib/toaster/toastergui/views.py
+++ b/external/poky/bitbake/lib/toaster/toastergui/views.py
@@ -1,24 +1,10 @@
#
-# ex:ts=4:sw=4:sts=4:et
-# -*- tab-width: 4; c-basic-offset: 4; indent-tabs-mode: nil -*-
-#
# BitBake Toaster Implementation
#
# Copyright (C) 2013 Intel Corporation
#
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License version 2 as
-# published by the Free Software Foundation.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
+# SPDX-License-Identifier: GPL-2.0-only
#
-# You should have received a copy of the GNU General Public License along
-# with this program; if not, write to the Free Software Foundation, Inc.,
-# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
-
import re
@@ -33,8 +19,8 @@ from orm.models import Target_Installed_Package, Target_File
from orm.models import TargetKernelFile, TargetSDKFile, Target_Image_File
from orm.models import BitbakeVersion, CustomImageRecipe
-from django.core.urlresolvers import reverse, resolve
-from django.core.exceptions import MultipleObjectsReturned, ObjectDoesNotExist
+from django.urls import reverse, resolve
+from django.core.exceptions import ObjectDoesNotExist
from django.core.paginator import Paginator, EmptyPage, PageNotAnInteger
from django.http import HttpResponseNotFound, JsonResponse
from django.utils import timezone
@@ -65,7 +51,7 @@ class MimeTypeFinder(object):
def get_mimetype(self, path):
guess = mimetypes.guess_type(path, self._strict)
guessed_type = guess[0]
- if guessed_type == None:
+ if guessed_type is None:
guessed_type = 'application/octet-stream'
return guessed_type
@@ -140,7 +126,7 @@ def _lv_to_dict(prj, x = None):
return {"id": x.pk,
"name": x.layer.name,
"tooltip": "%s | %s" % (x.layer.vcs_url,x.get_vcs_reference()),
- "detail": "(%s" % x.layer.vcs_url + (")" if x.release == None else " | "+x.get_vcs_reference()+")"),
+ "detail": "(%s" % x.layer.vcs_url + (")" if x.release is None else " | "+x.get_vcs_reference()+")"),
"giturl": x.layer.vcs_url,
"layerdetailurl" : reverse('layerdetails', args=(prj.id,x.pk)),
"revision" : x.get_vcs_reference(),
@@ -366,7 +352,7 @@ def _get_parameters_values(request, default_count, default_order):
# set cookies for parameters. this is usefull in case parameters are set
# manually from the GET values of the link
def _set_parameters_values(pagesize, orderby, request):
- from django.core.urlresolvers import resolve
+ from django.urls import resolve
current_url = resolve(request.path_info).url_name
request.session['%s_count' % current_url] = pagesize
request.session['%s_orderby' % current_url] =orderby
@@ -678,7 +664,6 @@ def recipe_packages(request, build_id, recipe_id):
_set_parameters_values(pagesize, orderby, request)
return response
-from django.core.serializers.json import DjangoJSONEncoder
from django.http import HttpResponse
def xhr_dirinfo(request, build_id, target_id):
top = request.GET.get('start', '/')
@@ -733,7 +718,7 @@ def _get_dir_entries(build_id, target_id, start):
resolved_id = o.sym_target_id
resolved_path = o.path
if target_packages.count():
- while resolved_id != "" and resolved_id != None:
+ while resolved_id != "" and resolved_id is not None:
tf = Target_File.objects.get(pk=resolved_id)
resolved_path = tf.path
resolved_id = tf.sym_target_id
@@ -745,10 +730,10 @@ def _get_dir_entries(build_id, target_id, start):
entry['package_id'] = str(p.id)
entry['package'] = p.name
# don't use resolved path from above, show immediate link-to
- if o.sym_target_id != "" and o.sym_target_id != None:
+ if o.sym_target_id != "" and o.sym_target_id is not None:
entry['link_to'] = Target_File.objects.get(pk=o.sym_target_id).path
entry['size'] = filtered_filesizeformat(o.size)
- if entry['link_to'] != None:
+ if entry['link_to'] is not None:
entry['permission'] = node_str[o.inodetype] + o.permission
else:
entry['permission'] = node_str[o.inodetype] + o.permission
@@ -770,7 +755,7 @@ def dirinfo(request, build_id, target_id, file_path=None):
objects = _get_dir_entries(build_id, target_id, '/')
packages_sum = Package.objects.filter(id__in=Target_Installed_Package.objects.filter(target_id=target_id).values('package_id')).aggregate(Sum('installed_size'))
dir_list = None
- if file_path != None:
+ if file_path is not None:
"""
Link from the included package detail file list page and is
requesting opening the dir info to a specific file path.
@@ -1044,15 +1029,15 @@ def _get_package_dependency_count(package, target_id, is_installed):
def _get_package_alias(package):
alias = package.installed_name
- if alias != None and alias != '' and alias != package.name:
+ if alias is not None and alias != '' and alias != package.name:
return alias
else:
return ''
def _get_fullpackagespec(package):
r = package.name
- version_good = package.version != None and package.version != ''
- revision_good = package.revision != None and package.revision != ''
+ version_good = package.version is not None and package.version != ''
+ revision_good = package.revision is not None and package.revision != ''
if version_good or revision_good:
r += '_'
if version_good:
@@ -1206,7 +1191,7 @@ def package_included_reverse_dependencies(request, build_id, target_id, package_
return _redirect_parameters( 'package_included_reverse_dependencies', request.GET, mandatory_parameters, build_id = build_id, target_id = target_id, package_id = package_id)
(filter_string, search_term, ordering_string) = _search_tuple(request, Package_File)
- queryset = Package_Dependency.objects.select_related('depends_on__name', 'depends_on__size').filter(depends_on=package_id, target_id=target_id, dep_type=Package_Dependency.TYPE_TRDEPENDS)
+ queryset = Package_Dependency.objects.select_related('depends_on').filter(depends_on=package_id, target_id=target_id, dep_type=Package_Dependency.TYPE_TRDEPENDS)
objects = _get_queryset(Package_Dependency, queryset, filter_string, search_term, ordering_string, 'package__name')
package = Package.objects.get(pk=package_id)
@@ -1354,7 +1339,7 @@ def json_build(request,build_id):
import toastermain.settings
-from orm.models import Project, ProjectLayer, ProjectTarget, ProjectVariable
+from orm.models import Project, ProjectLayer, ProjectVariable
from bldcontrol.models import BuildEnvironment
# we have a set of functions if we're in managed mode, or
@@ -1363,10 +1348,8 @@ from bldcontrol.models import BuildEnvironment
if True:
from django.contrib.auth.models import User
from django.contrib.auth import authenticate, login
- from django.contrib.auth.decorators import login_required
- from orm.models import LayerSource, ToasterSetting, Release, Machine, LayerVersionDependency
- from bldcontrol.models import BuildRequest
+ from orm.models import LayerSource, ToasterSetting, Release
import traceback
@@ -1381,8 +1364,8 @@ if True:
template = "newproject.html"
context = {
- 'email': request.user.email if request.user.is_authenticated() else '',
- 'username': request.user.username if request.user.is_authenticated() else '',
+ 'email': request.user.email if request.user.is_authenticated else '',
+ 'username': request.user.username if request.user.is_authenticated else '',
'releases': Release.objects.order_by("description"),
}
@@ -1408,7 +1391,7 @@ if True:
# set alert for missing fields
raise BadParameterException("Fields missing: %s" % ", ".join(missing))
- if not request.user.is_authenticated():
+ if not request.user.is_authenticated:
user = authenticate(username = request.POST.get('username', '_anonuser'), password = 'nopass')
if user is None:
user = User.objects.create_user(username = request.POST.get('username', '_anonuser'), email = request.POST.get('email', ''), password = "nopass")
@@ -1455,8 +1438,8 @@ if True:
project = Project.objects.get(pk=pid)
template = "newproject_specific.html"
context = {
- 'email': request.user.email if request.user.is_authenticated() else '',
- 'username': request.user.username if request.user.is_authenticated() else '',
+ 'email': request.user.email if request.user.is_authenticated else '',
+ 'username': request.user.username if request.user.is_authenticated else '',
'releases': Release.objects.order_by("description"),
'projectname': project.name,
'project_pk': project.pk,
@@ -1486,7 +1469,7 @@ if True:
# set alert for missing fields
raise BadParameterException("Fields missing: %s" % ", ".join(missing))
- if not request.user.is_authenticated():
+ if not request.user.is_authenticated:
user = authenticate(username = request.POST.get('username', '_anonuser'), password = 'nopass')
if user is None:
user = User.objects.create_user(username = request.POST.get('username', '_anonuser'), email = request.POST.get('email', ''), password = "nopass")
diff --git a/external/poky/bitbake/lib/toaster/toastergui/widgets.py b/external/poky/bitbake/lib/toaster/toastergui/widgets.py
index db5c3aa0..ceff5294 100644
--- a/external/poky/bitbake/lib/toaster/toastergui/widgets.py
+++ b/external/poky/bitbake/lib/toaster/toastergui/widgets.py
@@ -1,23 +1,10 @@
#
-# ex:ts=4:sw=4:sts=4:et
-# -*- tab-width: 4; c-basic-offset: 4; indent-tabs-mode: nil -*-
-#
# BitBake Toaster Implementation
#
# Copyright (C) 2015 Intel Corporation
#
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License version 2 as
-# published by the Free Software Foundation.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
+# SPDX-License-Identifier: GPL-2.0-only
#
-# You should have received a copy of the GNU General Public License along
-# with this program; if not, write to the Free Software Foundation, Inc.,
-# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
from django.views.generic import View, TemplateView
from django.views.decorators.cache import cache_control
@@ -35,7 +22,7 @@ from django.utils import timezone
from toastergui.templatetags.projecttags import sectohms, get_tasks
from toastergui.templatetags.projecttags import json as template_json
from django.http import JsonResponse
-from django.core.urlresolvers import reverse
+from django.urls import reverse
import types
import json
diff --git a/external/poky/bitbake/lib/toaster/toastermain/management/commands/builddelete.py b/external/poky/bitbake/lib/toaster/toastermain/management/commands/builddelete.py
index bf69a8fb..93919dec 100644
--- a/external/poky/bitbake/lib/toaster/toastermain/management/commands/builddelete.py
+++ b/external/poky/bitbake/lib/toaster/toastermain/management/commands/builddelete.py
@@ -1,9 +1,11 @@
-from django.core.management.base import BaseCommand, CommandError
+#
+# SPDX-License-Identifier: GPL-2.0-only
+#
+
+from django.core.management.base import BaseCommand
from django.core.exceptions import ObjectDoesNotExist
from orm.models import Build
from django.db import OperationalError
-import os
-
class Command(BaseCommand):
diff --git a/external/poky/bitbake/lib/toaster/toastermain/management/commands/buildimport.py b/external/poky/bitbake/lib/toaster/toastermain/management/commands/buildimport.py
index 2d57ab55..59da6ff7 100644
--- a/external/poky/bitbake/lib/toaster/toastermain/management/commands/buildimport.py
+++ b/external/poky/bitbake/lib/toaster/toastermain/management/commands/buildimport.py
@@ -1,23 +1,10 @@
#
-# ex:ts=4:sw=4:sts=4:et
-# -*- tab-width: 4; c-basic-offset: 4; indent-tabs-mode: nil -*-
-#
# BitBake Toaster Implementation
#
# Copyright (C) 2018 Wind River Systems
#
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License version 2 as
-# published by the Free Software Foundation.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
+# SPDX-License-Identifier: GPL-2.0-only
#
-# You should have received a copy of the GNU General Public License along
-# with this program; if not, write to the Free Software Foundation, Inc.,
-# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
# buildimport: import a project for project specific configuration
#
@@ -44,12 +31,10 @@
# ../bitbake/lib/toaster/manage.py buildimport --name=test --path=`pwd` --callback="" --command=import
-from django.core.management.base import BaseCommand, CommandError
-from django.core.exceptions import ObjectDoesNotExist
-from orm.models import ProjectManager, Project, Release, ProjectVariable
+from django.core.management.base import BaseCommand
+from orm.models import Project, Release, ProjectVariable
from orm.models import Layer, Layer_Version, LayerSource, ProjectLayer
from toastergui.api import scan_layer_content
-from django.db import OperationalError
import os
import re
@@ -129,6 +114,15 @@ class Command(BaseCommand):
help='command (configure,reconfigure,import)',
)
+ def get_var(self, varname):
+ value = self.vars.get(varname, '')
+ if value:
+ varrefs = re.findall('\${([^}]*)}', value)
+ for ref in varrefs:
+ if ref in self.vars:
+ value = value.replace('${%s}' % ref, self.vars[ref])
+ return value
+
# Extract the bb variables from a conf file
def scan_conf(self,fn):
vars = self.vars
@@ -256,7 +250,7 @@ class Command(BaseCommand):
# Apply table of all layer versions
def extract_bblayers(self):
# set up the constants
- bblayer_str = self.vars['BBLAYERS']
+ bblayer_str = self.get_var('BBLAYERS')
TOASTER_DIR = os.environ.get('TOASTER_DIR')
INSTALL_CLONE_PREFIX = os.path.dirname(TOASTER_DIR) + "/"
TOASTER_CLONE_PREFIX = TOASTER_DIR + "/_toaster_clones/"
@@ -436,6 +430,7 @@ class Command(BaseCommand):
# Scan the project's conf files (if any)
def scan_conf_variables(self,project_path):
+ self.vars['TOPDIR'] = project_path
# scan the project's settings, add any new layers or variables
if os.path.isfile("%s/conf/local.conf" % project_path):
self.scan_conf("%s/conf/local.conf" % project_path)
@@ -481,7 +476,6 @@ class Command(BaseCommand):
release_name = 'None' if not pl.layercommit.release else pl.layercommit.release.name
print(" AFTER :ProjectLayer=%s,%s,%s,%s" % (pl.layercommit.layer.name,release_name,pl.layercommit.branch,pl.layercommit.commit))
-
def handle(self, *args, **options):
project_name = options['name']
project_path = options['path']
@@ -520,7 +514,7 @@ class Command(BaseCommand):
default_release = Release.objects.get(id=1)
# SANITY: if 'reconfig' but project does not exist (deleted externally), switch to 'import'
- if ("reconfigure" == options['command']) and (None == project):
+ if ("reconfigure" == options['command']) and project is None:
options['command'] = 'import'
# 'Configure':
@@ -566,6 +560,7 @@ class Command(BaseCommand):
# preset the mode and default image recipe
project.set_variable(Project.PROJECT_SPECIFIC_ISNEW,Project.PROJECT_SPECIFIC_NEW)
project.set_variable(Project.PROJECT_SPECIFIC_DEFAULTIMAGE,"core-image-minimal")
+
# Assert any extended/custom actions or variables for new non-Toaster projects
if not len(self.toaster_vars):
pass
diff --git a/external/poky/bitbake/lib/toaster/toastermain/management/commands/buildslist.py b/external/poky/bitbake/lib/toaster/toastermain/management/commands/buildslist.py
index 70b5812d..3ad5289c 100644
--- a/external/poky/bitbake/lib/toaster/toastermain/management/commands/buildslist.py
+++ b/external/poky/bitbake/lib/toaster/toastermain/management/commands/buildslist.py
@@ -1,6 +1,9 @@
-from django.core.management.base import BaseCommand, CommandError
+#
+# SPDX-License-Identifier: GPL-2.0-only
+#
+
+from django.core.management.base import BaseCommand
from orm.models import Build
-import os
diff --git a/external/poky/bitbake/lib/toaster/toastermain/management/commands/checksocket.py b/external/poky/bitbake/lib/toaster/toastermain/management/commands/checksocket.py
index 0399b865..811fd5d5 100644
--- a/external/poky/bitbake/lib/toaster/toastermain/management/commands/checksocket.py
+++ b/external/poky/bitbake/lib/toaster/toastermain/management/commands/checksocket.py
@@ -1,23 +1,11 @@
-#!/usr/bin/env python
-# ex:ts=4:sw=4:sts=4:et
-# -*- tab-width: 4; c-basic-offset: 4; indent-tabs-mode: nil -*-
+#!/usr/bin/env python3
#
# BitBake Toaster Implementation
#
# Copyright (C) 2015 Intel Corporation
#
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License version 2 as
-# published by the Free Software Foundation.
+# SPDX-License-Identifier: GPL-2.0-only
#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License along
-# with this program; if not, write to the Free Software Foundation, Inc.,
-# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
"""Custom management command checksocket."""
diff --git a/external/poky/bitbake/lib/toaster/toastermain/management/commands/perf.py b/external/poky/bitbake/lib/toaster/toastermain/management/commands/perf.py
index 6b450bbd..7d629fb3 100644
--- a/external/poky/bitbake/lib/toaster/toastermain/management/commands/perf.py
+++ b/external/poky/bitbake/lib/toaster/toastermain/management/commands/perf.py
@@ -1,3 +1,7 @@
+#
+# SPDX-License-Identifier: GPL-2.0-only
+#
+
from django.core.management.base import BaseCommand
from django.test.client import Client
import os, sys, re
diff --git a/external/poky/bitbake/lib/toaster/toastermain/settings.py b/external/poky/bitbake/lib/toaster/toastermain/settings.py
index 13541d38..a4b370c8 100644
--- a/external/poky/bitbake/lib/toaster/toastermain/settings.py
+++ b/external/poky/bitbake/lib/toaster/toastermain/settings.py
@@ -1,23 +1,10 @@
#
-# ex:ts=4:sw=4:sts=4:et
-# -*- tab-width: 4; c-basic-offset: 4; indent-tabs-mode: nil -*-
-#
# BitBake Toaster Implementation
#
# Copyright (C) 2013 Intel Corporation
#
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License version 2 as
-# published by the Free Software Foundation.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
+# SPDX-License-Identifier: GPL-2.0-only
#
-# You should have received a copy of the GNU General Public License along
-# with this program; if not, write to the Free Software Foundation, Inc.,
-# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
# Django settings for Toaster project.
@@ -202,15 +189,16 @@ TEMPLATES = [
},
]
-MIDDLEWARE_CLASSES = (
+MIDDLEWARE = [
'django.middleware.common.CommonMiddleware',
'django.contrib.sessions.middleware.SessionMiddleware',
'django.middleware.csrf.CsrfViewMiddleware',
'django.contrib.auth.middleware.AuthenticationMiddleware',
'django.contrib.messages.middleware.MessageMiddleware',
- # Uncomment the next line for simple clickjacking protection:
- # 'django.middleware.clickjacking.XFrameOptionsMiddleware',
-)
+ 'django.contrib.auth.middleware.AuthenticationMiddleware',
+ 'django.contrib.messages.middleware.MessageMiddleware',
+ 'django.contrib.sessions.middleware.SessionMiddleware',
+]
CACHES = {
# 'default': {
@@ -261,7 +249,7 @@ FRESH_ENABLED = False
if os.environ.get('TOASTER_DEVEL', None) is not None:
try:
import fresh
- MIDDLEWARE_CLASSES = ("fresh.middleware.FreshMiddleware",) + MIDDLEWARE_CLASSES
+ MIDDLEWARE = ["fresh.middleware.FreshMiddleware",] + MIDDLEWARE
INSTALLED_APPS = INSTALLED_APPS + ('fresh',)
FRESH_ENABLED = True
except:
@@ -271,8 +259,8 @@ DEBUG_PANEL_ENABLED = False
if os.environ.get('TOASTER_DEVEL', None) is not None:
try:
import debug_toolbar, debug_panel
- MIDDLEWARE_CLASSES = ('debug_panel.middleware.DebugPanelMiddleware',) + MIDDLEWARE_CLASSES
- #MIDDLEWARE_CLASSES = MIDDLEWARE_CLASSES + ('debug_toolbar.middleware.DebugToolbarMiddleware',)
+ MIDDLEWARE = ['debug_panel.middleware.DebugPanelMiddleware',] + MIDDLEWARE
+ #MIDDLEWARE = MIDDLEWARE + ['debug_toolbar.middleware.DebugToolbarMiddleware',]
INSTALLED_APPS = INSTALLED_APPS + ('debug_toolbar','debug_panel',)
DEBUG_PANEL_ENABLED = True
@@ -365,5 +353,3 @@ def activate_synchronous_off(sender, connection, **kwargs):
connection_created.connect(activate_synchronous_off)
#
-
-
diff --git a/external/poky/bitbake/lib/toaster/toastermain/settings_production_example.py b/external/poky/bitbake/lib/toaster/toastermain/settings_production_example.py
index 61a28886..6cd0f52d 100644
--- a/external/poky/bitbake/lib/toaster/toastermain/settings_production_example.py
+++ b/external/poky/bitbake/lib/toaster/toastermain/settings_production_example.py
@@ -1,23 +1,10 @@
#
-# ex:ts=4:sw=4:sts=4:et
-# -*- tab-width: 4; c-basic-offset: 4; indent-tabs-mode: nil -*-
-#
# BitBake Toaster Implementation
#
# Copyright (C) 2016 Intel Corporation
#
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License version 2 as
-# published by the Free Software Foundation.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
+# SPDX-License-Identifier: GPL-2.0-only
#
-# You should have received a copy of the GNU General Public License along
-# with this program; if not, write to the Free Software Foundation, Inc.,
-# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
# See Django documentation for more information about deployment
# https://docs.djangoproject.com/en/1.8/howto/deployment/checklist/
diff --git a/external/poky/bitbake/lib/toaster/toastermain/settings_test.py b/external/poky/bitbake/lib/toaster/toastermain/settings_test.py
index a3227115..6538d9e4 100644
--- a/external/poky/bitbake/lib/toaster/toastermain/settings_test.py
+++ b/external/poky/bitbake/lib/toaster/toastermain/settings_test.py
@@ -1,23 +1,10 @@
#
-# ex:ts=4:sw=4:sts=4:et
-# -*- tab-width: 4; c-basic-offset: 4; indent-tabs-mode: nil -*-
-#
# BitBake Toaster Implementation
#
# Copyright (C) 2016 Intel Corporation
#
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License version 2 as
-# published by the Free Software Foundation.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
+# SPDX-License-Identifier: GPL-2.0-only
#
-# You should have received a copy of the GNU General Public License along
-# with this program; if not, write to the Free Software Foundation, Inc.,
-# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
# Django settings for Toaster project.
diff --git a/external/poky/bitbake/lib/toaster/toastermain/urls.py b/external/poky/bitbake/lib/toaster/toastermain/urls.py
index e2fb0aeb..5fb520b3 100644
--- a/external/poky/bitbake/lib/toaster/toastermain/urls.py
+++ b/external/poky/bitbake/lib/toaster/toastermain/urls.py
@@ -1,23 +1,10 @@
#
-# ex:ts=4:sw=4:sts=4:et
-# -*- tab-width: 4; c-basic-offset: 4; indent-tabs-mode: nil -*-
-#
# BitBake Toaster Implementation
#
# Copyright (C) 2013 Intel Corporation
#
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License version 2 as
-# published by the Free Software Foundation.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
+# SPDX-License-Identifier: GPL-2.0-only
#
-# You should have received a copy of the GNU General Public License along
-# with this program; if not, write to the Free Software Foundation, Inc.,
-# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
from django.conf.urls import include, url
from django.views.generic import RedirectView, TemplateView
@@ -64,7 +51,7 @@ if toastermain.settings.DEBUG_PANEL_ENABLED:
urlpatterns = [
# Uncomment the next line to enable the admin:
- url(r'^admin/', include(admin.site.urls)),
+ url(r'^admin/', admin.site.urls),
] + urlpatterns
# Automatically discover urls.py in various apps, beside our own
@@ -82,7 +69,7 @@ for t in os.walk(os.path.dirname(currentdir)):
# make sure we don't have this module name in
conflict = False
for p in urlpatterns:
- if p.regex.pattern == '^' + modulename + '/':
+ if p.pattern.regex.pattern == '^' + modulename + '/':
conflict = True
if not conflict:
urlpatterns.insert(0, url(r'^' + modulename + '/', include ( modulename + '.urls')))
diff --git a/external/poky/bitbake/lib/toaster/toastermain/wsgi.py b/external/poky/bitbake/lib/toaster/toastermain/wsgi.py
index 031b314b..4c312832 100644
--- a/external/poky/bitbake/lib/toaster/toastermain/wsgi.py
+++ b/external/poky/bitbake/lib/toaster/toastermain/wsgi.py
@@ -1,7 +1,8 @@
-"""
-# ex:ts=4:sw=4:sts=4:et
-# -*- tab-width: 4; c-basic-offset: 4; indent-tabs-mode: nil -*-
#
+# SPDX-License-Identifier: GPL-2.0-only
+#
+
+"""
WSGI config for Toaster project.
This module contains the WSGI application used by Django's development server