From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail.windriver.com (mail.windriver.com [147.11.1.11]) by mail.openembedded.org (Postfix) with ESMTP id 2C0DE6C0B7 for ; Mon, 26 Nov 2018 14:08:50 +0000 (UTC) Received: from ALA-HCA.corp.ad.wrs.com ([147.11.189.40]) by mail.windriver.com (8.15.2/8.15.1) with ESMTPS id wAQE8nqi011727 (version=TLSv1 cipher=AES128-SHA bits=128 verify=FAIL); Mon, 26 Nov 2018 06:08:50 -0800 (PST) Received: from soho-mhatle-m.local (172.25.36.226) by ALA-HCA.corp.ad.wrs.com (147.11.189.50) with Microsoft SMTP Server id 14.3.408.0; Mon, 26 Nov 2018 06:08:49 -0800 To: "da Silva Filho, Josias Inacio" , "bitbake-devel@lists.openembedded.org" References: From: Mark Hatle Openpgp: preference=signencrypt Autocrypt: addr=mark.hatle@windriver.com; prefer-encrypt=mutual; keydata= xsBNBFYKxFgBCACt/pzutBp6p/xVKTFJjHbM3KpQKCblyot/YP+bpTr51Hrc5xDXBQhoG7TC aIRvRIvbhEevEQK9y04gW3JK/5lobq5ORebolcsHlYBUvpNeIPjupLQwGvz/TPtrLRNGLqDC rvsM6OA2XbQ2bwzxWaSQS3ImE2O2iXOZn9HhThMGeDB4Nff3fgUvXOTDIrgWOn9K2DgLL7Yc zkUIlFdj+Nraksd/7BSk8oH6tjeBVhFqSFvKta9QxWgdr58oPaTYaW/xNqUjlLrbJuMw/MSe xzuYfdfDfm6J8kRjMOnwQ0n8svJElzqAk+d83ow38gpGQ+LkjGgnf8ZFJ4rUJFADroX3ABEB AAHNJU1hcmsgSGF0bGUgPG1hcmsuaGF0bGVAd2luZHJpdmVyLmNvbT7CwHcEEwEIACEFAlYK xFgCGwMFCwkIBwIGFQgJCgsCBBYCAwECHgECF4AACgkQfv796/r0vvlvZAf9Gs+eN320yhRW V/fZCsngKhmOK4v3HrTwFrkSmoD9QHQiE/5IPdNacHwIPwZx07tNBohB8xOeNqCPRYRBwGhA AnxKOPyd0nnm6ZhPzbA57v4x3IGRQr4QzvcBTASJq91l3Ew4lpAslyx5w1DPPqRD7G8ycDKg peKyDwmdkvCunVisSAQI3XIMq2y230biTO98tDPEezg+lg+yTsz9ZT33F5KNuWrpf8VL5fG/ mt+kAv7wtsx/KTRbqhH3iFXF6eBSwMjAfTXFlkLfbM9riJGXrWEl9n2S2R3cDHNHug0lb8f4 whK370KEO4OwRKIYW/VUBmzk5XZUE9DTlDSV8ycsrs7ATQRWCsRYAQgAwK3FuHCE+HW3YWdH PUjeSn5p//xJ57u8g2rng8zm9zNjmYgpPv5UxozaD9i2jf4mlQLHGGOezhHae8K4Nj70oVcv 8AmwcrJa9i9WL1oy/9R3fHMWf/Ctt9VXTO0qlCuq6PDzaUfvsXR61aJIjTKNQTOjCLjY1vXm VSewUgARysmA8WrjTfwGBihMBxAX0+kIjx8nOlam0WvekMBXZ0AbS56oTLRxYao6DI3GeB/N oWPy/5DfuTKaSdM0Pf8al20x9RuNN5/HLMlyDH/k8bIa1xd9aAqW+Feiw5gC107V2E6ULyIy q6em2UrsmIRxrvpHqbNgQKqvTehJ+V/i4g/uOwARAQABwsBfBBgBCAAJBQJWCsRYAhsMAAoJ EH7+/ev69L755XAH/3ZcNhooqd9OBhFkvXm1iWZ8EoC7motWqVn2oEyxoonsg8AD9kFXiN+T dYp7dH99EZu9q4ptj56AXm4uHzOgywL/5/V2TY6twCGAjUGzDjAB5gzoi+JLIBlDiyOip0eL QswIhRk473xy3j8DA4oVamnSPWgyNJ+qsdt37YWDzoDFFvtDoRU7Eb+znfIMDKzlny0XU/8L cW1bNHJlpv/78GPdfP4tjysEd8MuA5jf5o5w4XqcwTqalffEJtQ/s3pbkstEi7qm5uPui5Kt gq6YYLSqcSNe0GWAF9/T+qwyo7burSTxUWCWtMmlXdAQLW9SynLhB3Jbch0nFAh0fCKi6yY= Organization: Wind River Systems Message-ID: <968bb2a3-b5e0-a2d9-e8fb-3ea86100450d@windriver.com> Date: Mon, 26 Nov 2018 08:08:48 -0600 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.14; rv:52.0) Gecko/20100101 Thunderbird/52.9.1 MIME-Version: 1.0 In-Reply-To: Subject: Re: Sumo to Thud migration: Fetch failure from gitsm.py X-BeenThere: bitbake-devel@lists.openembedded.org X-Mailman-Version: 2.1.12 Precedence: list List-Id: Patches and discussion that advance bitbake development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 26 Nov 2018 14:08:51 -0000 Content-Type: text/plain; charset="windows-1252" Content-Language: en-US Content-Transfer-Encoding: 8bit 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@/common-lib.git > >                 > > *foo.bb:* > > SRC_URI="gitsm://git@b.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 cd git show :.gitmodules for each of the modules listed: git ls-tree -z -d 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/.git git clone --bare ssh://git@b.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? > >   > > >