Skip to contentSkip to conversation

menuconfig fix for denzil

PATCH New Paul Eggleton 1 participant 2 messages Sep 24, 2012

lore
Share & tools
lore
#0 lore raw

cover menuconfig fix for denzil

Note that as noted in the patch this relies upon the task tainting feature in bitbake; this will do nothing with versions of bitbake that do not have that feature.

The following changes since commit 95756cfbb7a9348b23cb46a49a5509e57e973faf:

valgrind: fix default.supp missing issue (2012-08-21 11:19:26 +0100)

are available in the git repository at:

git://git.openembedded.org/openembedded-core-contrib paule/denzil-force-oecore
http://cgit.openembedded.org/cgit.cgi/openembedded-core-contrib/log/?h=paule/denzil-force-oecore

Paul Eggleton (1):
classes/cml1: ensure -c menuconfig forces a rebuild next time

 meta/classes/cml1.bbclass |   16 ++++++++++++++++
 1 file changed, 16 insertions(+)
Signature · 1 line
1.7.9.5
#1 lore raw

PATCH 1/1 classes/cml1: ensure -c menuconfig forces a rebuild next time

Ensure the following results in the kernel being rebuilt, repackaged and re-deployed in the final step:

bitbake virtual/kernel
bitbake -c menuconfig virtual/kernel
[ make changes to the kernel configuration and save ] bitbake virtual/kernel

If there are no changes to the configuration saved, the rebuild will not be triggered.

Note that this relies on a function recently added to BitBake and requires full hashing (i.e. BB_SIGNATURE_HANDLER must be set to a signature handler that inherits from BasicHash) - if this is not the case or the function is not available in the version of BitBake being used this change will do nothing.

Fixes [YOCTO #2256].

(From OE-Core rev: 9bf6b60e1599cf5dd87089d42584583cdfd6807a)

---
 meta/classes/cml1.bbclass |   16 ++++++++++++++++
 1 file changed, 16 insertions(+)
meta/classes/cml1.bbclass +16 -0
index d429188..678d23c 100644
@@ -10,7 +10,23 @@ addtask configure after do_unpack do_patch before do_compile
 inherit terminal
 
 python do_menuconfig() {
+        try:
+            mtime = os.path.getmtime(".config")
+        except OSError:
+            mtime = 0
+
         oe_terminal("make menuconfig", '${PN} Configuration', d)
+
+        # FIXME this check can be removed when the minimum bitbake version has been bumped
+        if hasattr(bb.build, 'write_taint'):
+            try:
+                newmtime = os.path.getmtime(".config")
+            except OSError:
+                newmtime = 0
+
+            if newmtime > mtime:
+                bb.note("Configuration changed, recompile will be forced")
+                bb.build.write_taint('do_compile', d)
 }
 do_menuconfig[nostamp] = "1"
 addtask menuconfig after do_configure
Signature · 1 line
1.7.9.5