diff options
author | Richard Purdie <richard.purdie@linuxfoundation.org> | 2017-03-03 00:13:01 +0000 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2017-03-03 00:17:50 +0000 |
commit | 044fb04dbe69313ee6908bf4d3cee7f797d0c41c (patch) | |
tree | 506f547ff70db400ed51f37223576115557d3969 /lib | |
parent | 3ce6169afa646ef2b847e5fbabfe0191c93928b7 (diff) | |
download | bitbake-044fb04dbe69313ee6908bf4d3cee7f797d0c41c.tar.gz |
fetch2: Allow whitespace only mirror entries
Forcing the use of "\n" in mirror variables is pointless, we can just require that
there are pairs of values.
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'lib')
-rw-r--r-- | lib/bb/fetch2/__init__.py | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/lib/bb/fetch2/__init__.py b/lib/bb/fetch2/__init__.py index 760e24f03..672f1095d 100644 --- a/lib/bb/fetch2/__init__.py +++ b/lib/bb/fetch2/__init__.py @@ -538,7 +538,11 @@ def fetcher_compare_revisions(): return False def mirror_from_string(data): - return [ i.split() for i in (data or "").replace('\\n','\n').split('\n') if i ] + mirrors = (data or "").replace('\\n',' ').split() + # Split into pairs + if len(mirrors) % 2 != 0: + bb.warn('Invalid mirror data %s, should have paired members.' % data) + return list(zip(*[iter(mirrors)]*2)) def verify_checksum(ud, d, precomputed={}): """ |