<?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>12218</bug_id>
          
          <creation_ts>2017-10-11 15:13:28 +0000</creation_ts>
          <short_desc>devtool modify failing in fedora 26</short_desc>
          <delta_ts>2017-10-17 15:09:43 +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>2.4</version>
          <rep_platform>x86</rep_platform>
          <op_sys>Multiple</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>DUPLICATE</resolution>
          <dup_id>12185</dup_id>
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>Medium+</priority>
          <bug_severity>normal</bug_severity>
          <target_milestone>2.5 M1</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Leonardo Sandoval Gonzalez">leonardo.sandoval.gonzalez</reporter>
          <assigned_to name="Leonardo Sandoval Gonzalez">leonardo.sandoval.gonzalez</assigned_to>
          <cc>bluelightning</cc>
    
    <cc>javierx.zepeda.murguia</cc>
    
    <cc>joshuagloe</cc>
    
    <cc>meta.mr.watcher</cc>
    
    <cc>meta.watcher</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>77519</commentid>
    <comment_count>0</comment_count>
    <who name="Leonardo Sandoval Gonzalez">leonardo.sandoval.gonzalez</who>
    <bug_when>2017-10-11 15:13:28 +0000</bug_when>
    <thetext>At local AB, the following test is constantly failing

2017-10-10 01:08:59,987 - oe-selftest - INFO - FAIL [92.497s]: test_devtool_modify_native (devtool.DevtoolTests)
2017-10-10 01:08:59,988 - oe-selftest - INFO - ----------------------------------------------------------------------
2017-10-10 01:08:59,988 - oe-selftest - INFO - Traceback (most recent call last):
  File &quot;/home/ab/autobuilder/yocto-worker/nightly-oe-selftest-fedora26/build/meta/lib/oeqa/core/decorator/__init__.py&quot;, line 32, in wrapped_f
    return func(*args, **kwargs)
  File &quot;/home/ab/autobuilder/yocto-worker/nightly-oe-selftest-fedora26/build/meta/lib/oeqa/selftest/cases/devtool.py&quot;, line 598, in test_devtool_modify_native
    result = runCmd(&apos;devtool modify %s -x %s&apos; % (testrecipe, os.path.join(tempdir, testrecipe)))
  File &quot;/home/ab/autobuilder/yocto-worker/nightly-oe-selftest-fedora26/build/meta/lib/oeqa/utils/commands.py&quot;, line 191, in runCmd
    raise AssertionError(&quot;Command &apos;%s&apos; returned non-zero exit status %d:\n%s&quot; % (command, result.status, exc_output))
AssertionError: Command &apos;devtool modify apt-native -x /tmp/devtoolqaeweriswe/apt-native&apos; returned non-zero exit status 1:</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>77520</commentid>
    <comment_count>1</comment_count>
    <who name="Leonardo Sandoval Gonzalez">leonardo.sandoval.gonzalez</who>
    <bug_when>2017-10-11 15:14:27 +0000</bug_when>
    <thetext>I did some initial debugging with opensuse and fedora23 and the issue is not present. Seems that this problem only applies to fedora &gt;= 26 versions.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>77536</commentid>
    <comment_count>2</comment_count>
    <who name="Rebecca Chang">rebecca.swee.fun.chang</who>
    <bug_when>2017-10-12 06:01:31 +0000</bug_when>
    <thetext>We used crops/poky container and switched base to Fedora26. The issue is reproducible.
We also tried out Ubuntu base crops/poky and run the selftest. Ubuntu 16.04 base is failing with the same error too.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>77571</commentid>
    <comment_count>3</comment_count>
    <who name="Stephen K Jolley">sjolley.yp.pm</who>
    <bug_when>2017-10-13 16:26:02 +0000</bug_when>
    <thetext>I believe the question has been answered.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>77607</commentid>
    <comment_count>4</comment_count>
    <who name="Joshua Lock">joshuagloe</who>
    <bug_when>2017-10-16 14:01:05 +0000</bug_when>
    <thetext>The problem appears to be the -x switch to devtool modify. If I run that interactively I get a full backtrace (pasted below) pointing to line line 545, in _extract_source

Do we just need to ensure the temporary directory is created?

       tempbasedir = d.getVar(&apos;WORKDIR&apos;)                                                                
       bb.utils.mkdirhier(tempbasedir)                                                                  
       tempdir = tempfile.mkdtemp(prefix=&apos;devtooltmp-&apos;, dir=tempbasedir)                                
  +    bb.utils.mkdirhier(tempdir) 

---

$ devtool modify apt-native -x
NOTE: Starting bitbake server...
Loading cache: 100% |#####################################################################| Time: 0:00:00
Loaded 1275 entries from dependency cache.
Parsing recipes: 100% |###################################################################| Time: 0:00:00
Parsing of 818 .bb files complete (817 cached, 1 parsed). 1275 targets, 44 skipped, 0 masked, 0 errors.
NOTE: Resolving any missing task queue dependencies

Build Configuration:
BB_VERSION        = &quot;1.35.0&quot;
BUILD_SYS         = &quot;x86_64-linux&quot;
NATIVELSBSTRING   = &quot;universal&quot;
TARGET_SYS        = &quot;x86_64-poky-linux&quot;
MACHINE           = &quot;qemux86-64&quot;
DISTRO            = &quot;poky&quot;
DISTRO_VERSION    = &quot;2.4&quot;
TUNE_FEATURES     = &quot;m64 core2&quot;
TARGET_FPU        = &quot;&quot;
meta              
meta-poky         
meta-yocto-bsp    
workspace         = &quot;master:96967261993f8b583b51cdeccbb1fd06042d2192&quot;

Initialising tasks: 100% |################################################################| Time: 0:00:00
NOTE: Executing SetScene Tasks
NOTE: Executing RunQueue Tasks
NOTE: Tasks Summary: Attempted 75 tasks of which 72 didn&apos;t need to be rerun and all succeeded.
Traceback (most recent call last):
  File &quot;/home/joshuagl/Projects/poky/scripts/devtool&quot;, line 331, in &lt;module&gt;
    ret = main()
  File &quot;/home/joshuagl/Projects/poky/scripts/devtool&quot;, line 318, in main
    ret = args.func(args, config, basepath, workspace)
  File &quot;/home/joshuagl/Projects/poky/scripts/lib/devtool/standard.py&quot;, line 714, in modify
    initial_rev = _extract_source(srctree, args.keep_temp, args.branch, False, config, basepath, workspace, args.fixed_setup, rd, tinfoil)
  File &quot;/home/joshuagl/Projects/poky/scripts/lib/devtool/standard.py&quot;, line 545, in _extract_source
    with open(os.path.join(tempdir, &apos;initial_rev&apos;), &apos;r&apos;) as f:
FileNotFoundError: [Errno 2] No such file or directory: &apos;/home/joshuagl/Projects/poky/build/tmp/work/x86_64-linux/apt-native/1.2.24-r0/devtooltmp-m8jd0rcs/initial_rev&apos;</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>77635</commentid>
    <comment_count>5</comment_count>
    <who name="Joshua Lock">joshuagloe</who>
    <bug_when>2017-10-17 15:09:43 +0000</bug_when>
    <thetext>This issue already being tracked in 12185

*** This bug has been marked as a duplicate of bug 12185 ***</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>