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:19:37 +0000 |
commit | da6652b526c461c77417385802306e802084d992 (patch) | |
tree | 17c3c7f627b9fc58a971877650b708ba1a6553d5 /bitbake/lib | |
parent | 85188262f72edf09db376b5e8a1df9061caa9f6d (diff) | |
download | poky-da6652b526c461c77417385802306e802084d992.tar.gz |
bitbake: 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.
(Bitbake rev: 044fb04dbe69313ee6908bf4d3cee7f797d0c41c)
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'bitbake/lib')
-rw-r--r-- | bitbake/lib/bb/fetch2/__init__.py | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/bitbake/lib/bb/fetch2/__init__.py b/bitbake/lib/bb/fetch2/__init__.py index 760e24f039..672f1095dc 100644 --- a/bitbake/lib/bb/fetch2/__init__.py +++ b/bitbake/lib/bb/fetch2/__init__.py | |||
@@ -538,7 +538,11 @@ def fetcher_compare_revisions(): | |||
538 | return False | 538 | return False |
539 | 539 | ||
540 | def mirror_from_string(data): | 540 | def mirror_from_string(data): |
541 | return [ i.split() for i in (data or "").replace('\\n','\n').split('\n') if i ] | 541 | mirrors = (data or "").replace('\\n',' ').split() |
542 | # Split into pairs | ||
543 | if len(mirrors) % 2 != 0: | ||
544 | bb.warn('Invalid mirror data %s, should have paired members.' % data) | ||
545 | return list(zip(*[iter(mirrors)]*2)) | ||
542 | 546 | ||
543 | def verify_checksum(ud, d, precomputed={}): | 547 | def verify_checksum(ud, d, precomputed={}): |
544 | """ | 548 | """ |