commit:     bff92d866e73a5a08ac29e8147d2aab59c59f535
Author:     Andreas K. Hüttel <dilfridge <AT> gentoo <DOT> org>
AuthorDate: Sat Oct  5 21:31:31 2024 +0000
Commit:     Andreas K. Hüttel <dilfridge <AT> gentoo <DOT> org>
CommitDate: Sat Oct  5 21:31:31 2024 +0000
URL:        https://gitweb.gentoo.org/proj/catalyst.git/commit/?id=bff92d86

Add diskimage-update action

Signed-off-by: Andreas K. Hüttel <dilfridge <AT> gentoo.org>

 catalyst/base/stagebase.py             | 11 +++++++++++
 targets/diskimage-stage2/controller.sh |  2 +-
 targets/support/diskimagefs-update.sh  |  5 +++++
 3 files changed, 17 insertions(+), 1 deletion(-)

diff --git a/catalyst/base/stagebase.py b/catalyst/base/stagebase.py
index 8a3d2af6..6fe462cc 100644
--- a/catalyst/base/stagebase.py
+++ b/catalyst/base/stagebase.py
@@ -1753,6 +1753,17 @@ class StageBase(TargetBase, ClearBase, GenBase):
             env=self.env)
         self.resume.enable("livecd_update")
 
+    def diskimage_update(self):
+        if "autoresume" in self.settings["options"] \
+                and self.resume.is_enabled("diskimage_update"):
+            log.notice(
+                'Resume point detected, skipping build_packages operation...')
+            return
+
+        cmd([self.settings['controller_file'], 'diskimage-update'],
+            env=self.env)
+        self.resume.enable("diskimage_update")
+
     @staticmethod
     def _debug_pause_():
         input("press any key to continue: ")

diff --git a/targets/diskimage-stage2/controller.sh 
b/targets/diskimage-stage2/controller.sh
index 6d8c93e2..6b2c1420 100755
--- a/targets/diskimage-stage2/controller.sh
+++ b/targets/diskimage-stage2/controller.sh
@@ -28,7 +28,7 @@ case $1 in
        preclean)
                ;;
 
-       livecd-update)
+       diskimage-update)
                # Now, finalize and tweak the livecd fs (inside of the chroot)
                exec_in_chroot ${clst_shdir}/support/livecdfs-update.sh
                ;;

diff --git a/targets/support/diskimagefs-update.sh 
b/targets/support/diskimagefs-update.sh
new file mode 100644
index 00000000..ae8daf78
--- /dev/null
+++ b/targets/support/diskimagefs-update.sh
@@ -0,0 +1,5 @@
+#!/bin/bash
+
+RUN_DEFAULT_FUNCS="no"
+
+source /tmp/chroot-functions.sh

Reply via email to