Bug 10649 - devtool: output from recipetool breaks 'add' for some remote sources
Summary: devtool: output from recipetool breaks 'add' for some remote sources
Status: VERIFIED FIXED
Alias: None
Product: OE-Core
Classification: Build System, Metadata & Runtime
Component: Scripts and Tools (show other bugs)
Version: 2.2
Hardware: x86 Multiple
: High major
Target Milestone: 2.3 M1
Assignee: Stephano Cetola
QA Contact: Juan Ramos
URL:
Whiteboard:
Depends on:
Blocks:
 
Reported: 2016-11-11 17:57 UTC by Stephano Cetola
Modified: 2017-01-04 16:23 UTC (History)
3 users (show)

See Also:
OS type for building Yocto: ---
Type of Regression: Regression (Used to work)
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 Stephano Cetola 2016-11-11 17:57:21 UTC
Introduced in 452a1133ddadfb0750e930843d0e284185fca17c

Since adding the "watch=True" to exec_build_env_command, devtool add is now throwing a UnicodeDecodeError for all remote sources which cause fetcher to use wget (tarballs, binary packages, etc).

The exception is thrown here: devtool/__init__.py: 73    out = out.decode('utf-8')

devtool is outputting characters like these [â]:
HTTP request sent, awaiting response... 200 OK
Length: 164035 (160K) [application/x-bzip2]
Saving to: â/poky_sdk/downloads/xclock-1.0.7.tar.bz2â

I believe that these âs are UTF-8 quotes (U+2018 and 2019) that are unable to display properly. My terminal is setup to display UTF-8 properly, and does so if I run wget directly.

I've reproduced this on multiple machines, including one Debian VM with a very minimal setup, by simply running:


devtool add http://ftp.x.org/pub/individual/app/xclock-1.0.7.tar.bz2


exec_build_env_command sources oe-init-build-env and then runs (in this case a call to recipetool) through the script command so that bitbake will think it is outputting to a terminal. Something may be getting lost here.
Comment 1 Stephano Cetola 2016-11-17 16:03:50 UTC
A fix was submitted for this from iajie.hu@intel.com.
Comment 2 Stephano Cetola 2016-11-17 16:04:45 UTC
That should be jiajie.hu@intel.com
Comment 4 Juan Ramos 2017-01-04 16:23:46 UTC
this issue is not present in commit dbb247cac5fbf7b037e4955f9793828451723924, verified