* [PATCH 0/1] cache: Remove invalid symlink for bb_cache.dat
@ 2024-06-24 0:03 liezhi.yang
2024-06-24 0:03 ` [PATCH 1/1] " liezhi.yang
0 siblings, 1 reply; 2+ messages in thread
From: liezhi.yang @ 2024-06-24 0:03 UTC (permalink / raw)
To: bitbake-devel
From: Robert Yang <liezhi.yang@windriver.com>
The following changes since commit 5d88faa0f35f0205c1475893d8589d1e6533dcc0:
bitbake: siggen: catch FileNotFoundError everywhere and ConnectionError also in get_unihashes (2024-06-18 08:45:22 +0100)
are available in the Git repository at:
https://github.com/robertlinux/yocto rbt/bb_cache
https://github.com/robertlinux/yocto/tree/rbt/bb_cache
Robert Yang (1):
cache: Remove invalid symlink for bb_cache.dat
bitbake/lib/bb/cache.py | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
--
2.45.1
^ permalink raw reply [flat|nested] 2+ messages in thread
* [PATCH 1/1] cache: Remove invalid symlink for bb_cache.dat
2024-06-24 0:03 [PATCH 0/1] cache: Remove invalid symlink for bb_cache.dat liezhi.yang
@ 2024-06-24 0:03 ` liezhi.yang
0 siblings, 0 replies; 2+ messages in thread
From: liezhi.yang @ 2024-06-24 0:03 UTC (permalink / raw)
To: bitbake-devel
From: Robert Yang <liezhi.yang@windriver.com>
The bb_cache.dat might be an invalid symlink when error happens, then
os.path.exists(symlink) would return False for it, the invalid symlink
wouldn't be removed and os.symlink can't update it any more.
Use os.path.islink(symlink) can fix the problem.
Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
---
bitbake/lib/bb/cache.py | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/bitbake/lib/bb/cache.py b/bitbake/lib/bb/cache.py
index 18d5574a31..4a96f5b313 100644
--- a/bitbake/lib/bb/cache.py
+++ b/bitbake/lib/bb/cache.py
@@ -441,7 +441,7 @@ class Cache(object):
else:
symlink = os.path.join(self.cachedir, "bb_cache.dat")
- if os.path.exists(symlink):
+ if os.path.exists(symlink) or os.path.islink(symlink):
bb.utils.remove(symlink)
try:
os.symlink(os.path.basename(self.cachefile), symlink)
--
2.45.1
^ permalink raw reply related [flat|nested] 2+ messages in thread
end of thread, other threads:[~2024-06-24 0:03 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-06-24 0:03 [PATCH 0/1] cache: Remove invalid symlink for bb_cache.dat liezhi.yang
2024-06-24 0:03 ` [PATCH 1/1] " liezhi.yang
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.