<?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>11399</bug_id>
          
          <creation_ts>2017-04-21 00:43:31 +0000</creation_ts>
          <short_desc>devtool modify does not work with S != &quot;${WORKDIR}/git&quot; and multiple git repos in play</short_desc>
          <delta_ts>2017-10-31 22:06:34 +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.5</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Scott Branden">scott.branden</reporter>
          <assigned_to name="Paul Eggleton">bluelightning</assigned_to>
          <cc>jon.richardson</cc>
    
    <cc>meta.mr.watcher</cc>
    
    <cc>meta.watcher</cc>
          
          
          <cf_os>---</cf_os>
          <cf_regression_type>---</cf_regression_type>
          
          <cf_docchange>Don&apos;t know</cf_docchange>

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>72747</commentid>
    <comment_count>0</comment_count>
    <who name="Scott Branden">scott.branden</who>
    <bug_when>2017-04-21 00:43:31 +0000</bug_when>
    <thetext>devtool modify does not work when multiple git repos are specified in the SRC_URI and S != &quot;${WORKDIR}/git&quot;

If S happens to be a valid subdirectory being checked out. S = &quot;${WORKDIR}/git/misc&quot; in the example brcm.bono.bb provided.  An error occurs:

devtool modify brcm-bono
Parsing recipes..done.
NOTE: Fetching brcm-bono...
NOTE: Unpacking...
NOTE: Patching...
Traceback (most recent call last):
  File &quot;/mnt/2ndHDD/yocto/sxc/poky/scripts/devtool&quot;, line 344, in &lt;module&gt;
    ret = main()
  File &quot;/mnt/2ndHDD/yocto/sxc/poky/scripts/devtool&quot;, line 331, in main
    ret = args.func(args, config, basepath, workspace)
  File &quot;/mnt/2ndHDD/yocto/sxc/poky/scripts/lib/devtool/standard.py&quot;, line 786, in modify
    initial_rev = _extract_source(srctree, False, args.branch, False, rd)
  File &quot;/mnt/2ndHDD/yocto/sxc/poky/scripts/lib/devtool/standard.py&quot;, line 634, in _extract_source
    task_executor.exec_func(&apos;do_patch&apos;, False)
  File &quot;/mnt/2ndHDD/yocto/sxc/poky/scripts/lib/devtool/standard.py&quot;, line 463, in exec_func
    super(PatchTaskExecutor, self).exec_func(func, report)
  File &quot;/mnt/2ndHDD/yocto/sxc/poky/scripts/lib/devtool/standard.py&quot;, line 431, in exec_func
    self.exec_func(taskdepfunc, True)
  File &quot;/mnt/2ndHDD/yocto/sxc/poky/scripts/lib/devtool/standard.py&quot;, line 475, in exec_func
    bb.process.run(&apos;git add .; git %s commit -a -m &quot;Committing changes from %s\n\n%s&quot;&apos; % (&apos; &apos;.join(self.useroptions), func, GitApplyTree.ignore_commit_prefix + &apos; - from %s&apos; % func), cwd=srcsubdir)
  File &quot;/mnt/2ndHDD/yocto/sxc/poky/bitbake/lib/bb/process.py&quot;, line 171, in run
    raise ExecutionError(cmd, pipe.returncode, stdout, stderr)
bb.process.ExecutionError: Execution of &apos;git add .; git -c user.name=&quot;OpenEmbedded&quot; -c user.email=&quot;oe.patch@oe&quot; commit -a -m &quot;Committing changes from do_unpack

%% ignore - from do_unpack&quot;&apos; failed with exit code 1:
# On branch devtool
# Untracked files:
#	../ofono/
#
nothing added to commit but untracked files present


I trimmed down one of our internal recipes and replaced the git repos with external repos to reproduce the problem. brcm-bono.bb recipe as below.

DESCRIPTION = &quot;Broadcom test&quot;
SECTION = &quot;firmware&quot;
LICENSE = &quot;Broadcom-Proprietary&quot;
LIC_FILES_CHKSUM = &quot;file://${WORKDIR}/LICENSE.txt;md5=8f548b18a631a33d76050774b431b1a1&quot;

inherit autorev-pv

SRCREV = &quot;${AUTOREV}&quot;
SRC_URI = &quot;git://git.kernel.org/pub/scm/fs/ext2/e2fsprogs.git;branch=master&quot;
SRCREV_FORMAT = &quot;git&quot;

SRC_URI += &quot;git://git.kernel.org/pub/scm/network/ofono/ofono.git;destsuffix=git/ofono&quot;
SRCREV_FORMAT_ofono = &quot;git&quot;

S = &quot;${WORKDIR}/git/misc&quot;</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>77881</commentid>
    <comment_count>1</comment_count>
    <who name="Paul Eggleton">bluelightning</who>
    <bug_when>2017-10-31 01:12:57 +0000</bug_when>
    <thetext>I can&apos;t reproduce this in master/rocko, I believe this ended up being fixed as part of the reworking of devtool source extraction reworking. That was a complex set of changes so it&apos;s not an easily backportable fix, but here is the commit that would have changed this behaviour:

http://git.yoctoproject.org/cgit/cgit.cgi/poky/commit/?id=45adbe370908901d0d2e94b3c4daea821772e2ff</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>77905</commentid>
    <comment_count>2</comment_count>
    <who name="Scott Branden">scott.branden</who>
    <bug_when>2017-10-31 22:06:34 +0000</bug_when>
    <thetext>(In reply to comment #1)
&gt; I can&apos;t reproduce this in master/rocko, I believe this ended up being fixed
&gt; as part of the reworking of devtool source extraction reworking. That was a
&gt; complex set of changes so it&apos;s not an easily backportable fix, but here is
&gt; the commit that would have changed this behaviour:
&gt; 
&gt; http://git.yoctoproject.org/cgit/cgit.cgi/poky/commit/
&gt; ?id=45adbe370908901d0d2e94b3c4daea821772e2ff

Yes - it is working in rocko.  Thanks.</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>