From: Jo-Philipp Wich Date: Tue, 3 Oct 2017 09:26:14 +0000 (+0200) Subject: phase2: add hack to derive base feed url from buildroot X-Git-Tag: v1~169 X-Git-Url: http://git.lede-project.org./?a=commitdiff_plain;h=d5ea997f34503914c0dc48a4a8fd22c745322484;p=buildbot.git phase2: add hack to derive base feed url from buildroot Signed-off-by: Jo-Philipp Wich --- 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