From patchwork Thu Sep 6 18:53:54 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: packageinfo.bbclass: Fix crash in hob Date: Thu, 06 Sep 2012 18:53:54 -0000 From: Jason Wessel X-Patchwork-Id: 36075 Message-Id: <1346957634-22312-1-git-send-email-jason.wessel@windriver.com> To: Cc: paul.eggleton@linux.intel.com The hob internally fails after executing a build and invoking the hob a second time when it tries to use the values found in BUILDDIR/tmp/pkgdata/*/runtime/* The internal failure of the hob will manifest itself as stating "Populated recipes 99%" forever after selecting a machine just after starting the hob interface. The internal trace looks like: Traceback (most recent call last): File "packageinfo_handler(e)", line 24, in packageinfo_handler KeyError: 'PKGV' It is a result of using an override for a package version for pieces of the toolchain, in the bb file e.g. PKGV_gdb-dbg = "1234.5678" The work around for now is to populate the sdata PKGV value and to assign the pkgv variable with the correct value from the values found in the pkgdata store. Signed-off-by: Jason Wessel --- meta/classes/packageinfo.bbclass | 7 ++++++- 1 files changed, 6 insertions(+), 1 deletions(-) diff --git a/meta/classes/packageinfo.bbclass b/meta/classes/packageinfo.bbclass index 26cce60..53965e4 100644 --- a/meta/classes/packageinfo.bbclass +++ b/meta/classes/packageinfo.bbclass @@ -18,7 +18,12 @@ python packageinfo_handler () { sdata = oe.packagedata.read_pkgdatafile(root + pkgname) sdata['PKG'] = pkgname pkgrename = sdata['PKG_%s' % pkgname] - pkgv = sdata['PKGV'].replace('-', '+') + try: + pkgv = sdata['PKGV'] + except: + sdata['PKGV'] = sdata['PKGV_%s' % pkgname] + pkgv = sdata['PKGV'] + pkgv = pkgv.replace('-', '+') pkgr = sdata['PKGR'] # We found there are some renaming issue with certain architecture. # For example, armv7a-vfp-neon, it will use armv7a in the rpm file. This is the workaround for it.