summaryrefslogtreecommitdiffstats
path: root/meta/classes/buildhistory.bbclass
diff options
context:
space:
mode:
Diffstat (limited to 'meta/classes/buildhistory.bbclass')
-rw-r--r--meta/classes/buildhistory.bbclass25
1 files changed, 10 insertions, 15 deletions
diff --git a/meta/classes/buildhistory.bbclass b/meta/classes/buildhistory.bbclass
index 8b5d5c214c..2b5f84a87a 100644
--- a/meta/classes/buildhistory.bbclass
+++ b/meta/classes/buildhistory.bbclass
@@ -155,7 +155,7 @@ python buildhistory_emit_pkghistory() {
155 with open(os.path.join(pkgdata_dir, pn)) as f: 155 with open(os.path.join(pkgdata_dir, pn)) as f:
156 for line in f.readlines(): 156 for line in f.readlines():
157 if line.startswith('PACKAGES: '): 157 if line.startswith('PACKAGES: '):
158 packages = squashspaces(line.split(': ', 1)[1]) 158 packages = oe.utils.squashspaces(line.split(': ', 1)[1])
159 break 159 break
160 except IOError as e: 160 except IOError as e:
161 if e.errno == errno.ENOENT: 161 if e.errno == errno.ENOENT:
@@ -181,7 +181,7 @@ python buildhistory_emit_pkghistory() {
181 rcpinfo.pe = pe 181 rcpinfo.pe = pe
182 rcpinfo.pv = pv 182 rcpinfo.pv = pv
183 rcpinfo.pr = pr 183 rcpinfo.pr = pr
184 rcpinfo.depends = sortlist(squashspaces(d.getVar('DEPENDS', True) or "")) 184 rcpinfo.depends = sortlist(oe.utils.squashspaces(d.getVar('DEPENDS', True) or ""))
185 rcpinfo.packages = packages 185 rcpinfo.packages = packages
186 write_recipehistory(rcpinfo, d) 186 write_recipehistory(rcpinfo, d)
187 187
@@ -222,13 +222,13 @@ python buildhistory_emit_pkghistory() {
222 pkginfo.pkge = pkge 222 pkginfo.pkge = pkge
223 pkginfo.pkgv = pkgv 223 pkginfo.pkgv = pkgv
224 pkginfo.pkgr = pkgr 224 pkginfo.pkgr = pkgr
225 pkginfo.rprovides = sortpkglist(squashspaces(pkgdata.get('RPROVIDES', ""))) 225 pkginfo.rprovides = sortpkglist(oe.utils.squashspaces(pkgdata.get('RPROVIDES', "")))
226 pkginfo.rdepends = sortpkglist(squashspaces(pkgdata.get('RDEPENDS', ""))) 226 pkginfo.rdepends = sortpkglist(oe.utils.squashspaces(pkgdata.get('RDEPENDS', "")))
227 pkginfo.rrecommends = sortpkglist(squashspaces(pkgdata.get('RRECOMMENDS', ""))) 227 pkginfo.rrecommends = sortpkglist(oe.utils.squashspaces(pkgdata.get('RRECOMMENDS', "")))
228 pkginfo.rsuggests = sortpkglist(squashspaces(pkgdata.get('RSUGGESTS', ""))) 228 pkginfo.rsuggests = sortpkglist(oe.utils.squashspaces(pkgdata.get('RSUGGESTS', "")))
229 pkginfo.rreplaces = sortpkglist(squashspaces(pkgdata.get('RREPLACES', ""))) 229 pkginfo.rreplaces = sortpkglist(oe.utils.squashspaces(pkgdata.get('RREPLACES', "")))
230 pkginfo.rconflicts = sortpkglist(squashspaces(pkgdata.get('RCONFLICTS', ""))) 230 pkginfo.rconflicts = sortpkglist(oe.utils.squashspaces(pkgdata.get('RCONFLICTS', "")))
231 pkginfo.files = squashspaces(pkgdata.get('FILES', "")) 231 pkginfo.files = oe.utils.squashspaces(pkgdata.get('FILES', ""))
232 for filevar in pkginfo.filevars: 232 for filevar in pkginfo.filevars:
233 pkginfo.filevars[filevar] = pkgdata.get(filevar, "") 233 pkginfo.filevars[filevar] = pkgdata.get(filevar, "")
234 234
@@ -525,11 +525,6 @@ def buildhistory_get_metadata_revs(d):
525 for i in layers] 525 for i in layers]
526 return '\n'.join(medadata_revs) 526 return '\n'.join(medadata_revs)
527 527
528
529def squashspaces(string):
530 import re
531 return re.sub("\s+", " ", string).strip()
532
533def outputvars(vars, listvars, d): 528def outputvars(vars, listvars, d):
534 vars = vars.split() 529 vars = vars.split()
535 listvars = listvars.split() 530 listvars = listvars.split()
@@ -538,7 +533,7 @@ def outputvars(vars, listvars, d):
538 value = d.getVar(var, True) or "" 533 value = d.getVar(var, True) or ""
539 if var in listvars: 534 if var in listvars:
540 # Squash out spaces 535 # Squash out spaces
541 value = squashspaces(value) 536 value = oe.utils.squashspaces(value)
542 ret += "%s = %s\n" % (var, value) 537 ret += "%s = %s\n" % (var, value)
543 return ret.rstrip('\n') 538 return ret.rstrip('\n')
544 539