[yocto] [Yocto Autobuilder][PATCH 1/2] Autobuilder: fix SingleBranchScheduler to look at any repo

californialsullivan at gmail.com californialsullivan at gmail.com
Thu Dec 11 10:02:14 PST 2014


From: California Sullivan <california.l.sullivan at intel.com>

Previously, it could only look at the repo at the zero index, which was
usually poky. If the scheduler's 'repository' field did not match this,
the scheduler would immediately exit without being added. This change
makes it looks through all listed repos for a match.

Signed-off-by: California Sullivan <california.l.sullivan at intel.com>
---
 lib/python2.7/site-packages/autobuilder/Autobuilder.py | 12 ++++++++++--
 1 file changed, 10 insertions(+), 2 deletions(-)

diff --git a/lib/python2.7/site-packages/autobuilder/Autobuilder.py b/lib/python2.7/site-packages/autobuilder/Autobuilder.py
index 7febfae..32c6128 100644
--- a/lib/python2.7/site-packages/autobuilder/Autobuilder.py
+++ b/lib/python2.7/site-packages/autobuilder/Autobuilder.py
@@ -202,8 +202,16 @@ class Autobuilder:
                             continue
 
                         reponame = value['repository']
-                        repos = dict(ast.literal_eval(self.configdict[key]['repos'])[0])
-                        if not repos.has_key(reponame):
+                        repos=None
+                        repo=None
+
+                        for x in ast.literal_eval(self.configdict[key]['repos']):
+                            if dict(x).has_key(reponame):
+                                repos=x
+                                repo=repos[reponame]
+                                break
+
+                        if repo is None:
                             log.msg("No repo %s found" % reponame)
                             continue
 
-- 
1.9.3




More information about the yocto mailing list