Hello,

I am trying to move AGL from morty to master in order to get a stock Kernel 3.9.
I have moved meta-intel, poky and open embedded to master branches.

I am blocked on an error that I do not understand in th pkg_postinst section.
the error code is:
AttributeError: 'module' object has no attribute 'getVar'

As the only getVar is happening  in the Version setting

VERSION=${@bb.data.getVar('PV',d,1).split('+git')[0]}
I wonder if something has hanged in bb.data but I could not find anything obvious.

Any help would be welcome.

Dominig

---------------- Log -----------------------

dominig@dominig-yocto:~/AGL/build> bitbake agl-demo-platform
WARNING: /home/dominig/AGL/meta-intel-iot-security/meta-security-framework/recipes-security/cynara/cynara_git.bb: Exception during build_dependencies for pkg_postinst_cynara:49
WARNING: /home/dominig/AGL/meta-intel-iot-security/meta-security-framework/recipes-security/cynara/cynara_git.bb: Error during finalise of /home/dominig/AGL/meta-intel-iot-security/meta-security-framework/recipes-security/cynara/cynara_git.bb
ERROR: ExpansionError during parsing /home/dominig/AGL/meta-intel-iot-security/meta-security-framework/recipes-security/cynara/cynara_git.bb
Traceback (most recent call last):
bb.data_smart.ExpansionError: Failure expanding variable pkg_postinst_cynara, _expression_ was    # Fail on error.
   set -e

   # It would be nice to run the code below while building an image,
   # but currently the calls to cynara-db-chsgen (a binary) in
   # cynara-db-migration (a script) prevent that. Rely instead
   # on OE's support for running failed postinst scripts at first boot.
   if [ x"$D" != "x" ]; then
      exit 1
   fi

   mkdir -p $D/etc/cynara
   chsmack -a System $D/etc/cynara

   # Strip git patch level information, the version comparison code
   # in cynara-db-migration only expect major.minor.patch version numbers.
   VERSION=${@bb.data.getVar('PV',d,1).split('+git')[0]}
   if [ -d $D/var/cynara ] ; then
      # upgrade
      echo "NOTE: updating cynara DB to version $VERSION"
      $D/usr/sbin/cynara-db-migration upgrade -f 0.0.0 -t $VERSION
   else
      # install
      echo "NOTE: creating cynara DB for version $VERSION"
      mkdir -p $D/var/cynara
      chsmack -a System $D/var/cynara
      $D/usr/sbin/cynara-db-migration install -t $VERSION
   fi

   # Workaround for systemd.bbclass issue: it would call
   # "systemctl start" without "--no-block", but because
   # the service is not ready to run at the time when
   # this scripts gets executed by run-postinsts.service,
   # booting deadlocks.
   echo "NOTE: enabling and starting cynara service"
   systemctl enable cynara
   systemctl start --no-block cynara
 which triggered exception AttributeError: 'module' object has no attribute 'getVar'

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

-- 
_______________________________________________
yocto mailing list
yocto@yoctoproject.org
https://lists.yoctoproject.org/listinfo/yocto

Reply via email to