phase2: add hack to derive base feed url from buildroot
authorJo-Philipp Wich <jo@mein.io>
Tue, 3 Oct 2017 09:26:14 +0000 (11:26 +0200)
committerJo-Philipp Wich <jo@mein.io>
Tue, 3 Oct 2017 09:26:14 +0000 (11:26 +0200)
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
phase2/master.cfg

index 5fcf3d3fe2de57c16d489ea2422e011699841eca..49e8e7667e694ec06532d5c226fafbc838fa654b 100644 (file)
@@ -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