summaryrefslogtreecommitdiffstats
path: root/meta
diff options
context:
space:
mode:
authorAlexandru DAMIAN <alexandru.damian@intel.com>2014-01-29 17:21:50 +0000
committerRichard Purdie <richard.purdie@linuxfoundation.org>2014-01-29 17:40:33 +0000
commit28ba0fbefe8e74ca5c610718a285498ca12f5244 (patch)
tree9a13af3b34bd63453ac5261b6a0f88494d8d16ba /meta
parentc31a0459461cf8f2d0064f00abd27e3d3c76d7bb (diff)
downloadpoky-28ba0fbefe8e74ca5c610718a285498ca12f5244.tar.gz
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>
Diffstat (limited to 'meta')
-rw-r--r--meta/classes/toaster.bbclass4
1 files changed, 4 insertions, 0 deletions
diff --git a/meta/classes/toaster.bbclass b/meta/classes/toaster.bbclass
index 7c404b9e65..eed30d4b23 100644
--- a/meta/classes/toaster.bbclass
+++ b/meta/classes/toaster.bbclass
@@ -94,11 +94,15 @@ python toaster_layerinfo_dumpdata() {
94 94
95def _toaster_load_pkgdatafile(dirpath, filepath): 95def _toaster_load_pkgdatafile(dirpath, filepath):
96 import json 96 import json
97 import re
97 pkgdata = {} 98 pkgdata = {}
98 with open(os.path.join(dirpath, filepath), "r") as fin: 99 with open(os.path.join(dirpath, filepath), "r") as fin:
99 for line in fin: 100 for line in fin:
100 try: 101 try:
101 kn, kv = line.strip().split(": ", 1) 102 kn, kv = line.strip().split(": ", 1)
103 m = re.match(r"^PKG_([^A-Z:]*)", kn)
104 if m:
105 pkgdata['OPKGN'] = m.group(1)
102 kn = "_".join([x for x in kn.split("_") if x.isupper()]) 106 kn = "_".join([x for x in kn.split("_") if x.isupper()])
103 pkgdata[kn] = kv.strip() 107 pkgdata[kn] = kv.strip()
104 if kn == 'FILES_INFO': 108 if kn == 'FILES_INFO':