Patchwork [bitbake-devel] bitbake-layers: fix Python error during parse

login
register
mail settings
Submitter Paul Eggleton
Date Dec. 29, 2011, 2:34 p.m.
Message ID <1325169252-7588-1-git-send-email-paul.eggleton@linux.intel.com>
Download mbox | patch
Permalink /patch/17781/
State Accepted
Commit a228f0a32c2c14d62effbbba5f4fada4cd3817f6
Headers show

Comments

Paul Eggleton - Dec. 29, 2011, 2:34 p.m.
If "bitbake-layers show_layers" was run when the cache was dirty forcing
a parse, it failed with the following error:

ERROR: Failure expanding variable SRCPV, expression was
${@bb.fetch2.get_srcrev(d)} which triggered exception AttributeError:
'module' object has no attribute 'fetch2'

A simple import of bb.fetch2 in bitbake-layers fixes this.

Fixes [YOCTO #1855].

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
---
 bin/bitbake-layers |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)
Richard Purdie - Jan. 4, 2012, 2:15 p.m.
On Thu, 2011-12-29 at 14:34 +0000, Paul Eggleton wrote:
> If "bitbake-layers show_layers" was run when the cache was dirty forcing
> a parse, it failed with the following error:
> 
> ERROR: Failure expanding variable SRCPV, expression was
> ${@bb.fetch2.get_srcrev(d)} which triggered exception AttributeError:
> 'module' object has no attribute 'fetch2'
> 
> A simple import of bb.fetch2 in bitbake-layers fixes this.
> 
> Fixes [YOCTO #1855].
> 
> Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>

Merged to master, thanks.

Richard

Patch

diff --git a/bin/bitbake-layers b/bin/bitbake-layers
index 119b15c..b2781bb 100755
--- a/bin/bitbake-layers
+++ b/bin/bitbake-layers
@@ -18,6 +18,7 @@  import bb.cooker
 import bb.providers
 import bb.utils
 from bb.cooker import state
+import bb.fetch2
 
 
 logger = logging.getLogger('BitBake')