<?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>8476</bug_id>
          
          <creation_ts>2015-10-09 22:29:31 +0000</creation_ts>
          <short_desc>mysql port must be specified in settings.py even though marked as optional</short_desc>
          <delta_ts>2016-01-08 09:51:06 +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>2.1</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>Low</priority>
          <bug_severity>normal</bug_severity>
          <target_milestone>2.1</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Michael Wood">michael.g.wood</reporter>
          <assigned_to name="Elliot Smith">elliot.smith</assigned_to>
          <cc>belen.barros.pena</cc>
    
    <cc>bogdanx.a.voiculescu</cc>
    
    <cc>jessica.zhang</cc>
    
    <cc>stanciux.mihail</cc>
          
          <qa_contact name="Alexandru Roman">alexandru.costinx.roman</qa_contact>
          <cf_os>---</cf_os>
          <cf_regression_type>---</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>55136</commentid>
    <comment_count>0</comment_count>
    <who name="Michael Wood">michael.g.wood</who>
    <bug_when>2015-10-09 22:29:31 +0000</bug_when>
    <thetext>The DATABASE_URL environ variable seems to be set/used by bitbake

If you do as advised/supported by django/db backend and leave the port as an empty string then the DATABASE_URL regex match goes wrong and bitbake refuses to start.

toastermain/settings.py
...
        &apos;HOST&apos;: &apos;localhost&apos;, 
        &apos;PORT&apos;: &apos;3306&apos;,                      # Set to empty string for default.
    }


...

    elif dburl.startswith(&apos;mysql://&apos;):

        # URL must be in this form: mysql://user:pass@host:port/name
        result = re.match(r&quot;mysql://([^:]*):([^@]*)@([^:]*):(\d+)/([^/]*)&quot;, dburl)
        if result is None:
            raise Exception(&quot;ERROR: Could not read mysql database url: %s&quot; % dburl)</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>57533</commentid>
    <comment_count>1</comment_count>
    <who name="Michael Wood">michael.g.wood</who>
    <bug_when>2016-01-05 15:34:30 +0000</bug_when>
    <thetext>commit c464f34d5bd3aa4119aa3d1591ee7d55afe9b35f
Author: Elliot Smith &lt;elliot.smith@intel.com&gt;
Date:   Wed Dec 9 19:56:37 2015 -0800

    bitbake: toaster: Amend regex for MySQL database URLs
    
    The database URL detection doesn&apos;t admit a MySQL URL without a port.
    
    As this is a common case (e.g. you would set the HOST to a mysql.sock
    path if pointing at a local MySQL server, with no port setting),
    amend the regex so it will correctly recognise paths, as well
    as HOST:PORT URLs.

    (Bitbake rev: 89386aab888f806d5aa4a8083c06566e48d9445b)</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>57665</commentid>
    <comment_count>2</comment_count>
    <who name="Alexandru Roman">alexandru.costinx.roman</who>
    <bug_when>2016-01-08 09:51:06 +0000</bug_when>
    <thetext>Verified on master: 0f3ad7c77aa0f8bb7641af1886e1420cdfa8419f</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>