summaryrefslogtreecommitdiffstats
path: root/meta
diff options
context:
space:
mode:
authorRichard Purdie <richard.purdie@linuxfoundation.org>2017-01-27 16:50:57 +0000
committerRichard Purdie <richard.purdie@linuxfoundation.org>2017-01-28 23:32:16 +0000
commita90c8817a5cc9adae2fd1cf2d05b4cf5866dae7b (patch)
treec2d25bc9e307b0d9f47e24fd14c616aff8fe8d3a /meta
parentab0f46400c113c0d893be872727a67739d5e794d (diff)
downloadpoky-a90c8817a5cc9adae2fd1cf2d05b4cf5866dae7b.tar.gz
sstate: Allow sstate_clean_manifest to take a prefix
Manifest files containing the same duplicated prefix are wasteful on space and ultimately this costs build time. Add support for manifest files with common prefixes removed and use the prefix if the path isn't absolute. (From OE-Core rev: 71e8c98238d627f9665faee9d7c226b9c07bd256) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta')
-rw-r--r--meta/classes/sstate.bbclass4
1 files changed, 3 insertions, 1 deletions
diff --git a/meta/classes/sstate.bbclass b/meta/classes/sstate.bbclass
index 0fdeb9dfe8..31789da50a 100644
--- a/meta/classes/sstate.bbclass
+++ b/meta/classes/sstate.bbclass
@@ -426,7 +426,7 @@ def sstate_clean_cachefiles(d):
426 ss = sstate_state_fromvars(ld, task) 426 ss = sstate_state_fromvars(ld, task)
427 sstate_clean_cachefile(ss, ld) 427 sstate_clean_cachefile(ss, ld)
428 428
429def sstate_clean_manifest(manifest, d): 429def sstate_clean_manifest(manifest, d, prefix=None):
430 import oe.path 430 import oe.path
431 431
432 mfile = open(manifest) 432 mfile = open(manifest)
@@ -435,6 +435,8 @@ def sstate_clean_manifest(manifest, d):
435 435
436 for entry in entries: 436 for entry in entries:
437 entry = entry.strip() 437 entry = entry.strip()
438 if prefix and not entry.startswith("/"):
439 entry = prefix + "/" + entry
438 bb.debug(2, "Removing manifest: %s" % entry) 440 bb.debug(2, "Removing manifest: %s" % entry)
439 # We can race against another package populating directories as we're removing them 441 # We can race against another package populating directories as we're removing them
440 # so we ignore errors here. 442 # so we ignore errors here.