<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "https://bugzilla.yoctoproject.org/page.cgi?id=bugzilla.dtd">

<bugzilla version="5.0.6"
          urlbase="https://bugzilla.yoctoproject.org/"
          
          maintainer="it-coreprojects-helpdesk@linuxfoundation.org"
>

    <bug>
          <bug_id>11171</bug_id>
          
          <creation_ts>2017-03-16 16:25:00 +0000</creation_ts>
          <short_desc>devtool: finish/update-recipe fail to capture kernel config changes</short_desc>
          <delta_ts>2017-04-28 17:45:21 +0000</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>7</classification_id>
          <classification>Build System, Metadata &amp; Runtime</classification>
          <product>OE-Core</product>
          <component>devtools / tool chain</component>
          <version>unspecified</version>
          <rep_platform>x86</rep_platform>
          <op_sys>Multiple</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>FIXED</resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>Medium+</priority>
          <bug_severity>normal</bug_severity>
          <target_milestone>2.3 M4</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Andrea Galbusera">gizero</reporter>
          <assigned_to name="Stephano Cetola">stephano</assigned_to>
          <cc>libertad.gonzalez.de.la.cruz</cc>
    
    <cc>meta.mr.watcher</cc>
    
    <cc>meta.watcher</cc>
          
          <qa_contact name="Libertad">libertad.gonzalez.de.la.cruz</qa_contact>
          <cf_os>---</cf_os>
          <cf_regression_type>---</cf_regression_type>
          
          <cf_docchange>No (bug/feature does not impact docs)</cf_docchange>

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>71362</commentid>
    <comment_count>0</comment_count>
    <who name="Andrea Galbusera">gizero</who>
    <bug_when>2017-03-16 16:25:00 +0000</bug_when>
    <thetext>devtool workflow seems to fail to update the kernel (linux-yocto) recipe after configuration change.

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

1. &apos;devtool modify virtual/kernel&apos;: succeeds
2. &apos;bitbake virtual/kernel -c menuconfig&apos;. I&apos;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. &apos;devtool build linux-yocto&apos; succeeds and configuration change related artifacts got built
4. &apos;devtool finish linux-yocto [path]&apos; fails with the below error. Tried to point the changes either to my own layer or to meta-yocto-bsp with the same result. &apos;devtool update-recipe&apos;, which I expect &apos;finish&apos; is calling behind the scenes leads to the same error.

Build Configuration (from &apos;devtool build&apos;):
BB_VERSION        = &quot;1.33.2&quot;
BUILD_SYS         = &quot;x86_64-linux&quot;
NATIVELSBSTRING   = &quot;universal&quot;
TARGET_SYS        = &quot;i586-poky-linux&quot;
MACHINE           = &quot;qemux86&quot;
DISTRO            = &quot;poky&quot;
DISTRO_VERSION    = &quot;2.2+snapshot-20170316&quot;
TUNE_FEATURES     = &quot;m32 i586&quot;
TARGET_FPU        = &quot;&quot;
meta
meta-poky
meta-yocto-bsp    = &quot;master:812fabbd30a062f6e726e6ae0399d87e85bf7fa3&quot;
workspace         = &quot;&lt;unknown&gt;:&lt;unknown&gt;&quot;

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 &quot;/home/gizero/work/upstreaming/poky/scripts/devtool&quot;, line 351, in &lt;module&gt;
    ret = main()
  File &quot;/home/gizero/work/upstreaming/poky/scripts/devtool&quot;, line 338, in main
    ret = args.func(args, config, basepath, workspace)
  File &quot;/home/gizero/work/upstreaming/poky/scripts/lib/devtool/standard.py&quot;, 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 &quot;/home/gizero/work/upstreaming/poky/scripts/lib/devtool/standard.py&quot;, line 1568, in _update_recipe
    updated = _update_recipe_patch(recipename, workspace, srctree, rd, appendlayerdir, wildcard_version, no_remove, initial_rev)
  File &quot;/home/gizero/work/upstreaming/poky/scripts/lib/devtool/standard.py&quot;, line 1443, in _update_recipe_patch
    upd_f, new_f, del_f = _export_local_files(srctree, rd, local_files_dir)
  File &quot;/home/gizero/work/upstreaming/poky/scripts/lib/devtool/standard.py&quot;, line 1281, in _export_local_files
    if _create_kconfig_diff(srctree, rd, fragment_path):
  File &quot;/home/gizero/work/upstreaming/poky/scripts/lib/devtool/standard.py&quot;, 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</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>71813</commentid>
    <comment_count>1</comment_count>
    <who name="Stephano Cetola">stephano</who>
    <bug_when>2017-03-28 15:23:27 +0000</bug_when>
    <thetext>Fixed in master: 72bec63ab0e78753fb6ed1794d11beef9485c014</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>