[oe-commits] [bitbake] branch master-next updated: cache: Create a symlink for current cachefile
git at git.openembedded.org
git at git.openembedded.org
Thu Jul 18 13:02:48 UTC 2019
This is an automated email from the git hooks/post-receive script.
rpurdie pushed a commit to branch master-next
in repository bitbake.
The following commit(s) were added to refs/heads/master-next by this push:
new cf286df cache: Create a symlink for current cachefile
cf286df is described below
commit cf286dff653eed542bf347ca46234c224944d5b0
Author: Robert Yang <liezhi.yang at windriver.com>
AuthorDate: Thu Jul 4 12:12:37 2019 +0800
cache: Create a symlink for current cachefile
So that people or other tools can easily know which one is being used, just
like what we did for run.do_task and log.do_task, otherwise, we have no way
to know it. I usually use "ls -t", but it isn't reliable since the one which
is being used may not the latest one.
Signed-off-by: Robert Yang <liezhi.yang at windriver.com>
Signed-off-by: Richard Purdie <richard.purdie at linuxfoundation.org>
---
lib/bb/cache.py | 9 +++++++++
1 file changed, 9 insertions(+)
diff --git a/lib/bb/cache.py b/lib/bb/cache.py
index bec8ef7..ab18dd5 100644
--- a/lib/bb/cache.py
+++ b/lib/bb/cache.py
@@ -396,6 +396,15 @@ class Cache(NoCache):
else:
logger.debug(1, "Cache file %s not found, building..." % self.cachefile)
+ # We don't use the symlink, its just for debugging convinience
+ symlink = os.path.join(self.cachedir, "bb_cache.dat")
+ if os.path.exists(symlink):
+ bb.utils.remove(symlink)
+ try:
+ os.symlink(os.path.basename(self.cachefile), symlink)
+ except OSError:
+ pass
+
def load_cachefile(self):
cachesize = 0
previous_progress = 0
--
To stop receiving notification emails like this one, please contact
the administrator of this repository.
More information about the Openembedded-commits
mailing list