Bug 9822

Summary: devtool: fail to add recipe for some packages
Product: [Build System, Metadata & Runtime] OE-Core Reporter: Yi Zhao <yi.zhao>
Component: devtools / tool chainAssignee: Paul Eggleton <bluelightning>
Status: VERIFIED FIXED QA Contact: Yi Zhao <yi.zhao>
Severity: normal    
Priority: Medium CC: francisco.j.pedraza.gonzalez, jose.perez.carranza, ke.zou, meta.mr.watcher, meta.watcher, sgw, yi.zhao
Version: 2.2   
Target Milestone: 2.2 M2   
Hardware: x86   
OS: Multiple   
Whiteboard:
OS type for building Yocto: --- Type of Regression: Regression (Used to work)
Verified: Documentation change: No (bug/feature does not impact docs)

Description Yi Zhao 2016-06-24 08:39:21 UTC
Toolchain location: http://autobuilder.yoctoproject.org/pub/releases/yocto-2.2_M1.rc2/toolchain/x86_64/

Git rev: master/6f0c5537e02c59e1c8f3b08f598dc049ff8ee098

Steps:
1. Download poky-glibc-x86_64-core-image-sato-core2-64-toolchain-ext-2.1+snapshot.sh from http://autobuilder.yoctoproject.org/pub/releases/yocto-2.2_M1.rc2/toolchain/x86_64/

2. Install the eSDK and set the environment

$ ./poky-glibc-x86_64-core-image-sato-core2-64-toolchain-ext-2.1+snapshot.sh 
Poky (Yocto Project Reference Distro) Extensible SDK installer version 2.1+snapshot
===================================================================================
Enter target directory for SDK (default: ~/poky_sdk): /buildarea1/poky_sdk
You are about to install the SDK to "/buildarea1/poky_sdk". Proceed[Y/n]? 
Extracting SDK.................................................................................................................................done
Setting it up...
Extracting buildtools...
Preparing build system...
done
SDK has been successfully set up and is ready to be used.
Each time you wish to use the SDK in a new shell session, you need to source the environment setup script e.g.
 $ . /buildarea1/poky_sdk/environment-setup-core2-64-poky-linux
$ . /buildarea1/poky_sdk/environment-setup-core2-64-poky-linux 
SDK environment now set up; additionally you may now run devtool to perform development tasks.
Run devtool --help for further details.


4. Try to add a new recipe with devtool add command

For some packages, it could work without problems. For example:

$ devtool add pv http://www.ivarch.com/programs/sources/pv-1.5.3.tar.bz2

NOTE: Using default source tree path /buildarea1/poky_sdk/workspace/sources/pv
NOTE: Recipe /buildarea1/poky_sdk/workspace/recipes/pv/pv_1.5.3.bb has been automatically created; further editing may be required to make it fully functional


But for some packages, it doesn't work:

$ devtool add tree ftp://mama.indstate.edu/linux/tree/tree-1.7.0.tgz

ERROR: Command '. /buildarea1/poky_sdk/layers/build/oe-init-build-env /buildarea1/poky_sdk > /dev/null && recipetool --color=always create -o /tmp/devtool41ix2xd4 "ftp://mama.indstate.edu/linux/tree/tree-1.7.0.tgz"  -x /buildarea1/poky_sdk/workspace/sources/devtoolsrc5fc3ucr1 -N tree' failed:
NOTE: Fetching ftp://mama.indstate.edu/linux/tree/tree-1.7.0.tgz...
NOTE: Unpacking /buildarea1/poky_sdk/downloads/tree-1.7.0.tgz to /tmp/recipetool-f6dg5xrl/
Traceback (most recent call last):
  File "/buildarea1/poky_sdk/layers/build/scripts/recipetool", line 117, in <module>
    ret = main()
  File "/buildarea1/poky_sdk/layers/build/scripts/recipetool", line 108, in main
    ret = args.func(args)
  File "/buildarea1/poky_sdk/layers/build/scripts/lib/recipetool/create.py", line 614, in create_recipe
    handler.process(srctree_use, classes, lines_before, lines_after, handled, extravalues)
  File "/buildarea1/poky_sdk/layers/build/scripts/lib/recipetool/create_kmod.py", line 57, in process
    for line in f:
  File "/buildarea1/poky_sdk/buildtools/sysroots/x86_64-pokysdk-linux/usr/lib/python3.5/codecs.py", line 321, in decode
    (result, consumed) = self._buffer_decode(data, self.errors, final)
UnicodeDecodeError: 'utf-8' codec can't decode byte 0xe7 in position 204: invalid continuation byte

The same error when adding from local path:

$ devtool add tree /tmp/tree-1.7.0
ERROR: Command '. /buildarea1/poky_sdk/layers/build/oe-init-build-env /buildarea1/poky_sdk > /dev/null && recipetool --color=always create -o /tmp/devtool8th65yzd "/tmp/tree-1.7.0"  -N tree' failed:
Traceback (most recent call last):
  File "/buildarea1/poky_sdk/layers/build/scripts/recipetool", line 117, in <module>
    ret = main()
  File "/buildarea1/poky_sdk/layers/build/scripts/recipetool", line 108, in main
    ret = args.func(args)
  File "/buildarea1/poky_sdk/layers/build/scripts/lib/recipetool/create.py", line 614, in create_recipe
    handler.process(srctree_use, classes, lines_before, lines_after, handled, extravalues)
  File "/buildarea1/poky_sdk/layers/build/scripts/lib/recipetool/create_kmod.py", line 57, in process
    for line in f:
  File "/buildarea1/poky_sdk/buildtools/sysroots/x86_64-pokysdk-linux/usr/lib/python3.5/codecs.py", line 321, in decode
    (result, consumed) = self._buffer_decode(data, self.errors, final)
UnicodeDecodeError: 'utf-8' codec can't decode byte 0xe7 in position 204: invalid continuation byte
Comment 2 Yi Zhao 2016-07-27 08:03:45 UTC
Verified with 2.2 M2 RC1 build
Git rev: master/36feb38045b7a2af86ece147fec54b0db3bf491f