toaster.bbclass: save original package name

If we can get the original package name when reading
package infos in toaster.bbclass, we save it for proper
referincing in the toater ui.

(From OE-Core rev: c3f3fed1b397b6ee6d44e7d39e63d084e4a88e30)

Signed-off-by: Alexandru DAMIAN <alexandru.damian@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
This commit is contained in:
Alexandru DAMIAN 2014-01-29 17:21:50 +00:00 committed by Richard Purdie
parent c31a045946
commit 28ba0fbefe
1 changed files with 4 additions and 0 deletions

View File

@ -94,11 +94,15 @@ python toaster_layerinfo_dumpdata() {
def _toaster_load_pkgdatafile(dirpath, filepath):
import json
import re
pkgdata = {}
with open(os.path.join(dirpath, filepath), "r") as fin:
for line in fin:
try:
kn, kv = line.strip().split(": ", 1)
m = re.match(r"^PKG_([^A-Z:]*)", kn)
if m:
pkgdata['OPKGN'] = m.group(1)
kn = "_".join([x for x in kn.split("_") if x.isupper()])
pkgdata[kn] = kv.strip()
if kn == 'FILES_INFO':