Skip to contentSkip to conversation

cml1: remove needless check for write_taint attribute

PATCH New Enrico Jörns 1 participant 2 messages Mar 5, 2024

lore
Share & tools
lore
#0 lore raw

PATCH 1/2 cml1: remove needless check for write_taint attribute

The 'FIXME' comment itself says to remove this once the minimum bitbake version has been bumped. This was in 2012.

The function was introduced in bitbake commit f7b55a94 ("bitbake:
bitbake: ensure -f causes dependent tasks to be re-run") and is already part of bitbake 1.15.3 which is the minimum bitbake version since 'danny'.

Remove the check.

---
 meta/classes-recipe/cml1.bbclass | 18 ++++++++----------
 1 file changed, 8 insertions(+), 10 deletions(-)
meta/classes-recipe/cml1.bbclass +8 -10
index c4e3c9ff7a..2da19cb4cf 100644
@@ -61,16 +61,14 @@ python do_menuconfig() {
     oe_terminal("sh -c 'make %s; if [ \\$? -ne 0 ]; then echo \"Command failed.\"; printf \"Press any key to continue... \"; read r; fi'" % d.getVar('KCONFIG_CONFIG_COMMAND'),
                 d.getVar('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)
+    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[depends] += "ncurses-native:do_populate_sysroot"
 do_menuconfig[nostamp] = "1"
Signature · 1 line
2.39.2
#1 lore raw

PATCH 2/2 cml1: prompt location of updated .config after do_menuconfig()

When modifying the kernel config by invoking '-c menuconfig' manually, a sensible next step is to persist this changed configuration somewhere.

A way to do this is to copy the generated .config back to the original config location.

For this purpose, emit a copy+pasteable printout of the saved .config path similar to what we have for the fragment location in the 'diffconfig' task already.

Example output:

| Changed configuration saved at:
|  /path/to/bsp/build/tmp/work/my-machine-oe-linux/linux-custom/6.6.4/build/.config
| Recompile will be forced
---
 meta/classes-recipe/cml1.bbclass | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
meta/classes-recipe/cml1.bbclass +1 -1
index 2da19cb4cf..03e5fe6f47 100644
@@ -67,7 +67,7 @@ python do_menuconfig() {
         newmtime = 0
 
     if newmtime > mtime:
-        bb.note("Configuration changed, recompile will be forced")
+        bb.plain("Changed configuration saved at:\n %s\nRecompile will be forced" % config)
         bb.build.write_taint('do_compile', d)
 }
 do_menuconfig[depends] += "ncurses-native:do_populate_sysroot"
Signature · 1 line
2.39.2