Bug 9567

Summary: bitbake's FetchLatestVersion fail when running bitbake-selftest
Product: [Build System, Metadata & Runtime] BitBake Reporter: Leonardo Sandoval Gonzalez <leonardo.sandoval.gonzalez>
Component: bitbakeAssignee: Richard Purdie <richard.purdie>
Status: VERIFIED FIXED QA Contact:
Severity: critical    
Priority: High CC: akuster, jose.perez.carranza, leonardo.sandoval.gonzalez, poky.bs.watcher, poky.watcher, ross.burton
Version: 2.2   
Target Milestone: 2.2 M1   
Hardware: x86   
OS: Multiple   
Whiteboard:
OS type for building Yocto: --- Type of Regression: ---
Verified: Documentation change: No (bug/feature does not impact docs)
Attachments:
Description Flags
Log produced when running bitbake-selftest. none

Description Leonardo Sandoval Gonzalez 2016-05-02 20:44:39 UTC
Steps to reproduce:

  $ . oe-init-build-env;bitbake-selftest

Expected outcome:
  
  All test must pass

Current outcome (full log attached):

======================================================================
ERROR: test_git_latest_versionstring (bb.tests.fetch.FetchLatestVersionTest)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/lsandov1/poky/bitbake/lib/bb/tests/fetch.py", line 751, in test_git_latest_versionstring
    pupver= ud.method.latest_versionstring(ud, self.d)
  File "/home/lsandov1/poky/bitbake/lib/bb/fetch2/git.py", line 369, in latest_versionstring
    output = self._lsremote(ud, d, "refs/tags/*")
  File "/home/lsandov1/poky/bitbake/lib/bb/fetch2/git.py", line 335, in _lsremote
    output = runfetchcmd(cmd, d, True)
  File "/home/lsandov1/poky/bitbake/lib/bb/fetch2/__init__.py", line 817, in runfetchcmd
    val = d.getVar(var, True) or d.getVar("BB_ORIGENV", False).getVar(var, True)
AttributeError: 'NoneType' object has no attribute 'getVar'


Build description:

  commit f7b520878babbaa7527151f22c031ae160512753
  Author: Richard Purdie <richard.purdie@linuxfoundation.org>
  Date:   Fri Apr 29 07:40:56 2016 +0100

    poky: Switch to post release name/version

    (From meta-yocto rev: c9766c66525a0c1b040d1282ecc1c6f41c615dc7)

    Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>

MACHINE ??= "qemux86"

AU page:

  https://autobuilder.yoctoproject.org/main/builders/nightly/builds/828
Comment 1 Leonardo Sandoval Gonzalez 2016-05-02 20:50:48 UTC
Created attachment 3166 [details]
Log produced when running bitbake-selftest.
Comment 2 Ross Burton 2016-05-19 16:18:54 UTC
Fixed in bitbake f368f5ae64a1681873f3d81f3cb8fb38650367b0.
Comment 3 Jose Perez C 2016-06-20 12:43:33 UTC
This is working as expected now:

Validated on commit 7b9e1f5ad8a427356f2ec516b1718138a7d3c64e

**********************************************
bitbake-selftest 
..........................................................................................................................................................
----------------------------------------------------------------------
Ran 154 tests in 120.713s

OK
*******************************************
Comment 4 Armin Kuster 2016-06-28 15:13:24 UTC
Krogoth has the same failure. I reproduced using the current release and with krogoth-next I am preparing for pull request. 

AU
https://autobuilder.yoctoproject.org/main/builders/nightly/builds/917.

This fix should be back ported to krogoth but it is not clear exactly were.

Should this bug be re-opened or a new one for krogoth?

- Armin
Comment 5 Armin Kuster 2016-06-28 22:44:36 UTC
I back ported this fix for Krogoth and is appears to fix the problem there too.