Especially since LTS branches have become more popular as the
only active branch, we need to be able to turn off updates on
a LayerBranch basis rather than the current Layer or Branch
heavier hammers.

Signed-off-by: Tim Orling <[email protected]>
---
 .../0047_layerbranch_updates_enabled.py        | 18 ++++++++++++++++++
 layerindex/models.py                           |  2 +-
 2 files changed, 19 insertions(+), 1 deletion(-)
 create mode 100644 layerindex/migrations/0047_layerbranch_updates_enabled.py

diff --git a/layerindex/migrations/0047_layerbranch_updates_enabled.py 
b/layerindex/migrations/0047_layerbranch_updates_enabled.py
new file mode 100644
index 0000000..44e07ee
--- /dev/null
+++ b/layerindex/migrations/0047_layerbranch_updates_enabled.py
@@ -0,0 +1,18 @@
+# Generated by Django 4.2.6 on 2023-10-07 19:39
+
+from django.db import migrations, models
+
+
+class Migration(migrations.Migration):
+
+    dependencies = [
+        ('layerindex', '0046_alter_patch_status'),
+    ]
+
+    operations = [
+        migrations.AddField(
+            model_name='layerbranch',
+            name='updates_enabled',
+            field=models.BooleanField(default=True, help_text='Enable 
automatically updating layer metadata for this layer:branch via the update 
script', verbose_name='Enable updates'),
+        ),
+    ]
diff --git a/layerindex/models.py b/layerindex/models.py
index 5ae60c3..397425a 100644
--- a/layerindex/models.py
+++ b/layerindex/models.py
@@ -241,7 +241,7 @@ class LayerBranch(models.Model):
     actual_branch = models.CharField('Actual Branch', max_length=80, 
blank=True, help_text='Name of the actual branch in the repository matching the 
core branch')
     yp_compatible_version = models.ForeignKey(YPCompatibleVersion, 
verbose_name='Yocto Project Compatible version', null=True, blank=True, 
on_delete=models.SET_NULL, help_text='Which version of the Yocto Project 
Compatible program has this layer been approved for for?')
     local_path = models.CharField(max_length=255, blank=True, help_text='Local 
subdirectory where layer data can be found')
-
+    updates_enabled = models.BooleanField('Enable updates', default=True, 
help_text='Enable automatically updating layer metadata for this layer:branch 
via the update script')
     updated = models.DateTimeField(auto_now=True)
 
     class Meta:
-- 
2.34.1

-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#61356): https://lists.yoctoproject.org/g/yocto/message/61356
Mute This Topic: https://lists.yoctoproject.org/mt/102009661/21656
Group Owner: [email protected]
Unsubscribe: https://lists.yoctoproject.org/g/yocto/unsub 
[[email protected]]
-=-=-=-=-=-=-=-=-=-=-=-

Reply via email to