toaster.lists.yoctoproject.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/7] Upgrade to Django 3.2 LTS
@ 2022-03-12 20:31 Tim Orling
  2022-03-12 20:31 ` [PATCH 1/7] toaster-requirements.txt: " Tim Orling
                   ` (6 more replies)
  0 siblings, 7 replies; 8+ messages in thread
From: Tim Orling @ 2022-03-12 20:31 UTC (permalink / raw)
  To: toaster; +Cc: David.Reyna

Django 2.2 LTS will go EOL in April 2022.

Upgrade to Django 3.2 LTS which is supported through April 2024.

https://www.djangoproject.com/download/

The tests in bitbake/lib/toaster/tests need updating to at least
Selenium 3.141.0 (which is what the crops/toaster-container uses for
tests). For now this is out of scope of this patch series as it is not
clear the tests are working now (the tests/browser/README is very out of
date).

The following changes since commit b31eb2156d273fe70bc0b49c1549c07f6521b936:

  bitbake: toaster: automation to generate fixture files (2022-03-12 13:27:59 +0000)

are available in the Git repository at:

  git://git.yoctoproject.org/git/poky-contrib timo/toaster-updates
  http://git.yoctoproject.org/cgit.cgi/git/poky-contrib/log/?h=timo/toaster-updates

Tim Orling (7):
  toaster-requirements.txt: Django 3.2 LTS
  toaster: Update docs links in templates
  toaster: orm/models -- drop django.utils.six
  toaster: set DEFAULT_AUTO_FIELD
  toaster: migratation for models.BigAutoField
  bitbake: buildinfohelper.py fix for Django 3.2
  toaster: drop landing_not_managed template

 bitbake/lib/bb/ui/buildinfohelper.py          |  16 +-
 .../migrations/0008_models_bigautofield.py    |  48 +++++
 .../migrations/0020_models_bigautofield.py    | 173 ++++++++++++++++++
 bitbake/lib/toaster/orm/models.py             |   1 -
 .../toaster/toastergui/templates/base.html    |   2 +-
 .../toastergui/templates/configvars.html      |   2 +-
 .../toaster/toastergui/templates/landing.html |   6 +-
 .../templates/landing_not_managed.html        |  34 ----
 .../toaster/toastergui/templates/project.html |   2 +-
 .../templates/project_specific.html           |   2 +-
 .../toastergui/templates/projectconf.html     |   8 +-
 bitbake/lib/toaster/toastermain/settings.py   |   3 +
 bitbake/toaster-requirements.txt              |   2 +-
 13 files changed, 241 insertions(+), 58 deletions(-)
 create mode 100644 bitbake/lib/toaster/bldcontrol/migrations/0008_models_bigautofield.py
 create mode 100644 bitbake/lib/toaster/orm/migrations/0020_models_bigautofield.py
 delete mode 100644 bitbake/lib/toaster/toastergui/templates/landing_not_managed.html

-- 
2.30.2



^ permalink raw reply	[flat|nested] 8+ messages in thread

* [PATCH 1/7] toaster-requirements.txt: Django 3.2 LTS
  2022-03-12 20:31 [PATCH 0/7] Upgrade to Django 3.2 LTS Tim Orling
@ 2022-03-12 20:31 ` Tim Orling
  2022-03-12 20:31 ` [PATCH 2/7] toaster: Update docs links in templates Tim Orling
                   ` (5 subsequent siblings)
  6 siblings, 0 replies; 8+ messages in thread
From: Tim Orling @ 2022-03-12 20:31 UTC (permalink / raw)
  To: toaster; +Cc: David.Reyna

Django 2.2.x goes EOL April 2022.

Switch the to current LTS Django 3.2.x supported until April 2024.

Signed-off-by: Tim Orling <tim.orling@konsulko.com>
---
 bitbake/toaster-requirements.txt | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/bitbake/toaster-requirements.txt b/bitbake/toaster-requirements.txt
index 735b614546e..dedd423556a 100644
--- a/bitbake/toaster-requirements.txt
+++ b/bitbake/toaster-requirements.txt
@@ -1,3 +1,3 @@
-Django>2.2,<2.3
+Django>3.2,<3.3
 beautifulsoup4>=4.4.0
 pytz
-- 
2.30.2



^ permalink raw reply related	[flat|nested] 8+ messages in thread

* [PATCH 2/7] toaster: Update docs links in templates
  2022-03-12 20:31 [PATCH 0/7] Upgrade to Django 3.2 LTS Tim Orling
  2022-03-12 20:31 ` [PATCH 1/7] toaster-requirements.txt: " Tim Orling
@ 2022-03-12 20:31 ` Tim Orling
  2022-03-12 20:31 ` [PATCH 3/7] toaster: orm/models -- drop django.utils.six Tim Orling
                   ` (4 subsequent siblings)
  6 siblings, 0 replies; 8+ messages in thread
From: Tim Orling @ 2022-03-12 20:31 UTC (permalink / raw)
  To: toaster; +Cc: David.Reyna

Update docs links from www.yoctoproject.org to the docs.yoctoproject.org
equivalents.

Signed-off-by: Tim Orling <tim.orling@konsulko.com>
---
 bitbake/lib/toaster/toastergui/templates/base.html        | 2 +-
 bitbake/lib/toaster/toastergui/templates/configvars.html  | 2 +-
 bitbake/lib/toaster/toastergui/templates/landing.html     | 6 +++---
 bitbake/lib/toaster/toastergui/templates/project.html     | 2 +-
 .../toaster/toastergui/templates/project_specific.html    | 2 +-
 bitbake/lib/toaster/toastergui/templates/projectconf.html | 8 ++++----
 6 files changed, 11 insertions(+), 11 deletions(-)

diff --git a/bitbake/lib/toaster/toastergui/templates/base.html b/bitbake/lib/toaster/toastergui/templates/base.html
index 9e19cc33ca7..2b3054936ac 100644
--- a/bitbake/lib/toaster/toastergui/templates/base.html
+++ b/bitbake/lib/toaster/toastergui/templates/base.html
@@ -123,7 +123,7 @@
               {% endif %}
             {% endif %}
               <li id="navbar-docs">
-              <a target="_blank" href="https://www.yoctoproject.org/docs/latest/toaster-manual/toaster-manual.html">
+              <a target="_blank" href="http://docs.yoctoproject.org/toaster-manual/index.html#toaster-user-manual">
                 <i class="glyphicon glyphicon-book"></i>
                 Documentation
               </a>
diff --git a/bitbake/lib/toaster/toastergui/templates/configvars.html b/bitbake/lib/toaster/toastergui/templates/configvars.html
index 33fef9316d7..691dace3a24 100644
--- a/bitbake/lib/toaster/toastergui/templates/configvars.html
+++ b/bitbake/lib/toaster/toastergui/templates/configvars.html
@@ -66,7 +66,7 @@
         <td class="description">
             {% if variable.description %}
                 {{variable.description}}
-                <a href="https://www.yoctoproject.org/docs/current/ref-manual/ref-manual.html#var-{{variable.variable_name|variable_parent_name}}" target="_blank">
+                <a href="http://docs.yoctoproject.org/ref-manual/variables.html#term-{{variable.variable_name|variable_parent_name}}" target="_blank">
                 <span class="glyphicon glyphicon-new-window get-info"></span></a>
             {% endif %}
         </td>
diff --git a/bitbake/lib/toaster/toastergui/templates/landing.html b/bitbake/lib/toaster/toastergui/templates/landing.html
index bfaaf6fc83b..08b40fb2f2a 100644
--- a/bitbake/lib/toaster/toastergui/templates/landing.html
+++ b/bitbake/lib/toaster/toastergui/templates/landing.html
@@ -15,7 +15,7 @@
               <p>A web interface to <a href="https://www.openembedded.org">OpenEmbedded</a> and <a href="https://www.yoctoproject.org/tools-resources/projects/bitbake">BitBake</a>, the <a href="https://www.yoctoproject.org">Yocto Project</a> build system.</p>
 
 		          <p class="top-air">
-		            <a class="btn btn-info btn-lg" href="https://www.yoctoproject.org/docs/latest/toaster-manual/toaster-manual.html#toaster-manual-setup-and-use">
+		            <a class="btn btn-info btn-lg" href="http://docs.yoctoproject.org/toaster-manual/setup-and-use.html#setting-up-and-using-toaster">
 			            Toaster is ready to capture your command line builds
 		            </a>
 		          </p>
@@ -33,7 +33,7 @@
                   Toaster has no layer information. Without layer information, you cannot run builds. To generate layer information you can:
                   <ul>
                     <li>
-                      <a href="https://www.yoctoproject.org/docs/latest/toaster-manual/toaster-manual.html#layer-source">Configure a layer source</a>
+                      <a href="http://docs.yoctoproject.org/toaster-manual/reference.html#layer-source">Configure a layer source</a>
                     </li>
                     <li>
 			                <a href="{% url 'newproject' %}">Create a project</a>, then import layers
@@ -44,7 +44,7 @@
 
               <ul class="list-unstyled lead">
                 <li>
-                  <a href="https://www.yoctoproject.org/docs/latest/toaster-manual/toaster-manual.html">
+                  <a href="http://docs.yoctoproject.org/toaster-manual/index.html#toaster-user-manual">
                     Read the Toaster manual
                   </a>
                 </li>
diff --git a/bitbake/lib/toaster/toastergui/templates/project.html b/bitbake/lib/toaster/toastergui/templates/project.html
index d8ad2c79dca..22239a82fd9 100644
--- a/bitbake/lib/toaster/toastergui/templates/project.html
+++ b/bitbake/lib/toaster/toastergui/templates/project.html
@@ -139,7 +139,7 @@
         <ul>
           <li><a href="{% url 'projectlayers' project.id %}">Choose from the layers compatible with this project</a></li>
           <li><a href="{% url 'importlayer' project.id %}">Import a layer</a></li>
-          <li><a href="https://www.yoctoproject.org/docs/current/dev-manual/dev-manual.html#understanding-and-creating-layers" target="_blank">Read about layers in the documentation</a></li>
+          <li><a href="http://docs.yoctoproject.org/dev-manual/common-tasks.html#understanding-and-creating-layers" target="_blank">Read about layers in the documentation</a></li>
           <li>Or type a layer name below</li>
         </ul>
       </div>
diff --git a/bitbake/lib/toaster/toastergui/templates/project_specific.html b/bitbake/lib/toaster/toastergui/templates/project_specific.html
index 42725c0dba7..76d45b1b39d 100644
--- a/bitbake/lib/toaster/toastergui/templates/project_specific.html
+++ b/bitbake/lib/toaster/toastergui/templates/project_specific.html
@@ -137,7 +137,7 @@
         <ul>
           <li><a href="{% url 'projectlayers' project.id %}">Choose from the layers compatible with this project</a></li>
           <li><a href="{% url 'importlayer' project.id %}">Import a layer</a></li>
-          <li><a href="https://www.yoctoproject.org/docs/current/dev-manual/dev-manual.html#understanding-and-creating-layers" target="_blank">Read about layers in the documentation</a></li>
+	  <li><a href="http://docs.yoctoproject.org/dev-manual/common-tasks.html#understanding-and-creating-layers" target="_blank">Read about layers in the documentation</a></li>
           <li>Or type a layer name below</li>
         </ul>
       </div>
diff --git a/bitbake/lib/toaster/toastergui/templates/projectconf.html b/bitbake/lib/toaster/toastergui/templates/projectconf.html
index 3b91b6679b3..c3068358322 100644
--- a/bitbake/lib/toaster/toastergui/templates/projectconf.html
+++ b/bitbake/lib/toaster/toastergui/templates/projectconf.html
@@ -201,12 +201,12 @@
           <p>Toaster cannot set any variables that impact 1) the configuration of the build servers,
           or 2) where artifacts produced by the build are stored. Such variables include: </p>
           <p>
-          <code><a href="https://www.yoctoproject.org/docs/current/ref-manual/ref-manual.html#var-BB_DISKMON_DIRS" target="_blank">BB_DISKMON_DIRS</a></code>
-          <code><a href="https://www.yoctoproject.org/docs/current/ref-manual/ref-manual.html#var-BB_NUMBER_THREADS" target="_blank">BB_NUMBER_THREADS</a></code>
+          <code><a href="http://docs.yoctoproject.org/ref-manual/variables.html#term-BB_DISKMON_DIRS" target="_blank">BB_DISKMON_DIRS</a></code>
+          <code><a href="http://docs.yoctoproject.org/ref-manual/variables.html#term-BB_NUMBER_THREADS" target="_blank">BB_NUMBER_THREADS</a></code>
           <code>CVS_PROXY_HOST</code>
           <code>CVS_PROXY_PORT</code>
-          <code><a href="https://www.yoctoproject.org/docs/current/ref-manual/ref-manual.html#var-PARALLEL_MAKE" target="_blank">PARALLEL_MAKE</a></code>
-          <code><a href="https://www.yoctoproject.org/docs/current/ref-manual/ref-manual.html#var-TMPDIR" target="_blank">TMPDIR</a></code></p>
+          <code><a href="http://docs.yoctoproject.org/ref-manual/variables.html#term-PARALLEL_MAKE" target="_blank">PARALLEL_MAKE</a></code>
+          <code><a href="http://docs.yoctoproject.org/ref-manual/variables.html#term-TMPDIR" target="_blank">TMPDIR</a></code></p>
           <p>Plus the following standard shell environment variables:</p>
           <p><code>http_proxy</code> <code>ftp_proxy</code> <code>https_proxy</code> <code>all_proxy</code></p>
         </div>
-- 
2.30.2



^ permalink raw reply related	[flat|nested] 8+ messages in thread

* [PATCH 3/7] toaster: orm/models -- drop django.utils.six
  2022-03-12 20:31 [PATCH 0/7] Upgrade to Django 3.2 LTS Tim Orling
  2022-03-12 20:31 ` [PATCH 1/7] toaster-requirements.txt: " Tim Orling
  2022-03-12 20:31 ` [PATCH 2/7] toaster: Update docs links in templates Tim Orling
@ 2022-03-12 20:31 ` Tim Orling
  2022-03-12 20:31 ` [PATCH 4/7] toaster: set DEFAULT_AUTO_FIELD Tim Orling
                   ` (3 subsequent siblings)
  6 siblings, 0 replies; 8+ messages in thread
