In attempting to perform steps in the kernel manual to create a configuration fragment using diffconfig, the task returns an error indicating that no configuration files exist when they do. Here are the steps to reproduce: 1. Have an existing build in ~/poky/build 2. cd ~/poky/build 3. bitbake linux-yocto -c kernel_configme -f 4. bitbake linux-yocto -c menuconfig Step 4 invokes menuconfig. Once menuconfig is running, make a minor change to the configuration and save the change and exit menuconfig 5. bitbake linux-yocto -c diffconfig Step 5 returns errors. See https://pastebin.com/7bpdLSJ0 for the console output. ========================= output here if that is easier.... Loading cache: 100% |##################################################################| Time: 0:00:00 Loaded 1275 entries from dependency cache. NOTE: Resolving any missing task queue dependencies Build Configuration: BB_VERSION = "1.35.0" BUILD_SYS = "x86_64-linux" NATIVELSBSTRING = "universal" TARGET_SYS = "i586-poky-linux" MACHINE = "qemux86" DISTRO = "poky" DISTRO_VERSION = "2.4" TUNE_FEATURES = "m32 i586" TARGET_FPU = "" meta meta-poky meta-yocto-bsp = "rocko:592c3449697ce39bf07864fafd7f0a61ca230561" meta-mylayer = "<unknown>:<unknown>" WARNING: /home/scottrif/poky/meta/recipes-kernel/linux/linux-yocto_4.12.bb.do_kernel_configme is tainted from a forced run Initialising tasks: 100% |#############################################################| Time: 0:00:00 NOTE: Executing SetScene Tasks NOTE: Executing RunQueue Tasks ERROR: linux-yocto-4.12.12+gitAUTOINC+eda4d18ce4_16de014967-r0 do_diffconfig: Error executing a python function in exec_python_func() autogenerated: The stack trace of python calls that resulted in this exception/failure was: File: 'exec_python_func() autogenerated', lineno: 2, function: <module> 0001: *** 0002:do_diffconfig(d) 0003: File: '/home/scottrif/poky/meta/classes/cml1.bbclass', lineno: 66, function: do_diffconfig 0062: bb.fatal("No config files found. Did you do menuconfig ?\n%s" % e) 0063: 0064: if isdiff: 0065: statement = 'diff --unchanged-line-format= --old-line-format= --new-line-format="%L" ' + configorig + ' ' + config + '>' + fragment *** 0066: subprocess.check_call(statement, shell=True) 0067: 0068: shutil.copy(configorig, config) 0069: 0070: bb.plain("Config fragment has been dumped into:\n %s" % fragment) File: '/usr/lib/python3.5/subprocess.py', lineno: 581, function: check_call 0577: if retcode: 0578: cmd = kwargs.get("args") 0579: if cmd is None: 0580: cmd = popenargs[0] *** 0581: raise CalledProcessError(retcode, cmd) 0582: return 0 0583: 0584: 0585:def check_output(*popenargs, timeout=None, **kwargs): Exception: subprocess.CalledProcessError: Command 'diff --unchanged-line-format= --old-line-format= --new-line-format="%L" .config.orig .config>/home/scottrif/poky/build/tmp/work/qemux86-poky-linux/linux-yocto/4.12.12+gitAUTOINC+eda4d18ce4_16de014967-r0/fragment.cfg' returned non-zero exit status 1 ERROR: linux-yocto-4.12.12+gitAUTOINC+eda4d18ce4_16de014967-r0 do_diffconfig: Function failed: do_diffconfig ERROR: Logfile of failure stored in: /home/scottrif/poky/build/tmp/work/qemux86-poky-linux/linux-yocto/4.12.12+gitAUTOINC+eda4d18ce4_16de014967-r0/temp/log.do_diffconfig.26418 ERROR: Task (/home/scottrif/poky/meta/recipes-kernel/linux/linux-yocto_4.12.bb:do_diffconfig) failed with exit code '1' NOTE: Tasks Summary: Attempted 24 tasks of which 23 didn't need to be rerun and 1 failed. Summary: 1 task failed: /home/scottrif/poky/meta/recipes-kernel/linux/linux-yocto_4.12.bb:do_diffconfig Summary: There was 1 WARNING message shown. Summary: There were 2 ERROR messages shown, returning a non-zero exit code.
This commit broke the routine. diff returns '1' if there are differences and it isn't an error. So the switch to check_call is not right for this routine. I'll send patch to restore the old call. commit b090ff6a277aa6e242020d7d6ffb1d351e3ee4e0 Author: Mikko Rapeli <mikko.rapeli@bmw.de> Date: Thu Jun 22 16:23:14 2017 +0300 meta: Fix return value checks from subprocess.call()'s Python function subprocess.call() returns the return value of the executed process. If return values are not checked, errors may go unnoticed and bad things can happen. Change all callers of subprocess.call() which do not check for the return value to use subprocess.check_call() which raises CalledProcessError if the subprocess returns with non-zero value. https://docs.python.org/2/library/subprocess.html#using-the-subprocess-module All users of the function were found with: $ git grep "subprocess\.call" | \ egrep -v 'if.*subprocess\.call|=\ +subprocess\.call|return.*subprocess\.call' Tested similar patch on top of yocto jethro. Only compile tested core-image-minimal on poky master branch. (From OE-Core rev: 578c8205fd14c48c6d30ef2889d86f1b4aee060a) Signed-off-by: Mikko Rapeli <mikko.rapeli@bmw.de> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> :100644 100644 38e6613c486d... eb8e7907f602... M meta/classes/cml1.bbclass
*** Bug 12161 has been marked as a duplicate of this bug. ***