From: Michael Siebold <michael.siebold@gmail.com>
To: Yoann Congal <yoann.congal@smile.fr>
Cc: bitbake-devel@lists.openembedded.org,
Robert Yang <liezhi.yang@windriver.com>,
Richard Purdie <richard.purdie@linuxfoundation.org>,
Michael Siebold <michael.siebold@gmail.com>
Subject: [PATCH 1/3] bitbake: gitsm: Add clean function
Date: Mon, 9 Mar 2026 14:21:23 -0700 [thread overview]
Message-ID: <20260309212125.3172717-2-michael.siebold@gmail.com> (raw)
In-Reply-To: <20260309212125.3172717-1-michael.siebold@gmail.com>
From: Robert Yang <liezhi.yang@windriver.com>
Fixed:
$ bitbake utfcpp -cfetch && bitbake utfcpp -ccleanall
The downloads/git2/github.com.nemtrif.ftest won't be cleaned without this fix.
(Bitbake rev: 79f25fc5c1b8d0e08540f4aa07875309f5325f47)
Upstream-Status: Backport [from commit 5bce38fbae]
Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
(cherry picked from commit 5bce38fbaea0a7d1228740e2cb313957c914cfdf)
Signed-off-by: Michael Siebold <michael.siebold@gmail.com>
---
bitbake/lib/bb/fetch2/gitsm.py | 13 +++++++++++++
1 file changed, 13 insertions(+)
diff --git a/bitbake/lib/bb/fetch2/gitsm.py b/bitbake/lib/bb/fetch2/gitsm.py
index fab4b1164c..ba62517f08 100644
--- a/bitbake/lib/bb/fetch2/gitsm.py
+++ b/bitbake/lib/bb/fetch2/gitsm.py
@@ -249,6 +249,19 @@ class GitSM(Git):
# should also be skipped as these files were already smudged in the fetch stage if lfs
# was enabled.
runfetchcmd("GIT_LFS_SKIP_SMUDGE=1 %s submodule update --recursive --no-fetch" % (ud.basecmd), d, quiet=True, workdir=ud.destdir)
+ def clean(self, ud, d):
+ def clean_submodule(ud, url, module, modpath, workdir, d):
+ url += ";bareclone=1;nobranch=1"
+ try:
+ newfetch = Fetch([url], d, cache=False)
+ newfetch.clean()
+ except Exception as e:
+ logger.warning('gitsm: submodule clean failed: %s %s' % (type(e).__name__, str(e)))
+
+ self.call_process_submodules(ud, d, True, clean_submodule)
+
+ # Clean top git dir
+ Git.clean(self, ud, d)
def implicit_urldata(self, ud, d):
import shutil, subprocess, tempfile
--
2.34.1
next prev parent reply other threads:[~2026-03-09 21:21 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-03-09 21:21 [scarthgap][PATCH 0/3] Fix git lfs submodule expansion Michael Siebold
2026-03-09 21:21 ` Michael Siebold [this message]
2026-03-09 21:21 ` [PATCH 2/3] bitbake: fetch2: Fix incorrect lfs parametrization for submodules Michael Siebold
2026-03-09 21:21 ` [PATCH 3/3] bitbake: fetch2: Fix LFS object checkout in submodules Michael Siebold
2026-03-09 21:32 ` Richard Purdie
2026-03-09 23:14 ` Michael Siebold
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=20260309212125.3172717-2-michael.siebold@gmail.com \
--to=michael.siebold@gmail.com \
--cc=bitbake-devel@lists.openembedded.org \
--cc=liezhi.yang@windriver.com \
--cc=richard.purdie@linuxfoundation.org \
--cc=yoann.congal@smile.fr \
/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.