diff mbox series

[yocto-autobuilder2,05/10] docker: refresh patches

Message ID 20251007-contrib-mathieu-bb-setup-links-v1-5-bb1d79289c3f@bootlin.com
State New
Headers show
Series Fix links with bitbake setup and general improvements | expand

Commit Message

Mathieu Dubois-Briand Oct. 7, 2025, 2:37 p.m. UTC
Signed-off-by: Mathieu Dubois-Briand <mathieu.dubois-briand@bootlin.com>
---
 ...001-builders-Do-not-create-tags-during-builds.patch |  8 ++++----
 ...ers-Modify-free-space-check-to-work-in-docker.patch | 18 +++++++++---------
 2 files changed, 13 insertions(+), 13 deletions(-)
diff mbox series

Patch

diff --git a/docker/yocto-autobuilder2_patches/0001-builders-Do-not-create-tags-during-builds.patch b/docker/yocto-autobuilder2_patches/0001-builders-Do-not-create-tags-during-builds.patch
index 65b428caa1fc086a88f6b1326de25d2b00843582..8e772c8fa7b1b2cdd59af58f5f87b1332d5fb602 100644
--- a/docker/yocto-autobuilder2_patches/0001-builders-Do-not-create-tags-during-builds.patch
+++ b/docker/yocto-autobuilder2_patches/0001-builders-Do-not-create-tags-during-builds.patch
@@ -1,4 +1,4 @@ 
-From 12db34cf42ca695bd34594853013e54464a809f5 Mon Sep 17 00:00:00 2001
+From baef5f6c4c2cf973385392d1e163f8bec2f6cca2 Mon Sep 17 00:00:00 2001
 From: Mathieu Dubois-Briand <mathieu.dubois-briand@bootlin.com>
 Date: Fri, 3 Jan 2025 09:39:06 +0100
 Subject: [PATCH 1/2] builders: Do not create tags during builds
@@ -9,10 +9,10 @@  Signed-off-by: Mathieu Dubois-Briand <mathieu.dubois-briand@bootlin.com>
  1 file changed, 1 deletion(-)
 
 diff --git a/builders.py b/builders.py
-index b4c08fa1f29c..4e10bdceedb2 100644
+index 15985f258bb9..a16a857d9211 100644
 --- a/builders.py
 +++ b/builders.py
-@@ -284,7 +284,6 @@ def create_parent_builder_factory(buildername, waitname):
+@@ -307,7 +307,6 @@ def create_parent_builder_factory(buildername, waitname):
              util.Interpolate("%(prop:builddir)s/layerinfo.json"),
              util.Interpolate("{}/%(prop:buildername)s-%(prop:buildnumber)s".format(config.sharedrepodir)),
              "-p", get_publish_dest,
@@ -21,5 +21,5 @@  index b4c08fa1f29c..4e10bdceedb2 100644
          haltOnFailure=True,
          name="Prepare shared repositories"))
 -- 
-2.39.5
+2.47.3
 
diff --git a/docker/yocto-autobuilder2_patches/0002-builders-Modify-free-space-check-to-work-in-docker.patch b/docker/yocto-autobuilder2_patches/0002-builders-Modify-free-space-check-to-work-in-docker.patch
index 6d3ec5539b97c0c45b18f73cf7d1fcf93fa39f32..8c0ad1c93cbefe0887c6618a67761c582ce0b99d 100644
--- a/docker/yocto-autobuilder2_patches/0002-builders-Modify-free-space-check-to-work-in-docker.patch
+++ b/docker/yocto-autobuilder2_patches/0002-builders-Modify-free-space-check-to-work-in-docker.patch
@@ -1,4 +1,4 @@ 
-From 9bf9680ab9125138d926c22ca434ad86053bb5c4 Mon Sep 17 00:00:00 2001
+From c6032ab33d39981eb9dede27d0bbd073a8d58389 Mon Sep 17 00:00:00 2001
 From: Mathieu Dubois-Briand <mathieu.dubois-briand@bootlin.com>
 Date: Wed, 20 Nov 2024 14:53:34 +0100
 Subject: [PATCH 2/2] builders: Modify free space check to work in docker
@@ -9,10 +9,10 @@  Signed-off-by: Mathieu Dubois-Briand <mathieu.dubois-briand@bootlin.com>
  1 file changed, 2 insertions(+), 3 deletions(-)
 
 diff --git a/builders.py b/builders.py
-index ba47241de2cc..02f6c10c6add 100644
+index a16a857d9211..d5389283e605 100644
 --- a/builders.py
 +++ b/builders.py
-@@ -67,8 +67,7 @@ def canStartBuild(builder, wfb, request):
+@@ -70,8 +70,7 @@ def canStartBuild(builder, wfb, request):
  
      # threshold is GB of space
      checks = {
@@ -22,15 +22,15 @@  index ba47241de2cc..02f6c10c6add 100644
      }
  
      for mountpoint in checks:
-@@ -76,7 +75,7 @@ def canStartBuild(builder, wfb, request):
+@@ -79,7 +78,7 @@ def canStartBuild(builder, wfb, request):
  
-         threshold = threshold * 1024 *1024 * 1024
+         bytes_in_gb = 1024 * 1024 * 1024
  
 -        cmd = yield shell("findmnt -T %s --df -n --bytes | awk '{print $5}'" % mountpoint, wfb.worker, builder)
 +        cmd = yield shell("findmnt --all -T %s --df -n --bytes | awk '{print $5}'" % mountpoint, wfb.worker, builder)
-         if int(cmd.stdout) < threshold:
-             log.msg("Detected {0} GB of space available on {1}, less than threshold of {2} GB. Can't start build".format(cmd.stdout, name, threshold))
-             wfb.worker.quarantine_timeout = 10 * 60
+         space = int(cmd.stdout.strip())
+         if space < threshold * bytes_in_gb:
+             log.msg("Detected {0} GB of space available on {1}, less than threshold of {2} GB. Can't start build".format(space / bytes_in_gb, name, threshold))
 -- 
-2.39.5
+2.47.3