From: Mark Hatle <mark.hatle@windriver.com>
To: "da Silva Filho, Josias Inacio" <jdasilva@ciena.com>,
"bitbake-devel@lists.openembedded.org"
<bitbake-devel@lists.openembedded.org>
Subject: Re: Sumo to Thud migration: Fetch failure from gitsm.py
Date: Mon, 26 Nov 2018 08:08:48 -0600 [thread overview]
Message-ID: <968bb2a3-b5e0-a2d9-e8fb-3ea86100450d@windriver.com> (raw)
In-Reply-To: <BY2PR0401MB1062E20E143B0318E7B03B9DDBDB0@BY2PR0401MB1062.namprd04.prod.outlook.com>
On 11/22/18 9:31 AM, da Silva Filho, Josias Inacio wrote:
> Hi folks,
>
>
>
> I’m working on migrating my environment from Sumo to Thud. After fixing a few
> quirks, it seems the fetch is failing for my foo.bb which uses gitsm.
>
>
>
> *.gitmodules content in foo repo:*
>
> [submodule "common-lib"]
>
> path = common-lib
>
> url = ssh://git@<url_to_common-lib>/common-lib.git
>
>
>
> *foo.bb:*
>
> SRC_URI="gitsm://git@b<url_to_foo>.git;protocol=ssh;branch=master"
>
> SRCREV="f55fae9dc9b476f8ed193f15e2d5cd6747777451"
>
>
>
> Digging inside gitsm.py it looks like module_hash is not being set correctly
> (empty) and that causes the issue:
>
> http://git.yoctoproject.org/cgit/cgit.cgi/poky/tree/bitbake/lib/bb/fetch2/gitsm.py#n87
>
>
>
> I added the following right after line 87, so I could dump the variables
> content. This is how I confirmed module_hash is empty:
>
> *raise bb.fetch2.FetchError('module: %s, submodules: %s, module_hash: %s,
> basecmd: %s, revisions: %s, paths: %s, clonedir: %s ' % ( module, submodules,
> module_hash, ud.basecmd, ud.revisions[name], paths[module], ud.clonedir))*
Run the cloning steps manually. And run the same git instructions as what the
gitsm fetcher does to find the hash for the submodule.
git clone --bare <url> <destination>
cd <destination>
git show <commit>:.gitmodules
for each of the modules listed:
git ls-tree -z -d <commit> <module path>
It's the bit in the for loop that doesn't seem to be returning anything. The
only time I've ever seen this not work is when a module is defined in the
.gitmodules file, but was never actually added to the repository.
>
>
> And the output:
>
> ERROR: Fetcher failure: module: common-lib, submodules: ['common-lib'],
> *module_hash*: , basecmd: git -c core.fsyncobjectfiles=0, revisions:
> f55fae9dc9b476f8ed193f15e2d5cd6747777451, paths: common-lib, clonedir:
> /localdata/yocto/downloads/git2/<foo's path>.git
git clone --bare ssh://git@b<url_to_foo>.git my_repo
cd my_repo
git show f55fae9dc9b476f8ed193f15e2d5cd6747777451:.gitmodules
for each of the modules listed: (focusing on common-lib)
git ls-tree -z -d f55fae9dc9b476f8ed193f15e2d5cd6747777451 common-lib
BTW my suggestion is to throw an exception or at least do a warning in the for
loop if module_hash is empty... since this is clearly an invalid configuration.
(after the split line)
if not module_hash:
logger.warning("Submodule %s of %s does not appear to have a commit defined."
% ( ud.url, module ))
--Mark
> Any ideas why module_hash is not being set correctly?
>
>
>
>
>
next prev parent reply other threads:[~2018-11-26 14:08 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-11-22 15:31 Sumo to Thud migration: Fetch failure from gitsm.py da Silva Filho, Josias Inacio
2018-11-23 10:30 ` Robert Yang
2018-11-23 23:03 ` [**EXTERNAL**] " da Silva Filho, Josias Inacio
2018-11-26 14:08 ` Mark Hatle [this message]
2018-12-04 20:50 ` da Silva Filho, Josias Inacio
-- strict thread matches above, loose matches on Subject: below --
2018-11-20 23:01 da Silva Filho, Josias Inacio
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=968bb2a3-b5e0-a2d9-e8fb-3ea86100450d@windriver.com \
--to=mark.hatle@windriver.com \
--cc=bitbake-devel@lists.openembedded.org \
--cc=jdasilva@ciena.com \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox