Satya,

Patrick Holy has given me the following info and it likely would solve your issue as well.

Dominig

Le 02/03/2017 à 17:19, Patrick Ohly a écrit :
bb.data.getVar() has been deprecated for a while and was finally removed. Use d.getVar('PV') instead on master (no additional parameters needed, expansion is on by default).
-- Best Regards, Patrick Ohly

----------------------------------------------------------

Le 22/02/2017 à 07:45, SatyaNarayana Sampangi a écrit :
Hi,

1. I wrote the recipe .bb to install the nano editor, the contents given below,


 1 SUMMARY = "GNU nano- editor"
  2 DESCRIPTION = "GNU nano - an enhanced clone for the pico editor"
  3
  4 HOMEPAGE = "https://www.nano-editor.org/"
  5 BUGTRACKER = "https://savannah.gnu.org/bugs/?group=nano"
  6
  7 SECTION = "console/utils"
  8 PRIORITY = "OPTION"
  9
 10 LICENSE = "GPLv3"
 11 LIC_FILES_CHKSUM = "file://COPYING;md5=f27defe1e96c2e1ecd4e0c9be8967949    "
 12
 13 DEPENDS = "ncurses"
 14
 15 PV_MAJ = "${@bb.data.getVar('PV',d,1).split('.')[0]}"
 16 PV_MIN = "${@bb.data.getVar('PV',d,1).split('.')[1]}"
 17
 18 SRC_URI = "https://www.nano-editor.org/dist/v${PV_MAJ}.${PV_MIN}/nano-$    {PV}.tar.gz"
 19 #SRC_URI = "https://www.nano-editor.org/dist/v2.3/nano-2.3.1.tar.gz"
 20
 21 SRC_URI[md5sum] = "af09f8828744b0ea0808d6c19a2b4bfd"
 22 SRC_URI[sha256sum] = "b7bace9a8e543b84736d6ef5ce5430305746efea3aacb2439    1f692efc6f3c8d3"
 23
 24 inherit autotools gettext
 25
 26 RDEPENDS_${PV} = "ncurses"


2. When I run the bitbake nano, the am getting the error as given below,

bitbake nano
Loading cache: 100% |###################################################################################################################| Time: 0:00:00
Loaded 1324 entries from dependency cache.
ERROR: ExpansionError during parsing /home/satya/Yocto/Practice/poky/build-bbb-2/meta-mylayer/recipes-example/nano/nano_2.3.1.bb       | ETA:  --:--:--
Traceback (most recent call last):
  File "/home/satya/Yocto/Practice/poky/bitbake/lib/bb/data_smart.py", line 412, in DataSmart.expandWithRefs(s='https://www.nano-editor.org/dist/v${PV_MAJ}.${PV_MIN}/nano-${PV}.tar.gz', varname='SRC_URI'):
                 try:
    >                s = __expand_var_regexp__.sub(varparse.var_sub, s)
                     try:
  File "/home/satya/Yocto/Practice/poky/bitbake/lib/bb/data_smart.py", line 111, in VariableParse.var_sub(match=<_sre.SRE_Match object; span=(34, 43), match='${PV_MAJ}'>):
                 else:
    >                var = self.d.getVarFlag(key, "_content")
                 self.references.add(key)
  File "/home/satya/Yocto/Practice/poky/bitbake/lib/bb/data_smart.py", line 773, in DataSmart.getVarFlag(var='PV_MAJ', flag='_content', expand=True, noweakdefault=False, parsing=False):
                     cachename = var + "[" + flag + "]"
    >            value = self.expand(value, cachename)
    
  File "/home/satya/Yocto/Practice/poky/bitbake/lib/bb/data_smart.py", line 436, in DataSmart.expand(s="${@bb.data.getVar('PV',d,1).split('.')[0]}", varname='PV_MAJ'):
         def expand(self, s, varname = None):
    >        return self.expandWithRefs(s, varname).value
    
  File "/home/satya/Yocto/Practice/poky/bitbake/lib/bb/data_smart.py", line 426, in DataSmart.expandWithRefs(s="${@bb.data.getVar('PV',d,1).split('.')[0]}", varname='PV_MAJ'):
                 except Exception as exc:
    >                raise ExpansionError(varname, s, exc) from exc
    
bb.data_smart.ExpansionError: Failure expanding variable PV_MAJ, _expression_ was ${@bb.data.getVar('PV',d,1).split('.')[0]} which triggered exception AttributeError: module 'bb.data' has no attribute 'getVar'


Summary: There was 1 ERROR message shown, returning a non-zero exit code.

3. Could not get the solution, any help here. Any patches needs to appy here, if yes pls suggest.

Thanks,
satya




-- 
Dominig ar Foll
Senior Software Architect
Intel Open Source Technology Centre

-- 
_______________________________________________
yocto mailing list
[email protected]
https://lists.yoctoproject.org/listinfo/yocto

Reply via email to