From d5ea997f34503914c0dc48a4a8fd22c745322484 Mon Sep 17 00:00:00 2001 From: Jo-Philipp Wich Date: Tue, 3 Oct 2017 11:26:14 +0200 Subject: [PATCH] phase2: add hack to derive base feed url from buildroot Signed-off-by: Jo-Philipp Wich --- 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 -- 2.30.2