[buildbot] phase2: add hack to derive base feed url from buildroot

LEDE Commits lede-commits at lists.infradead.org
Tue Oct 3 02:26:34 PDT 2017


jow pushed a commit to buildbot.git, branch master:
https://git.lede-project.org/d5ea997f34503914c0dc48a4a8fd22c745322484

commit d5ea997f34503914c0dc48a4a8fd22c745322484
Author: Jo-Philipp Wich <jo at mein.io>
AuthorDate: Tue Oct 3 11:26:14 2017 +0200

    phase2: add hack to derive base feed url from buildroot
    
    Signed-off-by: Jo-Philipp Wich <jo at mein.io>
---
 phase2/master.cfg | 24 +++++++++++++++++-------
 1 file changed, 17 insertions(+), 7 deletions(-)

diff --git a/phase2/master.cfg b/phase2/master.cfg
index 5fcf3d3..49e8e76 100644
--- a/phase2/master.cfg
+++ b/phase2/master.cfg
@@ -137,15 +137,25 @@ feedbranches = dict()
 from buildbot.changes.gitpoller import GitPoller
 c['change_source'] = []
 
+def parse_feed_entry(line):
+	parts = line.strip().split()
+	if parts[0] == "src-git":
+		feeds.append(parts)
+		url = parts[2].strip().split(';')
+		branch = url[1] if len(url) > 1 else 'master'
+		feedbranches[url[0]] = branch
+		c['change_source'].append(GitPoller(url[0], branch=branch, workdir='%s/%s.git' %(os.getcwd(), parts[1]), pollinterval=300))
+
+make = subprocess.Popen(['make', '--no-print-directory', '-C', home_dir+'/source.git/target/sdk/', 'val.BASE_FEED'],
+	env = dict(os.environ, TOPDIR=home_dir+'/source.git'), stdout = subprocess.PIPE)
+
+line = make.stdout.readline()
+if line:
+	parse_feed_entry(line)
+
 with open(home_dir+'/source.git/feeds.conf.default', 'r') as f:
 	for line in f:
-		parts = line.strip().split()
-		if parts[0] == "src-git":
-			feeds.append(parts)
-			url = parts[2].strip().split(';')
-			branch = url[1] if len(url) > 1 else 'master'
-			feedbranches[url[0]] = branch
-			c['change_source'].append(GitPoller(url[0], branch=branch, workdir='%s/%s.git' %(os.getcwd(), parts[1]), pollinterval=300))
+		parse_feed_entry(line)
 
 
 ####### SCHEDULERS



More information about the lede-commits mailing list