] = result.get('state')
return targets
+ def get_repo_config(self, project, repo):
+ """
+ get_repo_config(project) -> string
+
+ Get buliding config of repo
+ """
+ return ''.join(core.get_buildconfig(self.apiurl, project, repo))
+
def get_targets(self, project):
"""
get_targets(project) -> list
Raises:
LocalError if can't create repos or can't find image configurations
"""
+
try:
snapshot = Snapshot(backenddb, base_path, obs_project=project)
except SnapshotError, err:
for repo in targets:
repomaker = RepoMaker(snapshot.build_id, snapshot.path)
+ # Get specific repo buildconf from OBS, put the buildconf together with
+ # repo-md
+ if not buildconf:
+ build = BuildService(os.getenv("OBS_API_URL"),
+ os.getenv("OBS_API_USERNAME"),
+ os.getenv("OBS_API_PASSWD"))
+ buildconf = build.get_repo_config(project, repo['Name'])
+
try:
repomaker.add_repo(live_repo_path, repo['Name'],
repo['Architectures'],
return 0
- # Get buildconf from OBS, put the buildconf together with repo-md
- buildconf_str = build.get_project_config(project)
-
# whether project is not enabled
if not snapshot_project_enabled(backenddb, project):
print "Skipping, project isn't found in repo.yaml"
return 0
- repo_data = make_repo(project, backenddb, base_path, live_repo_base,
- buildconf = buildconf_str)
+ repo_data = make_repo(project, backenddb, base_path, live_repo_base)
# update/create the latest repo link
make_latest_link(os.path.join(base_path, repo_data['repo_path']))