pass
def create_build_progress_dep_graph(build, obs_project, content):
- bp_id = content.get("build_project_id")
- sync_out_dir = os.path.join(os.getenv('WORKSPACE'), bp_id)
sync_dest_base = os.getenv('PATH_REPO_BASE')
- sync_dest = os.path.join(sync_dest_base,
- ".dep_graph",
- obs_project)
-
- print "sync_dest = %s" % sync_dest
-
- graph_root_dir = os.path.join(sync_out_dir)
- print "graph_root_dir = %s" % graph_root_dir
-
- #make directories if not existed.
- os.makedirs(sync_out_dir)
# copy vis and dep_graph dirs.
vis_sync_dest = os.path.join(sync_dest_base, ".dep_graph/vis")
repo = content.get("repo")
arch = content.get("arch")
+ graph_root_dir = os.path.join(os.getenv('WORKSPACE'), arch)
+ #make directories if not existed.
+ os.makedirs(graph_root_dir)
+ print "graph_root_dir = %s" % graph_root_dir
+
packages_to_be_built = [];
if re.match("^home:prerelease:", obs_project) or re.match("^home:trbs:", obs_project):
info=build.get_info(obs_project)
packages_to_be_built = info['packages']
xml = build.get_dependson(obs_project, repo, arch, None, None)
- graph_dest_dir = os.path.join(graph_root_dir, repo, arch)
- if not os.path.exists(graph_dest_dir):
- os.makedirs(graph_dest_dir)
- filename = os.path.join(graph_root_dir, repo, arch, "builddepinfo.xml")
+ filename = os.path.join(graph_root_dir, "builddepinfo.xml")
with open(filename, 'w') as xml_file:
xml_file.write(xml)
os.getenv("BUILDMONITOR_NAME"),
"0")
- make_dep_graph(filename, graph_dest_dir,
+ make_dep_graph(filename, graph_root_dir,
vis_dir, dep_graph_dir, template_filename,
packages_to_be_built)
+ sync_dest = os.path.join(sync_dest_base,
+ ".dep_graph",
+ obs_project,
+ content.get("build_project_id"),
+ repo)
+
+ print "sync_dest = %s" % sync_dest
+
# sync to donwload server
if os.path.exists(sync_dest):
shutil.rmtree(sync_dest)
os.makedirs(sync_dest)
- sync(sync_out_dir, sync_dest)
+ sync(graph_root_dir, sync_dest)
# make latest link
latest = os.path.join(sync_dest, "latest")
sync_dest = os.path.join(os.getenv('PATH_REPO_BASE'),
content['repo_path'],
- "build_data",
+ "builddata",
"depends")
print "sync_dest = %s" % sync_dest