<?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>10981</bug_id>
          
          <creation_ts>2017-01-27 08:28:09 +0000</creation_ts>
          <short_desc>devtool: upgrade fails, recipe file not found</short_desc>
          <delta_ts>2017-09-01 00:12:58 +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>Scripts and Tools</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.4 M4</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Patrick Ohly">patrick.ohly</reporter>
          <assigned_to name="Paul Eggleton">bluelightning</assigned_to>
          <cc>henry.bruce</cc>
    
    <cc>poky.bs.watcher</cc>
    
    <cc>poky.watcher</cc>
    
    <cc>ross.burton</cc>
    
    <cc>tim.orling</cc>
          
          
          <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>70223</commentid>
    <comment_count>0</comment_count>
    <who name="Patrick Ohly">patrick.ohly</who>
    <bug_when>2017-01-27 08:28:09 +0000</bug_when>
    <thetext>Example (must have meta-oe in the bblayers.conf):

$ devtool upgrade --srcrev 922421cf795d53d339862bb2d99f1a85c96ad9a3 --version 0.6.4 multipath-tools
Loading cache: 100% |#################################################################################| Time: 0:00:00
Loaded 2934 entries from dependency cache.
NOTE: Executing do_fetch...
NOTE: Executing do_unpack...
NOTE: Patching...
NOTE: Executing do_patch...
NOTE: Adding local source files to srctree...
WARNING: Command &apos;git rebase 922421cf795d53d339862bb2d99f1a85c96ad9a3&apos; failed:
First, rewinding head to replay your work on top of it...
Applying: multipath-tools: modify Makefile.inc for cross-compilation
error: Failed to merge in the changes.
Using index info to reconstruct a base tree...
M	Makefile.inc
Falling back to patching base and 3-way merge...
Auto-merging Makefile.inc
CONFLICT (content): Merge conflict in Makefile.inc
Patch failed at 0001 multipath-tools: modify Makefile.inc for cross-compilation
The copy of the patch that failed is found in: .git/rebase-apply/patch

When you have resolved this problem, run &quot;git rebase --continue&quot;.
If you prefer to skip this patch, run &quot;git rebase --skip&quot; instead.
To check out the original branch and stop rebasing, run &quot;git rebase --abort&quot;.

You will need to resolve conflicts in order to complete the upgrade.
Traceback (most recent call last):
  File &quot;/work/openembedded-core/scripts/devtool&quot;, line 351, in &lt;module&gt;
    ret = main()
  File &quot;/work/openembedded-core/scripts/devtool&quot;, line 338, in main
    ret = args.func(args, config, basepath, workspace)
  File &quot;/work/openembedded-core/scripts/lib/devtool/upgrade.py&quot;, line 370, in upgrade
    rf, copied = _create_new_recipe(args.version, md5, sha256, args.srcrev, args.srcbranch, config.workspace_path, tinfoil, rd)
  File &quot;/work/openembedded-core/scripts/lib/devtool/upgrade.py&quot;, line 323, in _create_new_recipe
    rd = tinfoil.parse_recipe_file(fullpath, False)
  File &quot;/work/openembedded-core/bitbake/lib/bb/tinfoil.py&quot;, line 360, in parse_recipe_file
    dscon = self.run_command(&apos;parseRecipeFile&apos;, fn, appends, appendlist)
  File &quot;/work/openembedded-core/bitbake/lib/bb/tinfoil.py&quot;, line 268, in run_command
    raise TinfoilCommandFailed(result[1])
bb.tinfoil.TinfoilCommandFailed: Traceback (most recent call last):
  File &quot;/work/openembedded-core/bitbake/lib/bb/command.py&quot;, line 81, in runCommand
    result = command_method(self, commandline)
  File &quot;/work/openembedded-core/bitbake/lib/bb/command.py&quot;, line 535, in parseRecipeFile
    envdata = parser.loadDataFull(fn, appendfiles)
  File &quot;/work/openembedded-core/bitbake/lib/bb/cache.py&quot;, line 339, in loadDataFull
    bb_data = self.load_bbfile(virtualfn, appends, virtonly=True)
  File &quot;/work/openembedded-core/bitbake/lib/bb/cache.py&quot;, line 352, in load_bbfile
    datastores = parse_recipe(bb_data, bbfile, appends, mc)
  File &quot;/work/openembedded-core/bitbake/lib/bb/cache.py&quot;, line 315, in parse_recipe
    bb_data = bb.parse.handle(bbfile, bb_data)
  File &quot;/work/openembedded-core/bitbake/lib/bb/parse/__init__.py&quot;, line 113, in handle
    return h[&apos;handle&apos;](fn, data, include)
  File &quot;/work/openembedded-core/bitbake/lib/bb/parse/parse_py/BBHandler.py&quot;, line 132, in handle
    abs_fn = resolve_file(fn, d)
  File &quot;/work/openembedded-core/bitbake/lib/bb/parse/__init__.py&quot;, line 136, in resolve_file
    raise IOError(errno.ENOENT, &quot;file %s not found&quot; % fn)
