summaryrefslogtreecommitdiffstats
path: root/meta/classes/sanity.bbclass
diff options
context:
space:
mode:
authorRichard Purdie <richard.purdie@linuxfoundation.org>2017-03-03 00:12:49 +0000
committerRichard Purdie <richard.purdie@linuxfoundation.org>2017-03-03 00:19:37 +0000
commit85188262f72edf09db376b5e8a1df9061caa9f6d (patch)
treeeeb182cb0602345d9838829146c22cffbab7fb50 /meta/classes/sanity.bbclass
parentea2fd77ba5c5482dac4682381d82a76cc30391fa (diff)
downloadpoky-85188262f72edf09db376b5e8a1df9061caa9f6d.tar.gz
sanity: 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. With the bitbake restriction relaxed, we can relax the sanity check too. (From OE-Core rev: 7313b10e242da9225211ca9fd53d14a121c5fa42) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/classes/sanity.bbclass')
-rw-r--r--meta/classes/sanity.bbclass20
1 files changed, 9 insertions, 11 deletions
diff --git a/meta/classes/sanity.bbclass b/meta/classes/sanity.bbclass
index 8935df8bd8..1fe172f8b2 100644
--- a/meta/classes/sanity.bbclass
+++ b/meta/classes/sanity.bbclass
@@ -876,18 +876,16 @@ def check_sanity_everybuild(status, d):
876 'git', 'gitsm', 'hg', 'osc', 'p4', 'svn', \ 876 'git', 'gitsm', 'hg', 'osc', 'p4', 'svn', \
877 'bzr', 'cvs', 'npm', 'sftp', 'ssh'] 877 'bzr', 'cvs', 'npm', 'sftp', 'ssh']
878 for mirror_var in mirror_vars: 878 for mirror_var in mirror_vars:
879 mirrors = (d.getVar(mirror_var) or '').replace('\\n', '\n').split('\n') 879 mirrors = (d.getVar(mirror_var) or '').replace('\\n', ' ').split()
880 for mirror_entry in mirrors:
881 mirror_entry = mirror_entry.strip()
882 if not mirror_entry:
883 # ignore blank lines
884 continue
885 880
886 try: 881 # Split into pairs
887 pattern, mirror = mirror_entry.split() 882 if len(mirrors) % 2 != 0:
888 except ValueError: 883 bb.warn('Invalid mirror variable value for %s: %s, should contain paired members.' % (mirror_var, mirrors.strip()))
889 bb.warn('Invalid %s: %s, should be 2 members.' % (mirror_var, mirror_entry.strip())) 884 continue
890 continue 885 mirrors = list(zip(*[iter(mirrors)]*2))
886
887 for mirror_entry in mirrors:
888 pattern, mirror = mirror_entry
891 889
892 decoded = bb.fetch2.decodeurl(pattern) 890 decoded = bb.fetch2.decodeurl(pattern)
893 try: 891 try: