diff mbox series

[wrynose,23/28] sstate: Update mtime/atime for sig/siginfo files in sstate_checkhashes()

Message ID 53a663be633c5bf4d1aeb5924705131068d7ae82.1790494949.git.yoann.congal@smile.fr
State New
Headers show
Series [wrynose,01/28] go: upgrade 1.26.7 -> 1.26.8 | expand

Commit Message

Yoann Congal Sept. 27, 2026, 7:43 a.m. UTC
From: Richard Purdie <richard.purdie@linuxfoundation.org>

If we touch sstatefile, we should also touch any .sig/.siginfo file if we can.
We try and keep them both updated with accesses so one isn't removed without
the other and they stay consistent.

[YOCTO #15289]

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
(cherry picked from commit cc07895f951140dbbffcf32d3eabf65788cc4d00)
Signed-off-by: Yoann Congal <yoann.congal@smile.fr>
---
 meta/classes-global/sstate.bbclass | 3 +++
 1 file changed, 3 insertions(+)
diff mbox series

Patch

diff --git a/meta/classes-global/sstate.bbclass b/meta/classes-global/sstate.bbclass
index 4ac63823351..5beeded1e88 100644
--- a/meta/classes-global/sstate.bbclass
+++ b/meta/classes-global/sstate.bbclass
@@ -977,6 +977,9 @@  def sstate_checkhashes(sq_data, d, siginfo=False, currentcount=0, summary=True,
 
         if os.path.exists(sstatefile):
             oe.utils.touch(sstatefile)
+            for ext in ['.sig', '.siginfo']:
+                if os.path.exists(sstatefile + ext):
+                    oe.utils.touch(sstatefile + ext)
             found.add(tid)
             bb.debug(2, "SState: Found valid sstate file %s" % sstatefile)
         else: