Bug 12356 - devtool search produces tracebacks and not returning the search results
Summary: devtool search produces tracebacks and not returning the search results
Status: RESOLVED FIXED
Alias: None
Product: eSDK
Classification: Yocto Project Subprojects
Component: eSDK (show other bugs)
Version: 2.4
Hardware: x86 Multiple
: Medium+ normal
Target Milestone: 2.5 M2
Assignee: Paul Eggleton
QA Contact: Francisco Pedraza
URL:
Whiteboard:
Depends on:
Blocks:
 
Reported: 2017-11-16 00:28 UTC by Rebecca Chang
Modified: 2018-03-06 11:50 UTC (History)
1 user (show)

See Also:
OS type for building Yocto: ---
Type of Regression: ---
Verified:
Documentation change: No (bug/feature does not impact docs)


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Rebecca Chang 2017-11-16 00:28:52 UTC
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 "/media/rebeccas/yocto/poky_sdk_64/sysroots/x86_64-pokysdk-linux/usr/bin/devtool", line 331, in <module>
    ret = main()
  File "/media/rebeccas/yocto/poky_sdk_64/sysroots/x86_64-pokysdk-linux/usr/bin/devtool", line 318, in main
    ret = args.func(args, config, basepath, workspace)
  File "/media/rebeccas/yocto/poky_sdk_64/layers/build/scripts/lib/devtool/search.py", line 39, in search
    for fn in os.listdir(pkgdata_dir):
FileNotFoundError: [Errno 2] No such file or directory: '/media/rebeccas/yocto/poky_sdk_64/tmp/pkgdata/qemux86-64'

----- snip -----
Comment 1 Rebecca Chang 2017-11-16 06:04:30 UTC
Some extra checking on 'devtool search' 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 "/media/rebeccas/yocto/poky/scripts/devtool", line 342, in <module>
    ret = main()
  File "/media/rebeccas/yocto/poky/scripts/devtool", line 329, in main
    ret = args.func(args, config, basepath, workspace)
  File "/media/rebeccas/yocto/poky/scripts/lib/devtool/search.py", line 39, in search
    for fn in os.listdir(pkgdata_dir):
FileNotFoundError: [Errno 2] No such file or directory: '/media/rebeccas/yocto/poky/build/tmp/pkgdata/qemux86'
Comment 2 Paul Eggleton 2018-03-06 11:50:54 UTC
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