Bug 10199 - Toaster when fed with custom fixture raises error due to malformed path
Summary: Toaster when fed with custom fixture raises error due to malformed path
Status: RESOLVED FIXED
Alias: None
Product: Toaster
Classification: Build System, Metadata & Runtime
Component: toaster (show other bugs)
Version: 2.2
Hardware: x86 Multiple
: Medium normal
Target Milestone: 2.2 M4
Assignee: brian avery
QA Contact: Libertad
URL:
Whiteboard:
Depends on:
Blocks:
 
Reported: 2016-08-31 15:14 UTC by Sujith H
Modified: 2016-11-01 18:24 UTC (History)
5 users (show)

See Also:
OS type for building Yocto: ---
Type of Regression: ---
Verified:
Documentation change: Don't know


Attachments
Custom.xml (14.32 KB, text/xml)
2016-08-31 15:14 UTC, Sujith H
no flags Details
Latest custom.xml (6.85 KB, text/xml)
2016-09-19 07:02 UTC, Sujith H
no flags Details
Toaster UI log (516.43 KB, text/x-log)
2016-09-19 07:04 UTC, Sujith H
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Sujith H 2016-08-31 15:14:41 UTC
Created attachment 3397 [details]
Custom.xml

This was particularly found when I used the custom.xml and start toaster.
Below is my custom.xml
Comment 1 Sujith H 2016-08-31 15:20:24 UTC
The steps to reproduce it are:

1) In the build folder I had placed the custom.xml and started toaster.
2) The machine used is mx6q ( which is available in the custom.xml)
3) After that I triggered for console-image
4) The error that is seen in the toaster_ui.log is ( snippet though ):

NOTE: ToasterUI waiting for events
NOTE: Resolving any missing task queue dependencies
ERROR: expected string or buffer
Traceback (most recent call last):
  File "/home/sujith/MEL/toaster-test1/poky/bitbake/lib/bb/ui/toasterui.py", line 423, in main
    buildinfohelper.store_layer_info(event)
  File "/home/sujith/MEL/toaster-test1/poky/bitbake/lib/bb/ui/buildinfohelper.py", line 1068, in store_layer_info
    self.internal_state['lvs'][self.orm_wrapper.get_update_layer_object(layerinfos[layer], self.brbe)] = layerinfos[layer]['version']
  File "/home/sujith/MEL/toaster-test1/poky/bitbake/lib/bb/ui/buildinfohelper.py", line 452, in get_update_layer_object
    localdirname = os.path.join(bc.getGitCloneDirectory(brl.giturl, brl.commit), brl.dirpath)
  File "/home/sujith/MEL/toaster-test1/poky/bitbake/lib/toaster/bldcontrol/localhostbecontroller.py", line 78, in getGitCloneDirectory
    return "_toaster_clones/_%s_%s" % (re.sub('[:/@%]', '_', url), branch)
  File "/home/sujith/venv/lib/python3.4/re.py", line 179, in sub
    return _compile(pattern, flags).sub(repl, string, count)
TypeError: expected string or buffer


Build Configuration:
BB_VERSION        = "1.31.1"
BUILD_SYS         = "x86_64-linux"
NATIVELSBSTRING   = "Ubuntu-14.04"
TARGET_SYS        = "arm-mel-linux-gnueabi"
MACHINE           = "mx6q"
DISTRO            = "mel"
DISTRO_VERSION    = "next+snapshot-20160831"
TUNE_FEATURES     = "arm armv7a vfp thumb neon       callconvention-hard       cortexa9"
TARGET_FPU        = "hard"
EXTERNAL_TOOLCHAIN = "/home/sujith/codebench-linux-install-2015.12-138-arm/codebench"
SOURCERY_VERSION  = "2015.12-138"
GCC_VERSION       = "5.2.0"
common            
meta-mentor-private 
meta-mel          
meta-mentor-staging 
meta-python       
meta-multimedia   
meta-filesystems  
meta-poky         
meta-networking   
meta-fsl-arm      
meta              
meta-mx6dqs       
meta-mx6-common   
meta-mel-support  
meta-sourcery     
meta-tracing      
meta-oe           = "<unknown>:<unknown>"

WARNING: Could not match layer version for recipe path /home/sujith/MEL/toaster-test1/meta-mentor-bsp/common/ : []
ERROR: 
Traceback (most recent call last):
  File "/home/sujith/MEL/toaster-test1/poky/bitbake/lib/bb/ui/toasterui.py", line 446, in main
    buildinfohelper.store_dependency_information(event)
  File "/home/sujith/MEL/toaster-test1/poky/bitbake/lib/bb/ui/buildinfohelper.py", line 1369, in store_dependency_information
    layer_version_obj = self._get_layer_version_for_path(path[1:]) # paths start with a ^
  File "/home/sujith/MEL/toaster-test1/poky/bitbake/lib/bb/ui/buildinfohelper.py", line 982, in _get_layer_version_for_path
    assert path.startswith("/")
AssertionError

