[oe-commits] [openembedded-core] branch master updated: sanity: Allow whitespace only mirror entries
git at git.openembedded.org
git at git.openembedded.org
Fri Mar 3 00:20:01 UTC 2017
This is an automated email from the git hooks/post-receive script.
rpurdie pushed a commit to branch master
in repository openembedded-core.
The following commit(s) were added to refs/heads/master by this push:
new 7313b10 sanity: Allow whitespace only mirror entries
7313b10 is described below
commit 7313b10e242da9225211ca9fd53d14a121c5fa42
Author: Richard Purdie <richard.purdie at linuxfoundation.org>
AuthorDate: Fri Mar 3 00:12:49 2017 +0000
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.
Signed-off-by: Richard Purdie <richard.purdie at linuxfoundation.org>
---
meta/classes/sanity.bbclass | 20 +++++++++-----------
1 file changed, 9 insertions(+), 11 deletions(-)
diff --git a/meta/classes/sanity.bbclass b/meta/classes/sanity.bbclass
index 8935df8..1fe172f 100644
--- a/meta/classes/sanity.bbclass
+++ b/meta/classes/sanity.bbclass
@@ -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:
--
To stop receiving notification emails like this one, please contact
the administrator of this repository.
More information about the Openembedded-commits
mailing list