summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--meta/classes/base.bbclass44
1 files changed, 24 insertions, 20 deletions
diff --git a/meta/classes/base.bbclass b/meta/classes/base.bbclass
index a95dfd9a08..ea5349852b 100644
--- a/meta/classes/base.bbclass
+++ b/meta/classes/base.bbclass
@@ -200,6 +200,29 @@ def preferred_ml_updates(d):
200 extramp.append(virt + pref + "-" + p) 200 extramp.append(virt + pref + "-" + p)
201 d.setVar("MULTI_PROVIDER_WHITELIST", " ".join(mp + extramp)) 201 d.setVar("MULTI_PROVIDER_WHITELIST", " ".join(mp + extramp))
202 202
203
204def get_layers_branch_rev(d):
205 layers = (d.getVar("BBLAYERS", 1) or "").split()
206 layers_branch_rev = ["%-17s = \"%s:%s\"" % (os.path.basename(i), \
207 base_get_metadata_git_branch(i, None).strip(), \
208 base_get_metadata_git_revision(i, None)) \
209 for i in layers]
210 i = len(layers_branch_rev)-1
211 p1 = layers_branch_rev[i].find("=")
212 s1 = layers_branch_rev[i][p1:]
213 while i > 0:
214 p2 = layers_branch_rev[i-1].find("=")
215 s2= layers_branch_rev[i-1][p2:]
216 if s1 == s2:
217 layers_branch_rev[i-1] = layers_branch_rev[i-1][0:p2]
218 i -= 1
219 else:
220 i -= 1
221 p1 = layers_branch_rev[i].find("=")
222 s1= layers_branch_rev[i][p1:]
223 return layers_branch_rev
224
225
203addhandler base_eventhandler 226addhandler base_eventhandler
204python base_eventhandler() { 227python base_eventhandler() {
205 from bb.event import getName 228 from bb.event import getName
@@ -211,26 +234,7 @@ python base_eventhandler() {
211 statusvars = ['BB_VERSION', 'TARGET_ARCH', 'TARGET_OS', 'MACHINE', 'DISTRO', 'DISTRO_VERSION','TUNE_FEATURES', 'TARGET_FPU'] 234 statusvars = ['BB_VERSION', 'TARGET_ARCH', 'TARGET_OS', 'MACHINE', 'DISTRO', 'DISTRO_VERSION','TUNE_FEATURES', 'TARGET_FPU']
212 statuslines = ["%-17s = \"%s\"" % (i, e.data.getVar(i, 1) or '') for i in statusvars] 235 statuslines = ["%-17s = \"%s\"" % (i, e.data.getVar(i, 1) or '') for i in statusvars]
213 236
214 layers = (e.data.getVar("BBLAYERS", 1) or "").split() 237 statuslines += get_layers_branch_rev(e.data)
215 layers_branch_rev = ["%-17s = \"%s:%s\"" % (os.path.basename(i), \
216 base_get_metadata_git_branch(i, None).strip(), \
217 base_get_metadata_git_revision(i, None)) \
218 for i in layers]
219 i = len(layers_branch_rev)-1
220 p1 = layers_branch_rev[i].find("=")
221 s1= layers_branch_rev[i][p1:]
222 while i > 0:
223 p2 = layers_branch_rev[i-1].find("=")
224 s2= layers_branch_rev[i-1][p2:]
225 if s1 == s2:
226 layers_branch_rev[i-1] = layers_branch_rev[i-1][0:p2]
227 i -= 1
228 else:
229 i -= 1
230 p1 = layers_branch_rev[i].find("=")
231 s1= layers_branch_rev[i][p1:]
232
233 statuslines += layers_branch_rev
234 statusmsg = "\nOE Build Configuration:\n%s\n" % '\n'.join(statuslines) 238 statusmsg = "\nOE Build Configuration:\n%s\n" % '\n'.join(statuslines)
235 bb.plain(statusmsg) 239 bb.plain(statusmsg)
236 240