git » autoupdaters.git » commit 6b1e5ff

support for more permanent success/fail log

author Urja (ARMLFS builder)
2025-09-21 11:40:16 UTC
committer Urja (ARMLFS builder)
2025-09-21 11:40:16 UTC
parent f5b26b4f7f3db18e5aa558a29b648cfe5c8c2281

support for more permanent success/fail log

(this inspired by the reboots for firefox builds wiping
out the tmpfs that the other notification flags live...)

autoupdater_helpers/__init__.py +8 -0

diff --git a/autoupdater_helpers/__init__.py b/autoupdater_helpers/__init__.py
index 7c943a3..38637a3 100644
--- a/autoupdater_helpers/__init__.py
+++ b/autoupdater_helpers/__init__.py
@@ -32,6 +32,12 @@ def ssl_ctx():
     ctx = ssl.create_default_context(cafile=cabundle)
     return ctx
 
+def _log(desc):
+    with open("/sources/autoupdaters/results.log", "a") as f:
+        f.seek(0,2)
+        f.write(desc + "\n")
+
+
 def mpkg(pkg, ver=None):
     statepath = "/tmp/armlfs-evt"
     activepath = statepath + "/active"
@@ -53,8 +59,10 @@ def mpkg(pkg, ver=None):
         chdir(prev_path)
         makedirs(donepath, exist_ok=True)
         rename(fpath, join(donepath,fn))
+        _log(desc + " DONE")
     except CalledProcessError:
         chdir(prev_path)
         makedirs(failpath, exist_ok=True)
         rename(fpath, join(failpath,fn))
+        _log(desc + " FAIL")
         raise