All of lore.kernel.org
 help / color / mirror / Atom feed
From: Richard Purdie <richard.purdie@linuxfoundation.org>
To: openembedded-core@lists.openembedded.org
Subject: [PATCH 4/7] sstate: Allow sstate_clean_manifest to take a prefix
Date: Fri, 27 Jan 2017 17:42:04 +0000	[thread overview]
Message-ID: <1485538927-5797-4-git-send-email-richard.purdie@linuxfoundation.org> (raw)
In-Reply-To: <1485538927-5797-1-git-send-email-richard.purdie@linuxfoundation.org>

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>
---
 meta/classes/sstate.bbclass | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/meta/classes/sstate.bbclass b/meta/classes/sstate.bbclass
index 0fdeb9d..31789da 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.
-- 
2.7.4



  parent reply	other threads:[~2017-01-27 17:42 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-01-27 17:42 [PATCH 1/7] image/kernelsrc/packagegroups/recipes: Remove uneeded noexec tasks Richard Purdie
2017-01-27 17:42 ` [PATCH 2/7] allarch: Drop STAGING_DIR_HOST expansion Richard Purdie
2017-01-27 17:42 ` [PATCH 3/7] gzip/pigz/expat/image: Simplify gzip-native/pigz-native Richard Purdie
2017-01-27 17:42 ` Richard Purdie [this message]
2017-01-27 17:42 ` [PATCH 5/7] staging: Drop common prefix WORKDIR from manifest files Richard Purdie
2017-01-27 17:42 ` [PATCH 6/7] staging: Allow removal of stale sysroot objects Richard Purdie
2017-01-27 17:42 ` [PATCH 7/7] libxml2: Drop docs in native case Richard Purdie

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1485538927-5797-4-git-send-email-richard.purdie@linuxfoundation.org \
    --to=richard.purdie@linuxfoundation.org \
    --cc=openembedded-core@lists.openembedded.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.