NOTE: Executing SetScene Tasks
NOTE: Logfile for task /home/sujith/toaster-test/build-toaster-2/tmp/work/cortexa9hf-neon-mel-linux-gnueabi/libtool-cross/2.4.6-r0/temp/log.do_package_write_ipk_setscene.21678
NOTE: Logfile for task /home/sujith/toaster-test/build-toaster-2/tmp/work/cortexa9hf-neon-mel-linux-gnueabi/gcc-runtime-external/5.2.0-2015.12-138-r0/temp/log.do_package_write_ipk_setscene.21673
NOTE: Logfile for task /home/sujith/toaster-test/build-toaster-2/tmp/work/cortexa9hf-neon-mel-linux-gnueabi/base-passwd/3.5.29-r0/temp/log.do_packagedata_setscene.21688
NOTE: Logfile for task /home/sujith/toaster-test/build-toaster-2/tmp/work/cortexa9hf-neon-mel-linux-gnueabi/libtool-cross/2.4.6-r0/temp/log.do_package_write_ipk_setscene.21678
NOTE: Logfile for task /home/sujith/toaster-test/build-toaster-2/tmp/work/cortexa9hf-neon-mel-linux-gnueabi/glibc-external/2.22-2015.12-138-r0/temp/log.do_package_write_ipk_setscene.21674
NOTE: Logfile for task /home/sujith/toaster-test/build-toaster-2/tmp/work/cortexa9hf-neon-mel-linux-gnueabi/linux-libc-headers-external/1.0-2015.12-138-r0/temp/log.do_package_write_ipk_setscene.21681
NOTE: Logfile for task /home/sujith/toaster-test/build-toaster-2/tmp/work/cortexa9hf-neon-mel-linux-gnueabi/gcc-runtime-external/5.2.0-2015.12-138-r0/temp/log.do_package_write_ipk_setscene.21673
ERROR: 'recipes'
Traceback (most recent call last):
  File "/home/sujith/MEL/toaster-test1/poky/bitbake/lib/bb/ui/toasterui.py", line 421, in main
    buildinfohelper.store_build_package_information(event)
  File "/home/sujith/MEL/toaster-test1/poky/bitbake/lib/bb/ui/buildinfohelper.py", line 1507, in store_build_package_information
    self.internal_state['recipes'],
KeyError: 'recipes'

ERROR: 'recipes'
Traceback (most recent call last):
  File "/home/sujith/MEL/toaster-test1/poky/bitbake/lib/bb/ui/toasterui.py", line 421, in main
    buildinfohelper.store_build_package_information(event)
  File "/home/sujith/MEL/toaster-test1/poky/bitbake/lib/bb/ui/buildinfohelper.py", line 1507, in store_build_package_information
    self.internal_state['recipes'],
KeyError: 'recipes'

ERROR: 'recipes'
Traceback (most recent call last):
  File "/home/sujith/MEL/toaster-test1/poky/bitbake/lib/bb/ui/toasterui.py", line 421, in main
    buildinfohelper.store_build_package_information(event)
  File "/home/sujith/MEL/toaster-test1/poky/bitbake/lib/bb/ui/buildinfohelper.py", line 1507, in store_build_package_information
    self.internal_state['recipes'],
KeyError: 'recipes'

ERROR: 'recipes'
Traceback (most recent call last):
  File "/home/sujith/MEL/toaster-test1/poky/bitbake/lib/bb/ui/toasterui.py", line 421, in main
    buildinfohelper.store_build_package_information(event)
  File "/home/sujith/MEL/toaster-test1/poky/bitbake/lib/bb/ui/buildinfohelper.py", line 1507, in store_build_package_information


Expected: The errors shouldn't be happening and the log file should be clean with the messages.

The end result of this is, when user tries to navigate through the configuration page in the build summary. Only one layer is listed. And that is "Unidentified layer". Which is not good.
Comment 2 Michael Wood 2016-09-15 14:27:48 UTC
I think we found the root cause of this that was fixed with a seemingly unrelated patch. Sujith could you confirm. thanks
Comment 3 Sujith H 2016-09-19 07:01:45 UTC
Below are the steps done to verify with the upstream:

1) Clone poky-contrib and switch to toaster-next branch
2) source venv/bin/activate 
3) Execute the oe-init-build-env script
4) . ../bitbake/bin/toaster start
5) The build went fine. 

I will attach the custom.xml which I have used for verification this time. The custom.xml was placed inside the build folder ( after executing oe-ini-build-env ). For this verification I have used meta-openembedded repo and meta-fsl-arm repo respcectively.
Comment 4 Sujith H 2016-09-19 07:02:39 UTC
Created attachment 3424 [details]
Latest custom.xml
Comment 5 Sujith H 2016-09-19 07:04:03 UTC
Created attachment 3425 [details]
Toaster UI log
Comment 6 Sujith H 2016-09-19 07:04:51 UTC
I have made this change to toaster-next : https://lists.yoctoproject.org/pipermail/toaster/2016-September/005190.html

Let me know if more input is needed from my side.
Comment 7 Stephen K Jolley 2016-09-20 18:43:57 UTC
Moved back to Michael since Sujith has given an answer.
Comment 8 brian avery 2016-09-20 21:43:40 UTC
pushed to bitbake-devel and added to toaster-next