summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorManuel Leonhardt <mleonhardt@arri.de>2021-11-02 19:48:44 +0100
committerRichard Purdie <richard.purdie@linuxfoundation.org>2021-11-03 10:12:42 +0000
commit4c6efbf03530b6f60cde59cdef61aa14538753a3 (patch)
tree4b2ec72aac5f33bdda572288f78c78266a3725cb
parent851be8baed10f127f85c6c0edfd67a79a596d5f9 (diff)
downloadpoky-4c6efbf03530b6f60cde59cdef61aa14538753a3.tar.gz
sstate: Account for reserved characters when shortening sstate filenames
Previously, when shortening sstate filenames, the reserved characters for .siginfo were not considered, when siginfo=False, resulting in differently shortend filenames for the sstate and siginfo files. With this change, the filenames of the truncated sstate and siginfo files have the same basename, just as is already the case for untruncated filenames. Making sure that the .siginfo files always have the filename of the corresponding sstate file plus its .siginfo suffix, also when being truncated, makes it easier to manage the sstate cache and an sstate mirror outside of Bitbake/Yocto. (From OE-Core rev: c2e0e43b7123cf5149833e0072c8edaea3629112) Signed-off-by: Manuel Leonhardt <mleonhardt@arri.de> Cc: Richard Purdie <richard.purdie@linuxfoundation.org> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
-rw-r--r--meta/classes/sstate.bbclass2
1 files changed, 1 insertions, 1 deletions
diff --git a/meta/classes/sstate.bbclass b/meta/classes/sstate.bbclass
index 6e4eb09f8e..8182010047 100644
--- a/meta/classes/sstate.bbclass
+++ b/meta/classes/sstate.bbclass
@@ -22,7 +22,7 @@ def generate_sstatefn(spec, hash, taskname, siginfo, d):
22 components = spec.split(":") 22 components = spec.split(":")
23 # Fields 0,5,6 are mandatory, 1 is most useful, 2,3,4 are just for information 23 # Fields 0,5,6 are mandatory, 1 is most useful, 2,3,4 are just for information
24 # 7 is for the separators 24 # 7 is for the separators
25 avail = (254 - len(hash + "_" + taskname + extension) - len(components[0]) - len(components[1]) - len(components[5]) - len(components[6]) - 7) // 3 25 avail = (limit - len(hash + "_" + taskname + extension) - len(components[0]) - len(components[1]) - len(components[5]) - len(components[6]) - 7) // 3
26 components[2] = components[2][:avail] 26 components[2] = components[2][:avail]
27 components[3] = components[3][:avail] 27 components[3] = components[3][:avail]
28 components[4] = components[4][:avail] 28 components[4] = components[4][:avail]