<?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>7587</bug_id>
          
          <creation_ts>2015-04-09 13:24:32 +0000</creation_ts>
          <short_desc>devtool: add ability to turn changes into a bbappend</short_desc>
          <delta_ts>2015-10-20 14:06:48 +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>1.8</version>
          <rep_platform>x86</rep_platform>
          <op_sys>Multiple</op_sys>
          <bug_status>VERIFIED</bug_status>
          <resolution>FIXED</resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>High</priority>
          <bug_severity>enhancement</bug_severity>
          <target_milestone>1.9 M1</target_milestone>
          <dependson>7648</dependson>
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Paul Eggleton">bluelightning</reporter>
          <assigned_to name="Paul Eggleton">bluelightning</assigned_to>
          <cc>alexandru.c.georgescu</cc>
    
    <cc>meta.mr.watcher</cc>
    
    <cc>meta.watcher</cc>
          
          <qa_contact name="Costin">costin.c.constantin</qa_contact>
          <cf_os>---</cf_os>
          <cf_regression_type>---</cf_regression_type>
          
          <cf_docchange>Yes (doc changes required)</cf_docchange>

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>50171</commentid>
    <comment_count>0</comment_count>
    <who name="Paul Eggleton">bluelightning</who>
    <bug_when>2015-04-09 13:24:32 +0000</bug_when>
    <thetext>Some changes people will want to apply as part of a devtool workflow will be customisations that would be best placed in their own layer and thus need to be applied as a bbappend. Right now, devtool update-recipe will update the original recipe, it doesn&apos;t really work with bbappends. So we need to do two things:

1) Ensure that when you update a commit that came from a patch applied by a bbappend in a separate layer, and then run devtool update-recipe, that by default the patch is correctly updated in the other layer. (I strongly suspect this doesn&apos;t work at the moment.)

2) Add the ability to update-recipe to redirect a change to another layer such that a bbappend gets created/updated as needed and the patch is written to the right place.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>51788</commentid>
    <comment_count>1</comment_count>
    <who name="Paul Eggleton">bluelightning</who>
    <bug_when>2015-06-18 14:03:19 +0000</bug_when>
    <thetext>The implementation for #2 was merged to master a couple of weeks ago:

http://git.yoctoproject.org/cgit/cgit.cgi/poky/commit/?id=7539c1f8892e5f7467e3fe8cf8cf7a5a23033e4d

Documentation updates for the dev manual are still TBD - I&apos;ve emailed Scott the details.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>51801</commentid>
    <comment_count>2</comment_count>
    <who name="Paul Eggleton">bluelightning</who>
    <bug_when>2015-06-18 17:11:30 +0000</bug_when>
    <thetext>I&apos;ve just tested and #1 does in fact work, at least in master.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>52212</commentid>
    <comment_count>3</comment_count>
    <who name="Paul Eggleton">bluelightning</who>
    <bug_when>2015-07-08 13:35:00 +0000</bug_when>
    <thetext>Scott has made the appropriate documentation changes, I&apos;m now marking this as resolved.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>55504</commentid>
    <comment_count>4</comment_count>
    <who name="Costin">costin.c.constantin</who>
    <bug_when>2015-10-20 14:06:48 +0000</bug_when>
    <thetext>Hello,

I tried both for a recipe with git and without in SRC_URI.

tested on master: 8578bc17b54da97d42b257b3c8f398ac52b91a9f on an Ubuntu 15.04 OS 

Steps performed, are inspired from Paul&apos;s comment#1 test cases. Recipes used are the same as those in the test cases; for non git recipe ---&gt; mdadm and for git recipe ---&gt; mtd-utils.

Steps i followed:
1) have a clean build env. (source oe-init-build-env 1build)
2) create a temporary directory 
user@ubnt:/tmp/devtoolqaCz6ZwS$ ls
layer  source  source1
 
BBPATH .= &quot;:${LAYERDIR}&quot;
BBFILES += &quot;${LAYERDIR}/recipe*/*.bb \
            ${LAYERDIR}/recipe*/*.bbappend&quot;
user@ubnt:vi layer/conf/layer.conf
BBFILE_COLLECTIONS += &quot;selftestupdaterecipe&quot;
BBFILE_PATTERN_selftestupdaterecipe = &quot;^${LAYERDIR}/&quot;
BBFILE_PRIORITY_selftestupdaterecipe = &quot;999&quot;
BBFILE_PATTERN_IGNORE_EMPTY_selftestupdaterecipe = &quot;1&quot;

3) get source code for the recipes:
user@ubnt:/media/yp_builds/2poky/1build$ devtool modify mtd-utils -x /tmp/devtoolqaCz6ZwS/source1  # for the mtd-utils
and
user@ubnt:/media/yp_builds/2poky/1build$ devtool modify mdadm -x /tmp/devtoolqaCz6ZwS/source # for mdadm

and check source code is under the /tmp/devtoolqaCz6ZwS/source and /tmp/devtoolqaCz6ZwS/source1 respectively

4) do some changes to the source code and commit them:
git commit -a -m &quot;Added a new line&quot; # for mdadm
 
git commit -a -m &quot;Change the Makefile&quot; # for mtd-utils

5) update the recipes:
user@ubnt:/media/yp_builds/2poky/1build$ devtool update-recipe mtd-utils -a /tmp/devtoolqaCz6ZwS/layer 
and 
user@ubnt:/media/yp_builds/2poky/1build$ devtool update-recipe mdadm -a /tmp/devtoolqaCz6ZwS/layer

6) observe results:
user@ubnt:/tmp/devtoolqaCz6ZwS/layer/recipes-extended/mdadm$ cat mdadm_3.3.4.bbappend 
FILESEXTRAPATHS_prepend := &quot;${THISDIR}/${PN}:&quot;

SRC_URI += &quot;file://0001-Added-a-new-line.patch&quot;

and

user@ubnt:/tmp/devtoolqaCz6ZwS/layer/recipes-devtools/mtd$ cat mtd-utils_git.bbappend 
FILESEXTRAPATHS_prepend := &quot;${THISDIR}/${PN}:&quot;

SRC_URI += &quot;file://0001-Change-the-Makefile.patch&quot;

Marking as verified</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>