Bug 8645

Summary: fetch.decodeurl throws exception with trailing ; in URL
Product: [Build System, Metadata & Runtime] BitBake Reporter: Ross Burton <ross.burton>
Component: bitbakeAssignee: Paul Eggleton <bluelightning>
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: Low CC: poky.bs.watcher, poky.watcher
Version: 2.0   
Target Milestone: 2.1   
Hardware: x86   
OS: Multiple   
Whiteboard:
OS type for building Yocto: --- Type of Regression: ---
Verified: Documentation change: No (bug/feature does not impact docs)

Description Ross Burton 2015-11-04 20:54:24 UTC
File: 'do_checkpkg', lineno: 15, function: do_checkpkg
     0011:
     0012:        """first check whether a uri is provided"""
     0013:        src_uri = d.getVar('SRC_URI', True)
     0014:        if src_uri:
 *** 0015:            uri_type, _, _, _, _, _ = decodeurl(src_uri)
     0016:        else:
     0017:            uri_type = "none"
     0018:
     0019:        """initialize log files."""
File: '/home/ross/Yocto/poky/bitbake/lib/bb/fetch2/__init__.py', lineno: 397, function: decodeurl
     0393:    if parm:
     0394:        for s in parm.split(';'):
     0395:            if s:
     0396:                if not '=' in s:
 *** 0397:                    raise MalformedUrl(url, "The URL: '%s' is invalid: parameter %s does not specify a value (missing '=')" % (url, s))
     0398:                s1, s2 = s.split('=')
     0399:                p[s1] = s2
     0400:
     0401:    return type, host, urllib.unquote(path), user, pswd, p
Exception: MalformedUrl: The URL: 'git://git.yoctoproject.org/linux-yocto-4.1.git;name=machine;branch=standard/base;            git://git.yoctoproject.org/yocto-kernel-cache;type=kmeta;name=meta;branch=yocto-4.1;destsuffix=kernel-meta' is invalid: parameter             git://git.yoctoproject.org/yocto-kernel-cache does not specify a value (missing '=')

(running checkpkg on linux-yocto-4.1)

Looks like the trailing ; in the first URL confused the parser?
Comment 1 Paul Eggleton 2015-11-05 16:23:15 UTC
I have a patch here for this issue sitting on a branch from 2013 (!) that I neglected to send, so this should be easy.
Comment 2 Paul Eggleton 2015-11-06 12:15:52 UTC
Actually this isn't what I thought it was - it's actually caused by the function in question within distrodata.bbclass not splitting SRC_URI. I'll send a patch.