Running 'devtool modify -n' on a kernel recipe that inherits
'kernel-yocto' can unintentionally corrupt an existing Git repo or
worktree.
The work-shared optimization introduced in 3c3a9bae ("devtool/standard.py:
Update devtool modify to copy source from work-shared if its already
downloaded") is not skipped when '--no-extract' ('args.no_extract') is set.
As a result, for kernel builds where STAGING_KERNEL_DIR was already
populated when running 'devtool modify -n', the existing source tree is
overwritten (via oe.path.copyhardlinktree()) with the contents of
STAGING_KERNEL_DIR.
Fix by adding 'and not args.no_extract' to the kernel-yocto guard
condition.
Signed-off-by: Enrico Jörns <[email protected]>
---
scripts/lib/devtool/standard.py | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/scripts/lib/devtool/standard.py b/scripts/lib/devtool/standard.py
index b706d9c7a1..42fb13872d 100644
--- a/scripts/lib/devtool/standard.py
+++ b/scripts/lib/devtool/standard.py
@@ -801,7 +801,8 @@ def modify(args, config, basepath, workspace):
commits = {}
check_commits = False
- if bb.data.inherits_class('kernel-yocto', rd):
+ if bb.data.inherits_class('kernel-yocto', rd) and not args.no_extract:
+
# Current set kernel version
kernelVersion = rd.getVar('LINUX_VERSION')
srcdir = rd.getVar('STAGING_KERNEL_DIR')
--
2.47.3
-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#233769):
https://lists.openembedded.org/g/openembedded-core/message/233769
Mute This Topic: https://lists.openembedded.org/mt/118475635/21656
Group Owner: [email protected]
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub
[[email protected]]
-=-=-=-=-=-=-=-=-=-=-=-