FileNotFoundError: [Errno 2] file /.../workspace/recipes/multipath-tools/multipath-tools_git.bb not found


The rebase error is expected, the failure to create the upgraded recipe is not ;-}</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>71795</commentid>
    <comment_count>1</comment_count>
    <who name="Paul Eggleton">bluelightning</who>
    <bug_when>2017-03-28 04:00:44 +0000</bug_when>
    <thetext>I&apos;m unable to reproduce this issue - and I did rewind meta-oe back to ebef44963866d3231ccfe79d66d21c96ca0b4113 prior to your upgrade getting merged. I do get the conflict warning, but it completes without error here. Can you still reproduce it if you try the same?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>71798</commentid>
    <comment_count>2</comment_count>
    <who name="Patrick Ohly">patrick.ohly</who>
    <bug_when>2017-03-28 08:32:11 +0000</bug_when>
    <thetext>I can still reproduce it with intel-iot-refkit. I also tried with Poky now and there it indeed doesn&apos;t occur.

Updating refkit to use the exact same bitbake as poky master doesn&apos;t help, so it must be something related to paths (just a wild guess).

Steps to reproduce from scratch:
git clone --recurse git@github.com:intel/intel-iot-refkit.git
cd intel-iot-refkit/bitbake/
git checkout 921592026c69287cdb40ffd90944d5944f28e2c3
cd ../meta-openembedded/
git checkout 960acf856f49e65ed31e096aa5fb4aeed237172e
cd ../
. refkit-init-build-env 
echo &quot;require conf/distro/include/refkit-development.inc&quot; &gt;&gt;conf/local.conf 
devtool upgrade --srcrev 922421cf795d53d339862bb2d99f1a85c96ad9a3 --version 0.6.4 multipath-tools</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>71924</commentid>
    <comment_count>3</comment_count>
    <who name="Henry Bruce">henry.bruce</who>
    <bug_when>2017-03-30 18:59:41 +0000</bug_when>
    <thetext>I see a similar issue with mraa

$ devtool upgrade mraa --srcrev 5e34a5cd3be7514cca3e75971a1f271712e01d1c
raise IOError(errno.ENOENT, &quot;file %s not found&quot; % fn)
FileNotFoundError: [Errno 2] file /path/to/intel-iot-refkit/build/workspace/recipes/mraa/mraa_1.5.1.bb not found</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>76176</commentid>
    <comment_count>4</comment_count>
    <who name="Tim Orling">tim.orling</who>
    <bug_when>2017-08-26 21:36:15 +0000</bug_when>
    <thetext>$ rm -rf workspace/sources/python-matplotlib &amp;&amp; devtool upgrade python-matplotlib --version 1.5.0
NOTE: Starting bitbake server...
NOTE: Starting bitbake server...
Loading cache: 100% |###########################################################################################################| Time: 0:00:00
Loaded 2772 entries from dependency cache.
Parsing recipes: 100% |#########################################################################################################| Time: 0:00:00
Parsing of 1971 .bb files complete (1970 cached, 1 parsed). 2773 targets, 121 skipped, 0 masked, 0 errors.
NOTE: Executing do_fetch...
NOTE: Executing do_unpack...
NOTE: Patching...
NOTE: Executing do_patch...
NOTE: Fetching http://downloads.sourceforge.net/matplotlib/matplotlib-1.5.0.tar.gz...
ERROR: Nothing PROVIDES &apos;tmp-recipetool-17X9MBZW&apos;
ERROR: Failed to fetch URL http://downloads.sourceforge.net/matplotlib/matplotlib-1.5.0.tar.gz

If I run &apos;devtool add http://downloads.sourceforge.net/matplotlib/matplotlib-1.5.0.tar.gz&apos; it has no problem fetching.

The problem in this case is in scripts/lib/scriptutils.py
http://git.yoctoproject.org/cgit/cgit.cgi/poky/tree/scripts/lib/scriptutils.py#n175
res returns False

Not sure where to go from here to fix it...

[time goes by]

On a hunch, I removed my workspace/ and it worked. I am experimenting with adding the ability to upgrade from a new fetchuri and must have caused some corruption in the metadata...</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>76433</commentid>
    <comment_count>5</comment_count>
    <who name="Paul Eggleton">bluelightning</who>
    <bug_when>2017-09-01 00:12:58 +0000</bug_when>
    <thetext>Fix merged to master:

http://git.yoctoproject.org/cgit/cgit.cgi/poky/commit/?id=34580ac2872da6ae70d5269eb107d31cd5239ad7

I&apos;ve spoken to Tim separately about the &quot;Nothing PROVIDES&quot; issue (which I&apos;m fairly sure is unrelated) and he&apos;ll report it if it comes up again.</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>