* [PATCH] externalsrc: remove git submodule--helper list
@ 2022-09-15 23:06 Jacob Creedon
2022-09-16 8:08 ` [OE-core] " Quentin Schulz
2022-09-16 16:38 ` Richard Purdie
0 siblings, 2 replies; 4+ messages in thread
From: Jacob Creedon @ 2022-09-15 23:06 UTC (permalink / raw)
To: openembedded-core
This removes a call to an undocumented and now deprecated subcommand of
git submodule--helper and replaces it with a suppoorted one that gives an
equivalent list.
Signed-off-by: Jacob Creedon <jcreedon@google.com>
---
meta/classes/externalsrc.bbclass | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/meta/classes/externalsrc.bbclass b/meta/classes/externalsrc.bbclass
index 3d6b80bee2..0401c75fa9 100644
--- a/meta/classes/externalsrc.bbclass
+++ b/meta/classes/externalsrc.bbclass
@@ -217,7 +217,7 @@ def srctree_hash_files(d, srcdir=None):
env['GIT_INDEX_FILE'] = tmp_index.name
subprocess.check_output(['git', 'add', '-A', '.'],
cwd=s_dir, env=env)
git_sha1 = subprocess.check_output(['git', 'write-tree'],
cwd=s_dir, env=env).decode("utf-8")
- submodule_helper = subprocess.check_output(['git',
'submodule--helper', 'list'], cwd=s_dir, env=env).decode("utf-8")
+ submodule_helper = subprocess.check_output(['git',
'submodule', '--quiet', 'foreach', 'echo $sm_path'], cwd=s_dir,
env=env).decode("utf-8")
for line in submodule_helper.splitlines():
module_dir = os.path.join(s_dir, line.rsplit(maxsplit=1)[1])
if os.path.isdir(module_dir):
--
2.37.3
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [OE-core] [PATCH] externalsrc: remove git submodule--helper list
2022-09-15 23:06 [PATCH] externalsrc: remove git submodule--helper list Jacob Creedon
@ 2022-09-16 8:08 ` Quentin Schulz
2022-09-16 21:04 ` Jacob Creedon
2022-09-16 16:38 ` Richard Purdie
1 sibling, 1 reply; 4+ messages in thread
From: Quentin Schulz @ 2022-09-16 8:08 UTC (permalink / raw)
To: jcreedon, openembedded-core
Hi Jacob,
On 9/16/22 01:06, Jacob Creedon via lists.openembedded.org wrote:
> This removes a call to an undocumented and now deprecated subcommand of
> git submodule--helper and replaces it with a suppoorted one that gives an
> equivalent list.
>
> Signed-off-by: Jacob Creedon <jcreedon@google.com>
> ---
> meta/classes/externalsrc.bbclass | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/meta/classes/externalsrc.bbclass b/meta/classes/externalsrc.bbclass
> index 3d6b80bee2..0401c75fa9 100644
> --- a/meta/classes/externalsrc.bbclass
> +++ b/meta/classes/externalsrc.bbclass
> @@ -217,7 +217,7 @@ def srctree_hash_files(d, srcdir=None):
> env['GIT_INDEX_FILE'] = tmp_index.name
> subprocess.check_output(['git', 'add', '-A', '.'],
> cwd=s_dir, env=env)
> git_sha1 = subprocess.check_output(['git', 'write-tree'],
> cwd=s_dir, env=env).decode("utf-8")
> - submodule_helper = subprocess.check_output(['git',
> 'submodule--helper', 'list'], cwd=s_dir, env=env).decode("utf-8")
> + submodule_helper = subprocess.check_output(['git',
> 'submodule', '--quiet', 'foreach', 'echo $sm_path'], cwd=s_dir,
> env=env).decode("utf-8")
When was this added to git? We require version 1.8.3.1 or later right
now. We would need to bump the requirement (and need to make sure that
all supported distros actually have this git version available in their
package feed) and update the documentation accordingly
(https://git.yoctoproject.org/yocto-docs/tree/documentation/poky.yaml.in#n46)
if it's not supported in git 1.8.3.1.
Cheers,
Quentin
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [OE-core] [PATCH] externalsrc: remove git submodule--helper list
2022-09-15 23:06 [PATCH] externalsrc: remove git submodule--helper list Jacob Creedon
2022-09-16 8:08 ` [OE-core] " Quentin Schulz
@ 2022-09-16 16:38 ` Richard Purdie
1 sibling, 0 replies; 4+ messages in thread
From: Richard Purdie @ 2022-09-16 16:38 UTC (permalink / raw)
To: jcreedon, openembedded-core
On Thu, 2022-09-15 at 16:06 -0700, Jacob Creedon via lists.openembedded.org wrote:
> This removes a call to an undocumented and now deprecated subcommand of
> git submodule--helper and replaces it with a suppoorted one that gives an
> equivalent list.
>
> Signed-off-by: Jacob Creedon <jcreedon@google.com>
> ---
> meta/classes/externalsrc.bbclass | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/meta/classes/externalsrc.bbclass b/meta/classes/externalsrc.bbclass
> index 3d6b80bee2..0401c75fa9 100644
> --- a/meta/classes/externalsrc.bbclass
> +++ b/meta/classes/externalsrc.bbclass
> @@ -217,7 +217,7 @@ def srctree_hash_files(d, srcdir=None):
> env['GIT_INDEX_FILE'] = tmp_index.name
> subprocess.check_output(['git', 'add', '-A', '.'],
> cwd=s_dir, env=env)
> git_sha1 = subprocess.check_output(['git', 'write-tree'],
> cwd=s_dir, env=env).decode("utf-8")
> - submodule_helper = subprocess.check_output(['git',
> 'submodule--helper', 'list'], cwd=s_dir, env=env).decode("utf-8")
> + submodule_helper = subprocess.check_output(['git',
> 'submodule', '--quiet', 'foreach', 'echo $sm_path'], cwd=s_dir,
> env=env).decode("utf-8")
> for line in submodule_helper.splitlines():
> module_dir = os.path.join(s_dir, line.rsplit(maxsplit=1)[1])
> if os.path.isdir(module_dir):
I put this into our CI and it failed:
https://autobuilder.yoctoproject.org/typhoon/#/builders/79/builds/4136
https://autobuilder.yoctoproject.org/typhoon/#/builders/80/builds/4079
https://autobuilder.yoctoproject.org/typhoon/#/builders/86/builds/4094
https://autobuilder.yoctoproject.org/typhoon/#/builders/87/builds/4150
https://autobuilder.yoctoproject.org/typhoon/#/builders/127/builds/132
which I could reproduce locally with:
"oe-selftest -r devtool.DevtoolAddTests.test_devtool_add_fetch_git"
I'd also note that your patch is line wrapped and your From address is
being mangled by the mailing list, probably due to DMARC issues. If you
could fix those for the new version that'd be great!
Cheers,
Richard
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [OE-core] [PATCH] externalsrc: remove git submodule--helper list
2022-09-16 8:08 ` [OE-core] " Quentin Schulz
@ 2022-09-16 21:04 ` Jacob Creedon
0 siblings, 0 replies; 4+ messages in thread
From: Jacob Creedon @ 2022-09-16 21:04 UTC (permalink / raw)
To: Quentin Schulz; +Cc: openembedded-core
> When was this added to git?
$sm_path was added in 2.19 (August 2018). Prior to that, $path was
used all the way back to when foreach was added to `git submodule` in
v1.6.1 (December 2008). I'm not sure I have the project level context
to decide whether or not we should be bumping the minimum git version,
or just shimming in a small script to check for $path vs. $sm_path. So
I'm open to guidance on the preferred solution here.
The impetus for this patch is that `submodule--helper list` was
recently removed from git in
https://github.com/git/git/commit/31955475d1c283120d5d84247eb3fd55d9f5fdd9.
I happened to run into this because I was running a bleeding edge
version of git. I suspect it will be a little while before this
version of git will hit distros.
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2022-09-16 21:04 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-09-15 23:06 [PATCH] externalsrc: remove git submodule--helper list Jacob Creedon
2022-09-16 8:08 ` [OE-core] " Quentin Schulz
2022-09-16 21:04 ` Jacob Creedon
2022-09-16 16:38 ` Richard Purdie
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.