<?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>12356</bug_id>
          
          <creation_ts>2017-11-16 00:28:52 +0000</creation_ts>
          <short_desc>devtool search produces tracebacks and not returning the search results</short_desc>
          <delta_ts>2018-03-06 11:50:54 +0000</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>6</classification_id>
          <classification>Yocto Project Subprojects</classification>
          <product>eSDK</product>
          <component>eSDK</component>
          <version>2.4</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 M2</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Rebecca Chang">rebecca.swee.fun.chang</reporter>
          <assigned_to name="Paul Eggleton">bluelightning</assigned_to>
          <cc>rebecca.swee.fun.chang</cc>
          
          <qa_contact name="Francisco Pedraza">francisco.j.pedraza.gonzalez</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>78229</commentid>
    <comment_count>0</comment_count>
    <who name="Rebecca Chang">rebecca.swee.fun.chang</who>
    <bug_when>2017-11-16 00:28:52 +0000</bug_when>
    <thetext>Using the eSDK installer from 2.4 release, I have also tried to use search subcommands.

eSDK installer used in this example: http://downloads.yoctoproject.org/releases/yocto/yocto-2.4/toolchain/x86_64/poky-glibc-x86_64-core-image-minimal-core2-64-toolchain-ext-2.4.sh 

When running ‘devtool search libGL’ , it returned some tracebacks and not returning the search results.

----- snip -----

$ devtool search libGL
NOTE: Starting bitbake server...
Loading cache: 100% |##############################################################################################################| Time: 0:00:00
Loaded 1275 entries from dependency cache.
Traceback (most recent call last):
  File &quot;/media/rebeccas/yocto/poky_sdk_64/sysroots/x86_64-pokysdk-linux/usr/bin/devtool&quot;, line 331, in &lt;module&gt;
    ret = main()
  File &quot;/media/rebeccas/yocto/poky_sdk_64/sysroots/x86_64-pokysdk-linux/usr/bin/devtool&quot;, line 318, in main
    ret = args.func(args, config, basepath, workspace)
  File &quot;/media/rebeccas/yocto/poky_sdk_64/layers/build/scripts/lib/devtool/search.py&quot;, line 39, in search
    for fn in os.listdir(pkgdata_dir):
FileNotFoundError: [Errno 2] No such file or directory: &apos;/media/rebeccas/yocto/poky_sdk_64/tmp/pkgdata/qemux86-64&apos;

----- snip -----</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>78235</commentid>
    <comment_count>1</comment_count>
    <who name="Rebecca Chang">rebecca.swee.fun.chang</who>
    <bug_when>2017-11-16 06:04:30 +0000</bug_when>
    <thetext>Some extra checking on &apos;devtool search&apos; outside of eSDK environment. Same failure found.

$ cd poky
$ source oe-init-build-env
$ devtool search libGL

NOTE: Starting bitbake server...
Parsing recipes: 100% |##########################################| Time: 0:00:05
Parsing of 816 .bb files complete (0 cached, 816 parsed). 1273 targets, 43 skipped, 0 masked, 0 errors.
Traceback (most recent call last):
  File &quot;/media/rebeccas/yocto/poky/scripts/devtool&quot;, line 342, in &lt;module&gt;
    ret = main()
  File &quot;/media/rebeccas/yocto/poky/scripts/devtool&quot;, line 329, in main
    ret = args.func(args, config, basepath, workspace)
  File &quot;/media/rebeccas/yocto/poky/scripts/lib/devtool/search.py&quot;, line 39, in search
    for fn in os.listdir(pkgdata_dir):
FileNotFoundError: [Errno 2] No such file or directory: &apos;/media/rebeccas/yocto/poky/build/tmp/pkgdata/qemux86&apos;</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>79724</commentid>
    <comment_count>2</comment_count>
    <who name="Paul Eggleton">bluelightning</who>
    <bug_when>2018-03-06 11:50:54 +0000</bug_when>
    <thetext>I have now fixed this in master (for 2.5) - not only do we avoid the traceback, but we also now search the recipe cache as well in case the item being searched for has not been built:

http://git.yoctoproject.org/cgit/cgit.cgi/poky/commit/?id=e8c7c36c60da20df4e261f27b1606f8e2aa2e441</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>