diff options
author | Richard Purdie <richard.purdie@linuxfoundation.org> | 2017-01-27 16:50:57 +0000 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2017-01-28 23:31:17 +0000 |
commit | 71e8c98238d627f9665faee9d7c226b9c07bd256 (patch) | |
tree | 1ead5d81b13f6fd8abc7c32dd032aec6a4699bf0 | |
parent | 39865fdf3698a130f792d41853f9c9ca1901e335 (diff) | |
download | openembedded-core-71e8c98238d627f9665faee9d7c226b9c07bd256.tar.gz openembedded-core-71e8c98238d627f9665faee9d7c226b9c07bd256.tar.bz2 openembedded-core-71e8c98238d627f9665faee9d7c226b9c07bd256.zip |
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.
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
-rw-r--r-- | meta/classes/sstate.bbclass | 4 |
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): ss = sstate_state_fromvars(ld, task) sstate_clean_cachefile(ss, ld) -def sstate_clean_manifest(manifest, d): +def sstate_clean_manifest(manifest, d, prefix=None): import oe.path mfile = open(manifest) @@ -435,6 +435,8 @@ def sstate_clean_manifest(manifest, d): for entry in entries: entry = entry.strip() + if prefix and not entry.startswith("/"): + entry = prefix + "/" + entry bb.debug(2, "Removing manifest: %s" % entry) # We can race against another package populating directories as we're removing them # so we ignore errors here. |