diff options
Diffstat (limited to 'meta')
-rw-r--r-- | meta/classes/buildhistory.bbclass | 3 | ||||
-rw-r--r-- | meta/lib/oe/sstatesig.py | 15 |
2 files changed, 15 insertions, 3 deletions
diff --git a/meta/classes/buildhistory.bbclass b/meta/classes/buildhistory.bbclass index 059de36a5d..55b12d7893 100644 --- a/meta/classes/buildhistory.bbclass +++ b/meta/classes/buildhistory.bbclass | |||
@@ -43,6 +43,7 @@ BUILDHISTORY_COMMIT ?= "1" | |||
43 | BUILDHISTORY_COMMIT_AUTHOR ?= "buildhistory <buildhistory@${DISTRO}>" | 43 | BUILDHISTORY_COMMIT_AUTHOR ?= "buildhistory <buildhistory@${DISTRO}>" |
44 | BUILDHISTORY_PUSH_REPO ?= "" | 44 | BUILDHISTORY_PUSH_REPO ?= "" |
45 | BUILDHISTORY_TAG ?= "build" | 45 | BUILDHISTORY_TAG ?= "build" |
46 | BUILDHISTORY_PATH_PREFIX_STRIP ?= "" | ||
46 | 47 | ||
47 | SSTATEPOSTINSTFUNCS_append = " buildhistory_emit_pkghistory" | 48 | SSTATEPOSTINSTFUNCS_append = " buildhistory_emit_pkghistory" |
48 | # We want to avoid influencing the signatures of sstate tasks - first the function itself: | 49 | # We want to avoid influencing the signatures of sstate tasks - first the function itself: |
@@ -697,7 +698,7 @@ python buildhistory_write_sigs() { | |||
697 | if hasattr(bb.parse.siggen, 'dump_siglist'): | 698 | if hasattr(bb.parse.siggen, 'dump_siglist'): |
698 | taskoutdir = os.path.join(d.getVar('BUILDHISTORY_DIR'), 'task') | 699 | taskoutdir = os.path.join(d.getVar('BUILDHISTORY_DIR'), 'task') |
699 | bb.utils.mkdirhier(taskoutdir) | 700 | bb.utils.mkdirhier(taskoutdir) |
700 | bb.parse.siggen.dump_siglist(os.path.join(taskoutdir, 'tasksigs.txt')) | 701 | bb.parse.siggen.dump_siglist(os.path.join(taskoutdir, 'tasksigs.txt'), d.getVar("BUILDHISTORY_PATH_PREFIX_STRIP")) |
701 | } | 702 | } |
702 | 703 | ||
703 | def buildhistory_get_build_id(d): | 704 | def buildhistory_get_build_id(d): |
diff --git a/meta/lib/oe/sstatesig.py b/meta/lib/oe/sstatesig.py index e86a09b332..47f3ca4efb 100644 --- a/meta/lib/oe/sstatesig.py +++ b/meta/lib/oe/sstatesig.py | |||
@@ -248,13 +248,24 @@ class SignatureGeneratorOEBasicHashMixIn(object): | |||
248 | f.write(' "\n') | 248 | f.write(' "\n') |
249 | f.write('SIGGEN_LOCKEDSIGS_TYPES_%s = "%s"' % (self.machine, " ".join(l))) | 249 | f.write('SIGGEN_LOCKEDSIGS_TYPES_%s = "%s"' % (self.machine, " ".join(l))) |
250 | 250 | ||
251 | def dump_siglist(self, sigfile): | 251 | def dump_siglist(self, sigfile, path_prefix_strip=None): |
252 | def strip_fn(fn): | ||
253 | nonlocal path_prefix_strip | ||
254 | if not path_prefix_strip: | ||
255 | return fn | ||
256 | |||
257 | fn_exp = fn.split(":") | ||
258 | if fn_exp[-1].startswith(path_prefix_strip): | ||
259 | fn_exp[-1] = fn_exp[-1][len(path_prefix_strip):] | ||
260 | |||
261 | return ":".join(fn_exp) | ||
262 | |||
252 | with open(sigfile, "w") as f: | 263 | with open(sigfile, "w") as f: |
253 | tasks = [] | 264 | tasks = [] |
254 | for taskitem in self.taskhash: | 265 | for taskitem in self.taskhash: |
255 | (fn, task) = taskitem.rsplit(":", 1) | 266 | (fn, task) = taskitem.rsplit(":", 1) |
256 | pn = self.lockedpnmap[fn] | 267 | pn = self.lockedpnmap[fn] |
257 | tasks.append((pn, task, fn, self.taskhash[taskitem])) | 268 | tasks.append((pn, task, strip_fn(fn), self.taskhash[taskitem])) |
258 | for (pn, task, fn, taskhash) in sorted(tasks): | 269 | for (pn, task, fn, taskhash) in sorted(tasks): |
259 | f.write('%s:%s %s %s\n' % (pn, task, fn, taskhash)) | 270 | f.write('%s:%s %s %s\n' % (pn, task, fn, taskhash)) |
260 | 271 | ||