Openembedded Core Discussions
 help / color / mirror / Atom feed
* [PATCH v3 0/5] devtool: fix standalone clone conversion for nested git repos
@ 2026-07-23  8:11 Jamin Lin
  2026-07-23  8:11 ` [PATCH v3 1/5] devtool: Detect nested git repos before the initial workspace commit Jamin Lin
                   ` (4 more replies)
  0 siblings, 5 replies; 6+ messages in thread
From: Jamin Lin @ 2026-07-23  8:11 UTC (permalink / raw)
  To: openembedded-core@lists.openembedded.org, alex.kanavin@gmail.com,
	paul@pbarker.dev
  Cc: Troy Lee, Jamin Lin

When a recipe has multiple git SRC_URI entries with destsuffix values
nested inside S, devtool modify left all but the top-level repo with a
.git/objects/info/alternates file pointing into the downloads cache.

Running 'bitbake -c cleanall' then removed those shared objects, breaking
all subsequent git operations in the workspace.
Fix git_convert_standalone_clone() to walk all git repos nested inside S
and repack each one to a fully standalone clone.

v1:
  - Fix git_convert_standalone_clone() to walk all git repos nested
    inside S and repack each one to a standalone clone
v2:
  - Add selftest recipe devtool-test-multi-destsuffix with six nested
    git SRC_URI entries to reproduce the scenario
  - Add test_devtool_modify_multi_git_destsuffix_standalone to verify
    all nested repos have their alternates removed after devtool modify
    and remain usable after 'bitbake -c cleanall'
v3:
  - Read SRC_URI directly instead of walking the tree for '.git' dirs -
    also fixes repos nested inside another repo's own working tree
  - Fix setup_git_repo() to register nested repos as submodules before
    the initial commit (was dead code), processing bottom-up to avoid
    stale submodule references
  - Fix commitIgnored() to skip committing when nothing is staged, so
    do_patch no longer fails on a submodule that's dirty only because
    of its own nested content
  - Simplify test recipe to three genuinely-nested destsuffix entries
    (level1/level1/level2/level1/level2/level3), update selftest to match

Jamin Lin (5):
  devtool: Detect nested git repos before the initial workspace commit
  oe/patch: Skip commitIgnored when nothing is actually staged
  devtool-source: Convert nested git SRC_URI destsuffix repos to
    standalone clones
  meta-selftest: Add devtool-test-multi-destsuffix recipe
  oeqa/selftest/devtool: Add test for multiple nested git destsuffix
    repos

 .../devtool-test-multi-destsuffix_git.bb      | 27 ++++++++
 meta/classes/devtool-source.bbclass           | 16 +++++
 meta/lib/oe/patch.py                          | 12 ++++
 meta/lib/oeqa/selftest/cases/devtool.py       | 64 +++++++++++++++++++
 scripts/lib/devtool/__init__.py               | 64 ++++++++++++-------
 5 files changed, 160 insertions(+), 23 deletions(-)
 create mode 100644 meta-selftest/recipes-test/devtool/devtool-test-multi-destsuffix_git.bb

-- 
2.43.0


^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2026-07-23  8:11 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-07-23  8:11 [PATCH v3 0/5] devtool: fix standalone clone conversion for nested git repos Jamin Lin
2026-07-23  8:11 ` [PATCH v3 1/5] devtool: Detect nested git repos before the initial workspace commit Jamin Lin
2026-07-23  8:11 ` [PATCH v3 2/5] oe/patch: Skip commitIgnored when nothing is actually staged Jamin Lin
2026-07-23  8:11 ` [PATCH v3 3/5] devtool-source: Convert nested git SRC_URI destsuffix repos to standalone clones Jamin Lin
2026-07-23  8:11 ` [PATCH v3 4/5] meta-selftest: Add devtool-test-multi-destsuffix recipe Jamin Lin
2026-07-23  8:11 ` [PATCH v3 5/5] oeqa/selftest/devtool: Add test for multiple nested git destsuffix repos Jamin Lin

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox