repository = []
arch_list= {}
path_prj_list= {}
+ disable_repo_arch = []
obs_meta_file = prjdir + '/' + obs_prj + '/_meta'
lines = open(obs_meta_file).readlines()
for line in lines:
+ if line.find('<disable arch=') != -1:
+ disable_repo=line.split('repository="')[1].split('"')[0]
+ disable_arch=line.split('arch="')[1].split('"')[0]
+ disable_repo_arch.append(disable_repo+"##"+disable_arch)
if line.find('repository name=') != -1:
repo_tmp=line.split('"')[1]
repository.append(repo_tmp)
path_prj_list[repo_tmp] = []
if line.find('<arch>') != -1:
arch_tmp = line.split("<arch>")[1].split("</arch>")[0]
- arch_list[repo_tmp].append(arch_tmp)
+ if repo_tmp+"##"+arch_tmp not in disable_repo_arch:
+ arch_list[repo_tmp].append(arch_tmp)
if line.find('path project=') != -1:
path_prj_arch = line.split('"')[1]+'##'+line.split('"')[3]
path_prj_list[repo_tmp].append(path_prj_arch)
profile_list=os.listdir(self.build_root+'/local/repos/')
for profile in profile_list:
- if profile.find(repo) != -1:
+ if profile.find(repo.replace('-','_')) != -1:
profile_path=profile
index_file=self.build_root+'/local/repos/'+profile_path+'/'+arch+'/index.html'
redis_port = int(os.getenv("REDIS_PORT"))
backenddb = BackendDB(redis_host, redis_port)
+ #clear live root except current build_id results
+ build_id_liverepo = live_repo_base
+ for subdir in project.split(':'):
+ if subdir != project.split(':')[-1]:
+ build_id_liverepo=os.path.join(build_id_liverepo,subdir+':')
+ else:
+ build_id_liverepo=os.path.join(build_id_liverepo,subdir)
+ print "build_id_liverepo = %s" %build_id_liverepo
+ cmd = 'rm -rf `find '+build_id_liverepo+\
+ ' ! -name '+os.path.basename(build_id_liverepo)+\
+ ' | grep -v '+gbsbuild_dic['gbsbuild_tag'].split('/')[1]+'`'
+ print "clear live root command: %s" %cmd
+ subprocess.call(cmd, stdout=sys.stdout,stderr=sys.stderr, shell=True)
+
if buildmonitor_enabled:
gbs_update_data = {"tag" : gbsbuild_dic['gbsbuild_tag'],
"mode" : "snapshot_started"}