diff options
Diffstat (limited to 'meta/classes/buildhistory.bbclass')
-rw-r--r-- | meta/classes/buildhistory.bbclass | 16 |
1 files changed, 12 insertions, 4 deletions
diff --git a/meta/classes/buildhistory.bbclass b/meta/classes/buildhistory.bbclass index 1b6b2493e4..d1a9670c29 100644 --- a/meta/classes/buildhistory.bbclass +++ b/meta/classes/buildhistory.bbclass | |||
@@ -123,9 +123,6 @@ python buildhistory_emit_pkghistory() { | |||
123 | except EnvironmentError: | 123 | except EnvironmentError: |
124 | return None | 124 | return None |
125 | 125 | ||
126 | def squashspaces(string): | ||
127 | return re.sub("\s+", " ", string) | ||
128 | |||
129 | def sortpkglist(string): | 126 | def sortpkglist(string): |
130 | pkgiter = re.finditer(r'[a-zA-Z0-9.-]+( \([><=]+ [^ )]+\))?', string, 0) | 127 | pkgiter = re.finditer(r'[a-zA-Z0-9.-]+( \([><=]+ [^ )]+\))?', string, 0) |
131 | pkglist = [p.group(0) for p in pkgiter] | 128 | pkglist = [p.group(0) for p in pkgiter] |
@@ -349,12 +346,23 @@ def buildhistory_get_layers(d): | |||
349 | return layertext | 346 | return layertext |
350 | 347 | ||
351 | 348 | ||
349 | def squashspaces(string): | ||
350 | import re | ||
351 | return re.sub("\s+", " ", string).strip() | ||
352 | |||
353 | |||
352 | def buildhistory_get_imagevars(d): | 354 | def buildhistory_get_imagevars(d): |
353 | imagevars = "DISTRO DISTRO_VERSION USER_CLASSES IMAGE_CLASSES IMAGE_FEATURES IMAGE_LINGUAS IMAGE_INSTALL BAD_RECOMMENDATIONS ROOTFS_POSTPROCESS_COMMAND IMAGE_POSTPROCESS_COMMAND" | 355 | imagevars = "DISTRO DISTRO_VERSION USER_CLASSES IMAGE_CLASSES IMAGE_FEATURES IMAGE_LINGUAS IMAGE_INSTALL BAD_RECOMMENDATIONS ROOTFS_POSTPROCESS_COMMAND IMAGE_POSTPROCESS_COMMAND" |
356 | listvars = "USER_CLASSES IMAGE_CLASSES IMAGE_FEATURES IMAGE_LINGUAS IMAGE_INSTALL BAD_RECOMMENDATIONS" | ||
354 | 357 | ||
358 | imagevars = imagevars.split() | ||
359 | listvars = listvars.split() | ||
355 | ret = "" | 360 | ret = "" |
356 | for var in imagevars.split(): | 361 | for var in imagevars: |
357 | value = d.getVar(var, True) or "" | 362 | value = d.getVar(var, True) or "" |
363 | if var in listvars: | ||
364 | # Squash out spaces | ||
365 | value = squashspaces(value) | ||
358 | ret += "%s = %s\n" % (var, value) | 366 | ret += "%s = %s\n" % (var, value) |
359 | return ret.rstrip('\n') | 367 | return ret.rstrip('\n') |
360 | 368 | ||