From: Tim Orling @ 2022-03-12 20:31 UTC (permalink / raw)
  To: toaster; +Cc: David.Reyna

Django 3.2 no longer has django.utils.six module.

Signed-off-by: Tim Orling <tim.orling@konsulko.com>
---
 bitbake/lib/toaster/orm/models.py | 1 -
 1 file changed, 1 deletion(-)

diff --git a/bitbake/lib/toaster/orm/models.py b/bitbake/lib/toaster/orm/models.py
index 6d772367d88..2cb7d7e0499 100644
--- a/bitbake/lib/toaster/orm/models.py
+++ b/bitbake/lib/toaster/orm/models.py
@@ -58,7 +58,6 @@ if 'sqlite' in settings.DATABASES['default']['ENGINE']:
             return _base_insert(self, *args, **kwargs)
     QuerySet._insert = _insert
 
-    from django.utils import six
     def _create_object_from_params(self, lookup, params):
         """
         Tries to create an object using passed params.
-- 
2.30.2



^ permalink raw reply related	[flat|nested] 8+ messages in thread

* [PATCH 4/7] toaster: set DEFAULT_AUTO_FIELD
  2022-03-12 20:31 [PATCH 0/7] Upgrade to Django 3.2 LTS Tim Orling
                   ` (2 preceding siblings ...)
  2022-03-12 20:31 ` [PATCH 3/7] toaster: orm/models -- drop django.utils.six Tim Orling
@ 2022-03-12 20:31 ` Tim Orling
  2022-03-12 20:31 ` [PATCH 5/7] toaster: migratation for models.BigAutoField Tim Orling
                   ` (2 subsequent siblings)
  6 siblings, 0 replies; 8+ messages in thread
From: Tim Orling @ 2022-03-12 20:31 UTC (permalink / raw)
  To: toaster; +Cc: David.Reyna

New in Django 3.2.

Silence warnings by adding:

DEFAULT_AUTO_FIELD = 'django.db.models.BigAutoField'

in toastermain/settings.py

Signed-off-by: Tim Orling <tim.orling@konsulko.com>
---
 bitbake/lib/toaster/toastermain/settings.py | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/bitbake/lib/toaster/toastermain/settings.py b/bitbake/lib/toaster/toastermain/settings.py
index a4b370c8d4c..609c85d9d8a 100644
--- a/bitbake/lib/toaster/toastermain/settings.py
+++ b/bitbake/lib/toaster/toastermain/settings.py
@@ -39,6 +39,9 @@ DATABASES = {
     }
 }
 
+# New in Django 3.2
+DEFAULT_AUTO_FIELD = 'django.db.models.BigAutoField'
+
 # Needed when Using sqlite especially to add a longer timeout for waiting
 # for the database lock to be  released
 # https://docs.djangoproject.com/en/1.6/ref/databases/#database-is-locked-errors
-- 
2.30.2



^ permalink raw reply related	[flat|nested] 8+ messages in thread

* [PATCH 5/7] toaster: migratation for models.BigAutoField
  2022-03-12 20:31 [PATCH 0/7] Upgrade to Django 3.2 LTS Tim Orling
                   ` (3 preceding siblings ...)
  2022-03-12 20:31 ` [PATCH 4/7] toaster: set DEFAULT_AUTO_FIELD Tim Orling
@ 2022-03-12 20:31 ` Tim Orling
  2022-03-12 20:31 ` [PATCH 6/7] bitbake: buildinfohelper.py fix for Django 3.2 Tim Orling
  2022-03-12 20:31 ` [PATCH 7/7] toaster: drop landing_not_managed template Tim Orling
  6 siblings, 0 replies; 8+ messages in thread
From: Tim Orling @ 2022-03-12 20:31 UTC (permalink / raw)
  To: toaster; +Cc: David.Reyna

Follow the default guidelines from Django 3.2 setting DEFAULT_AUTO_FIELD
to django.db.models.BigAutoField which leads to these migrations.

Signed-off-by: Tim Orling <tim.orling@konsulko.com>
---
 .../migrations/0008_models_bigautofield.py    |  48 +++++
 .../migrations/0020_models_bigautofield.py    | 173 ++++++++++++++++++
 2 files changed, 221 insertions(+)
 create mode 100644 bitbake/lib/toaster/bldcontrol/migrations/0008_models_bigautofield.py
 create mode 100644 bitbake/lib/toaster/orm/migrations/0020_models_bigautofield.py

diff --git a/bitbake/lib/toaster/bldcontrol/migrations/0008_models_bigautofield.py b/bitbake/lib/toaster/bldcontrol/migrations/0008_models_bigautofield.py
new file mode 100644
index 00000000000..45b477d02c9
--- /dev/null
+++ b/bitbake/lib/toaster/bldcontrol/migrations/0008_models_bigautofield.py
@@ -0,0 +1,48 @@
+# Generated by Django 3.2.12 on 2022-03-06 03:28
+
+from django.db import migrations, models
+
+
+class Migration(migrations.Migration):
+
+    dependencies = [
+        ('bldcontrol', '0007_brlayers_optional_gitinfo'),
+    ]
+
+    operations = [
+        migrations.AlterField(
+            model_name='brbitbake',
+            name='id',
+            field=models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID'),
+        ),
+        migrations.AlterField(
+            model_name='brerror',
+            name='id',
+            field=models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID'),
+        ),
+        migrations.AlterField(
+            model_name='brlayer',
+            name='id',
+            field=models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID'),
+        ),
+        migrations.AlterField(
+            model_name='brtarget',
+            name='id',
+            field=models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID'),
+        ),
+        migrations.AlterField(
+            model_name='brvariable',
+            name='id',
+            field=models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID'),
+        ),
+        migrations.AlterField(
+            model_name='buildenvironment',
+            name='id',
+            field=models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID'),
+        ),
+        migrations.AlterField(
+            model_name='buildrequest',
+            name='id',
+            field=models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID'),
+        ),
+    ]
diff --git a/bitbake/lib/toaster/orm/migrations/0020_models_bigautofield.py b/bitbake/lib/toaster/orm/migrations/0020_models_bigautofield.py
new file mode 100644
index 00000000000..f19b5dddbc4
--- /dev/null
+++ b/bitbake/lib/toaster/orm/migrations/0020_models_bigautofield.py
@@ -0,0 +1,173 @@
+# Generated by Django 3.2.12 on 2022-03-06 03:28
+
+from django.db import migrations, models
+
+
+class Migration(migrations.Migration):
+
+    dependencies = [
+        ('orm', '0019_django_2_2'),
+    ]
+
+    operations = [
+        migrations.AlterField(
+            model_name='bitbakeversion',
+            name='id',
+            field=models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID'),
+        ),
+        migrations.AlterField(
+            model_name='build',
+            name='id',
+            field=models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID'),
+        ),
+        migrations.AlterField(
+            model_name='distro',
+            name='id',
+            field=models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID'),
+        ),
+        migrations.AlterField(
+            model_name='helptext',
+            name='id',
+            field=models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID'),
+        ),
+        migrations.AlterField(
+            model_name='layer',
+            name='id',
+            field=models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID'),
+        ),
+        migrations.AlterField(
+            model_name='layer_version',
+            name='id',
+            field=models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID'),
+        ),
+        migrations.AlterField(
+            model_name='layerversiondependency',
+            name='id',
+            field=models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID'),
+        ),
+        migrations.AlterField(
+            model_name='logmessage',
+            name='id',
+            field=models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID'),
+        ),
+        migrations.AlterField(
+            model_name='machine',
+            name='id',
+            field=models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID'),
+        ),
+        migrations.AlterField(
+            model_name='package',
+            name='id',
+            field=models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID'),
+        ),
+        migrations.AlterField(
+            model_name='package_dependency',
+            name='id',
+            field=models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID'),
+        ),
+        migrations.AlterField(
+            model_name='package_file',
+            name='id',
+            field=models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID'),
+        ),
+        migrations.AlterField(
+            model_name='project',
+            name='id',
+            field=models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID'),
+        ),
+        migrations.AlterField(
+            model_name='projectlayer',
+            name='id',
+            field=models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID'),
+        ),
+        migrations.AlterField(
+            model_name='projecttarget',
+            name='id',
+            field=models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID'),
+        ),
+        migrations.AlterField(
+            model_name='projectvariable',
+            name='id',
+            field=models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID'),
+        ),
+        migrations.AlterField(
+            model_name='provides',
+            name='id',
+            field=models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID'),
+        ),
+        migrations.AlterField(
+            model_name='recipe',
+            name='id',
+            field=models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID'),
+        ),
+        migrations.AlterField(
+            model_name='recipe_dependency',
+            name='id',
+            field=models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID'),
+        ),
+        migrations.AlterField(
+            model_name='release',
+            name='id',
+            field=models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID'),
+        ),
+        migrations.AlterField(
+            model_name='releasedefaultlayer',
+            name='id',
+            field=models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID'),
+        ),
+        migrations.AlterField(
+            model_name='target',
+            name='id',
+            field=models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID'),
+        ),
+        migrations.AlterField(
+            model_name='target_file',
+            name='id',
+            field=models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID'),
+        ),
+        migrations.AlterField(
+            model_name='target_image_file',
+            name='id',
+            field=models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID'),
+        ),
+        migrations.AlterField(
+            model_name='target_installed_package',
+            name='id',
+            field=models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID'),
+        ),
+        migrations.AlterField(
+            model_name='targetkernelfile',
+            name='id',
+            field=models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID'),
+        ),
+        migrations.AlterField(
+            model_name='targetsdkfile',
+            name='id',
+            field=models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID'),
+        ),
+        migrations.AlterField(
+            model_name='task',
+            name='id',
+            field=models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID'),
+        ),
+        migrations.AlterField(
+            model_name='task_dependency',
+            name='id',
+            field=models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID'),
+        ),
+        migrations.AlterField(
+            model_name='toastersetting',
+            name='id',
+            field=models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID'),
+        ),
+        migrations.AlterField(
+            model_name='variable',
+            name='id',
+            field=models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID'),
+        ),
+        migrations.AlterField(
+            model_name='variablehistory',
+            name='id',
+            field=models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID'),
+        ),
+    ]
-- 
2.30.2



^ permalink raw reply related	[flat|nested] 8+ messages in thread

* [PATCH 6/7] bitbake: buildinfohelper.py fix for Django 3.2
  2022-03-12 20:31 [PATCH 0/7] Upgrade to Django 3.2 LTS Tim Orling
                   ` (4 preceding siblings ...)
  2022-03-12 20:31 ` [PATCH 5/7] toaster: migratation for models.BigAutoField Tim Orling
@ 2022-03-12 20:31 ` Tim Orling
  2022-03-12 20:31 ` [PATCH 7/7] toaster: drop landing_not_managed template Tim Orling
  6 siblings, 0 replies; 8+ messages in thread
From: Tim Orling @ 2022-03-12 20:31 UTC (permalink / raw)
  To: toaster; +Cc: David.Reyna

connection.features.autocommits_when_autocommit_is_off
was deprecated in 3.0 and is no longer present in 3.2

Signed-off-by: Tim Orling <tim.orling@konsulko.com>
---
 bitbake/lib/bb/ui/buildinfohelper.py | 16 +++++-----------
 1 file changed, 5 insertions(+), 11 deletions(-)

diff --git a/bitbake/lib/bb/ui/buildinfohelper.py b/bitbake/lib/bb/ui/buildinfohelper.py
index 835e92c2992..8fef6634691 100644
--- a/bitbake/lib/bb/ui/buildinfohelper.py
+++ b/bitbake/lib/bb/ui/buildinfohelper.py
@@ -893,9 +893,6 @@ class BuildInfoHelper(object):
         self.task_order = 0
         self.autocommit_step = 1
         self.server = server
-        # we use manual transactions if the database doesn't autocommit on us
-        if not connection.features.autocommits_when_autocommit_is_off:
-            transaction.set_autocommit(False)
         self.orm_wrapper = ORMWrapper()
         self.has_build_history = has_build_history
         self.tmp_dir = self.server.runCommand(["getVariable", "TMPDIR"])[0]
@@ -1313,12 +1310,11 @@ class BuildInfoHelper(object):
                 task_information['outcome'] = Task.OUTCOME_FAILED
                 del self.internal_state['taskdata'][identifier]
 
-        if not connection.features.autocommits_when_autocommit_is_off:
-            # we force a sync point here, to get the progress bar to show
-            if self.autocommit_step % 3 == 0:
-                transaction.set_autocommit(True)
-                transaction.set_autocommit(False)
-            self.autocommit_step += 1
+        # we force a sync point here, to get the progress bar to show
+        if self.autocommit_step % 3 == 0:
+            transaction.set_autocommit(True)
+            transaction.set_autocommit(False)
+        self.autocommit_step += 1
 
         self.orm_wrapper.get_update_task_object(task_information, True) # must exist
 
@@ -1990,8 +1986,6 @@ class BuildInfoHelper(object):
             # Do not skip command line build events
             self.store_log_event(tempevent,False)
 
-        if not connection.features.autocommits_when_autocommit_is_off:
-            transaction.set_autocommit(True)
 
         # unset the brbe; this is to prevent subsequent command-line builds
         # being incorrectly attached to the previous Toaster-triggered build;
-- 
2.30.2



^ permalink raw reply related	[flat|nested] 8+ messages in thread

* [PATCH 7/7] toaster: drop landing_not_managed template
  2022-03-12 20:31 [PATCH 0/7] Upgrade to Django 3.2 LTS Tim Orling
                   ` (5 preceding siblings ...)
  2022-03-12 20:31 ` [PATCH 6/7] bitbake: buildinfohelper.py fix for Django 3.2 Tim Orling
@ 2022-03-12 20:31 ` Tim Orling
  6 siblings, 0 replies; 8+ messages in thread
From: Tim Orling @ 2022-03-12 20:31 UTC (permalink / raw)
  To: toaster; +Cc: David.Reyna

This template is not referenced anywhere and therefore not used.
It also refers to the obsolete "build mode" in the old docs.

Signed-off-by: Tim Orling <tim.orling@konsulko.com>
---
 .../templates/landing_not_managed.html        | 34 -------------------
 1 file changed, 34 deletions(-)
 delete mode 100644 bitbake/lib/toaster/toastergui/templates/landing_not_managed.html

diff --git a/bitbake/lib/toaster/toastergui/templates/landing_not_managed.html b/bitbake/lib/toaster/toastergui/templates/landing_not_managed.html
deleted file mode 100644
index e7200b84121..00000000000
--- a/bitbake/lib/toaster/toastergui/templates/landing_not_managed.html
+++ /dev/null
@@ -1,34 +0,0 @@
-{% extends "base.html" %}
-
-{% load static %}
-{% load projecttags %}
-{% load humanize %}
-
-{% block title %} Welcome to Toaster {% endblock %}
-
-{% block pagecontent %}
-
-  <div class="container">
-   <div class="row">
-    <!-- Empty - no build module -->
-    <div class="page-header top-air">
-     <h1>
-       This page only works with Toaster in 'Build' mode
-     </h1>
-    </div>
-    <div class="alert alert-info lead">
-     <p">
-     The 'Build' mode allows you to configure and run your Yocto Project builds from Toaster.
-     <ul>
-       <li><a href="https://www.yoctoproject.org/docs/latest/toaster-manual/toaster-manual.html#intro-modes">
-       Read about the 'Build' mode
-       </a></li>
-       <li><a href="/">
-       View your builds
-       </a></li>
-     </ul>
-     </p>
-    </div>
-   </div>
-
-{% endblock %}
-- 
2.30.2



^ permalink raw reply related	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2022-03-12 20:31 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-03-12 20:31 [PATCH 0/7] Upgrade to Django 3.2 LTS Tim Orling
2022-03-12 20:31 ` [PATCH 1/7] toaster-requirements.txt: " Tim Orling
2022-03-12 20:31 ` [PATCH 2/7] toaster: Update docs links in templates Tim Orling
2022-03-12 20:31 ` [PATCH 3/7] toaster: orm/models -- drop django.utils.six Tim Orling
2022-03-12 20:31 ` [PATCH 4/7] toaster: set DEFAULT_AUTO_FIELD Tim Orling
2022-03-12 20:31 ` [PATCH 5/7] toaster: migratation for models.BigAutoField Tim Orling
2022-03-12 20:31 ` [PATCH 6/7] bitbake: buildinfohelper.py fix for Django 3.2 Tim Orling
2022-03-12 20:31 ` [PATCH 7/7] toaster: drop landing_not_managed template Tim Orling

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).