Bug 8645 - fetch.decodeurl throws exception with trailing ; in URL
Summary: fetch.decodeurl throws exception with trailing ; in URL
Status: RESOLVED FIXED
Alias: None
Product: BitBake
Classification: Build System, Metadata & Runtime
Component: bitbake (show other bugs)
Version: 2.0
Hardware: x86 Multiple
: Low normal
Target Milestone: 2.1
Assignee: Paul Eggleton
QA Contact:
URL:
Whiteboard:
Depends on:
Blocks:
 
Reported: 2015-11-04 20:54 UTC by Ross Burton
Modified: 2015-11-17 17:28 UTC (History)
2 users (show)

See Also:
OS type for building Yocto: ---
Type of Regression: ---
Verified:
Documentation change: No (bug/feature does not impact docs)


Attachments

Note You need to log in before you can comment on or make changes to this bug.
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.