Bug 9142

Summary: ca-certificates have non ascii characters in filenames which causes toaster to be unhappy
Product: [Build System, Metadata & Runtime] Toaster Reporter: brian avery <brian.avery>
Component: toasterAssignee: Joshua Lock <joshuagloe>
Status: VERIFIED FIXED QA Contact: Mihail Stanciu <stanciux.mihail>
Severity: normal    
Priority: Medium CC: alexandru.costinx.roman, belen.barros.pena, jessica.zhang, joshuagloe, michael.g.wood, stanciux.mihail
Version: 2.1   
Target Milestone: 2.1 M4   
Hardware: x86   
OS: Multiple   
Whiteboard:
OS type for building Yocto: --- Type of Regression: ---
Verified: Documentation change: No (bug/feature does not impact docs)
Attachments:
Description Flags
toaster_ui.log none

Description brian avery 2016-02-19 05:20:54 UTC
ca-certificates like ./tmp/sysroots/x86_64-linux/usr/share/ca-certificates/mozilla/AC_Raíz_Certicámara_S.A..crt  cause toaster to dump a traceback since the í in the filename is not an ascii character and buildinfohelper freaks.

the error is in toaster_ui.log on a core-image-sato build. It looks like:
ERROR: 'ascii' codec can't decode byte 0xc3 in position 40: ordinal not in range(128)
Traceback (most recent call last):

followed by a traceback and a lot of:
ERROR: Error data dump [....
Comment 1 Belen Barros Pena 2016-03-10 13:41:10 UTC
I've been able to reproduce this, I'm afraid, by building a core-image-sato image with toaster-next (cf1cebf59f5bb00f92401d29e3ab8490fdd32d57).

I've attached the build log.
Comment 2 Belen Barros Pena 2016-03-10 13:41:33 UTC
Created attachment 3021 [details]
toaster_ui.log
Comment 3 Belen Barros Pena 2016-03-10 14:17:12 UTC
I can't see the error in the log if I build only ca-certificates
Comment 4 Joshua Lock 2016-04-05 09:50:12 UTC
The exception is thrown during handling of the ImagePkgList MetadataEvent, so not triggering during build of the single recipe does make sense.

I was able to work around this by converting the paths in ORMWrapper's save_target_file_information() method to instances of the unicode type.

I'm going to propose a patch which does so for inclusion in the 2.1 timeframe.

For the next release we should probably look at better supporting unicode in Toaster. This should be made much easier if the proposal to switch BitBake to Python 3 goes ahead.
Comment 5 Joshua Lock 2016-04-07 07:29:43 UTC
Workaround merged to bitbake: 

http://git.yoctoproject.org/cgit/cgit.cgi/poky/commit/?id=7a309d964a86f3474eaab7df6d438ed797f935c0

I've filed https://bugzilla.yoctoproject.org/show_bug.cgi?id=9395 to track better supporting unicode in Toaster.
Comment 6 Alexandru Roman 2016-05-24 09:30:07 UTC
Verified on master.