<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "https://bugzilla.yoctoproject.org/page.cgi?id=bugzilla.dtd">

<bugzilla version="5.0.6"
          urlbase="https://bugzilla.yoctoproject.org/"
          
          maintainer="it-coreprojects-helpdesk@linuxfoundation.org"
>

    <bug>
          <bug_id>7251</bug_id>
          
          <creation_ts>2015-01-26 15:28:21 +0000</creation_ts>
          <short_desc>Toaster manage.py loadconf traceback when trying to load toasterconf.json</short_desc>
          <delta_ts>2015-02-11 13:30:36 +0000</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>7</classification_id>
          <classification>Build System, Metadata &amp; Runtime</classification>
          <product>Toaster</product>
          <component>toaster</component>
          <version>1.8</version>
          <rep_platform>x86</rep_platform>
          <op_sys>Multiple</op_sys>
          <bug_status>VERIFIED</bug_status>
          <resolution>FIXED</resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>Medium+</priority>
          <bug_severity>normal</bug_severity>
          <target_milestone>1.8 M3</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Ionut Chisanovici">ionutx.chisanovici</reporter>
          <assigned_to name="Alexandru Damian">alexandru.damian</assigned_to>
          <cc>alexandru.damian</cc>
    
    <cc>belen.barros.pena</cc>
    
    <cc>bluelightning</cc>
    
    <cc>bogdanx.a.voiculescu</cc>
    
    <cc>cristiana.voicu</cc>
    
    <cc>jessica.zhang</cc>
          
          <qa_contact name="Ionut Chisanovici">ionutx.chisanovici</qa_contact>
          <cf_os>---</cf_os>
          <cf_regression_type>New (Never tested)</cf_regression_type>
          
          <cf_docchange>No (bug/feature does not impact docs)</cf_docchange>

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>48278</commentid>
    <comment_count>0</comment_count>
    <who name="Ionut Chisanovici">ionutx.chisanovici</who>
    <bug_when>2015-01-26 15:28:21 +0000</bug_when>
    <thetext>Hi,

For master commit: 07f2eca7e9f9163ec48d3a417d8ba885a84762f3, the manage.py loadconf command doesn&apos;t work with the toasterconf.json file for the remote use case uploaded on wiki.

Wiki file: https://wiki.yoctoproject.org/wiki/images/d/d5/Toasterconf.json.txt.patch

Steps to reproduce:

1. Clone poky;
2. Start toaster in managed mode: bitbake/bin/toaster
3. If asked to import configuration file from ...meta-yocto/conf/toasterconf.json, do not import it
4. Let toaster managed mode to fully start and then stop it (Ctrl-C)
5. cd bitbake/lib/toaster
6. run command: ./manage.py loadconf /path/to/the/toasterconf_from_wiki.json

Traceback output:

$ ./manage.py loadconf --verbosity=3 --traceback /home/ionut/Downloads/toasterconf.json 
Traceback (most recent call last):
  File &quot;/usr/local/lib/python2.7/dist-packages/django/core/management/base.py&quot;, line 222, in run_from_argv
    self.execute(*args, **options.__dict__)
  File &quot;/usr/local/lib/python2.7/dist-packages/django/core/management/base.py&quot;, line 255, in execute
    output = self.handle(*args, **options)
  File &quot;/home/ionut/work/poky_1.8/poky/bitbake/lib/toaster/bldcontrol/management/commands/loadconf.py&quot;, line 171, in handle
    self._import_layer_config(filepath)
  File &quot;/home/ionut/work/poky_1.8/poky/bitbake/lib/toaster/bldcontrol/management/commands/loadconf.py&quot;, line 84, in _import_layer_config
    if _get_id_for_sourcetype(lsi[&apos;sourcetype&apos;]) == LayerSource.TYPE_LAYERINDEX or lsi[&apos;apiurl&apos;].startswith(&quot;/&quot;):
  File &quot;/home/ionut/work/poky_1.8/poky/bitbake/lib/toaster/bldcontrol/management/commands/loadconf.py&quot;, line 25, in _get_id_for_sourcetype
    raise Exception(&quot;Could not find definition for sourcetype &quot; + s)
TypeError: cannot concatenate &apos;str&apos; and &apos;int&apos; objects

Cheers,
Ionut C</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>48334</commentid>
    <comment_count>1</comment_count>
    <who name="Alexandru Damian">alexandru.damian</who>
    <bug_when>2015-01-27 18:01:53 +0000</bug_when>
    <thetext>Pushed for review on 

adamian/20150127-fiz-6785</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>48466</commentid>
    <comment_count>2</comment_count>
    <who name="Alexandru Damian">alexandru.damian</who>
    <bug_when>2015-02-02 11:04:03 +0000</bug_when>
    <thetext>merged in origin/master</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>48595</commentid>
    <comment_count>3</comment_count>
    <who name="Ionut Chisanovici">ionutx.chisanovici</who>
    <bug_when>2015-02-05 16:40:12 +0000</bug_when>
    <thetext>Verified in master, commit: 1f53edeaf9ea59dd55459a6d5a93829fb4983839
Issue is fixed.

Cheers,
Ionut C</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>