mirror of
https://git.yoctoproject.org/poky
synced 2026-04-11 08:02:21 +02:00
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>
This commit is contained in:
@@ -876,18 +876,16 @@ def check_sanity_everybuild(status, d):
|
||||
'git', 'gitsm', 'hg', 'osc', 'p4', 'svn', \
|
||||
'bzr', 'cvs', 'npm', 'sftp', 'ssh']
|
||||
for mirror_var in mirror_vars:
|
||||
mirrors = (d.getVar(mirror_var) or '').replace('\\n', '\n').split('\n')
|
||||
for mirror_entry in mirrors:
|
||||
mirror_entry = mirror_entry.strip()
|
||||
if not mirror_entry:
|
||||
# ignore blank lines
|
||||
continue
|
||||
mirrors = (d.getVar(mirror_var) or '').replace('\\n', ' ').split()
|
||||
|
||||
try:
|
||||
pattern, mirror = mirror_entry.split()
|
||||
except ValueError:
|
||||
bb.warn('Invalid %s: %s, should be 2 members.' % (mirror_var, mirror_entry.strip()))
|
||||
continue
|
||||
# Split into pairs
|
||||
if len(mirrors) % 2 != 0:
|
||||
bb.warn('Invalid mirror variable value for %s: %s, should contain paired members.' % (mirror_var, mirrors.strip()))
|
||||
continue
|
||||
mirrors = list(zip(*[iter(mirrors)]*2))
|
||||
|
||||
for mirror_entry in mirrors:
|
||||
pattern, mirror = mirror_entry
|
||||
|
||||
decoded = bb.fetch2.decodeurl(pattern)
|
||||
try:
|
||||
|
||||
Reference in New Issue
Block a user