[gnome-continuous-yocto/gnomeostree-3.28-rocko: 4892/8267] sanity: Allow whitespace only mirror entries
- From: Emmanuele Bassi <ebassi src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-continuous-yocto/gnomeostree-3.28-rocko: 4892/8267] sanity: Allow whitespace only mirror entries
- Date: Sun, 17 Dec 2017 02:40:26 +0000 (UTC)
commit 85188262f72edf09db376b5e8a1df9061caa9f6d
Author: Richard Purdie <richard purdie linuxfoundation org>
Date: 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.
(From OE-Core rev: 7313b10e242da9225211ca9fd53d14a121c5fa42)
Signed-off-by: Richard Purdie <richard purdie linuxfoundation org>
meta/classes/sanity.bbclass | 20 +++++++++-----------
1 files 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:
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]