Bug 11171 - devtool: finish/update-recipe fail to capture kernel config changes
Summary: devtool: finish/update-recipe fail to capture kernel config changes
Status: RESOLVED FIXED
Alias: None
Product: OE-Core
Classification: Build System, Metadata & Runtime
Component: devtools / tool chain (show other bugs)
Version: unspecified
Hardware: x86 Multiple
: Medium+ normal
Target Milestone: 2.3 M4
Assignee: Stephano Cetola
QA Contact: Libertad
URL:
Whiteboard:
Depends on:
Blocks:
 
Reported: 2017-03-16 16:25 UTC by Andrea Galbusera
Modified: 2017-04-28 17:45 UTC (History)
3 users (show)

See Also:
OS type for building Yocto: ---
Type of Regression: ---
Verified:
Documentation change: No (bug/feature does not impact docs)


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Andrea Galbusera 2017-03-16 16:25:00 UTC
devtool workflow seems to fail to update the kernel (linux-yocto) recipe after configuration change.

Steps to Repeat
================

1. 'devtool modify virtual/kernel': succeeds
2. 'bitbake virtual/kernel -c menuconfig'. I'm not aware of any devtool-only workflow to access the kernel configuration. Just enabling a previously disabled option here. This step succeeds and .config includes the expected configuration changes. 
3. 'devtool build linux-yocto' succeeds and configuration change related artifacts got built
4. 'devtool finish linux-yocto [path]' fails with the below error. Tried to point the changes either to my own layer or to meta-yocto-bsp with the same result. 'devtool update-recipe', which I expect 'finish' is calling behind the scenes leads to the same error.

Build Configuration (from 'devtool build'):
BB_VERSION        = "1.33.2"
BUILD_SYS         = "x86_64-linux"
NATIVELSBSTRING   = "universal"
TARGET_SYS        = "i586-poky-linux"
MACHINE           = "qemux86"
DISTRO            = "poky"
DISTRO_VERSION    = "2.2+snapshot-20170316"
TUNE_FEATURES     = "m32 i586"
TARGET_FPU        = ""
meta
meta-poky
meta-yocto-bsp    = "master:812fabbd30a062f6e726e6ae0399d87e85bf7fa3"
workspace         = "<unknown>:<unknown>"

Observed Behavior
==================

$ devtool finish linux-yocto meta-yocto-bsp
Loading cache: 100% |#################################################################| Time: 0:00:00
Loaded 1303 entries from dependency cache.
Parsing recipes: 100% |###############################################################| Time: 0:00:28
Parsing of 835 .bb files complete (834 cached, 1 parsed). 1303 targets, 50 skipped, 0 masked, 0 errors.
NOTE: Updating config fragment /tmp/devtoolydy_ks5r/tmp7bpa7ds1/devtool-fragment.cfg
Traceback (most recent call last):
  File "/home/gizero/work/upstreaming/poky/scripts/devtool", line 351, in <module>
    ret = main()
  File "/home/gizero/work/upstreaming/poky/scripts/devtool", line 338, in main
    ret = args.func(args, config, basepath, workspace)
  File "/home/gizero/work/upstreaming/poky/scripts/lib/devtool/standard.py", line 1779, in finish
    _update_recipe(args.recipename, workspace, rd, args.mode, appendlayerdir, wildcard_version=True, no_remove=False, initial_rev=args.initial_rev)
  File "/home/gizero/work/upstreaming/poky/scripts/lib/devtool/standard.py", line 1568, in _update_recipe
    updated = _update_recipe_patch(recipename, workspace, srctree, rd, appendlayerdir, wildcard_version, no_remove, initial_rev)
  File "/home/gizero/work/upstreaming/poky/scripts/lib/devtool/standard.py", line 1443, in _update_recipe_patch
    upd_f, new_f, del_f = _export_local_files(srctree, rd, local_files_dir)
  File "/home/gizero/work/upstreaming/poky/scripts/lib/devtool/standard.py", line 1281, in _export_local_files
    if _create_kconfig_diff(srctree, rd, fragment_path):
  File "/home/gizero/work/upstreaming/poky/scripts/lib/devtool/standard.py", line 1225, in _create_kconfig_diff
    fobj.write(stdout)
TypeError: write() argument must be str, not bytes

Expected Behavior
==================
devtool should capture changes in a configuration fragment and update the recipe accordingly
Comment 1 Stephano Cetola 2017-03-28 15:23:27 UTC
Fixed in master: 72bec63ab0e78753fb6ed1794d11beef9485c014