Commit 4d34c77e authored by Lorenz Hüdepohl's avatar Lorenz Hüdepohl
Browse files

Add lots of apiurl= arguments

No with more than one configured API url on my .oscrc it becomes
apparent that this argument was erroneously omitted in the past in many
parent 6bb1d774
Pipeline #71256 failed with stage
in 52 seconds
......@@ -514,7 +514,7 @@ def mpcdf_enable_repositories(api_url, project, package, verbose=False, dry_run=
if dry_run:
print("osc meta pkg {0} {1} -F - <<EOF\n{2}\nEOF\n".format(project, package, new_pkg_meta))
osc.core.edit_meta("pkg", (project, package), data=new_pkg_meta)
osc.core.edit_meta("pkg", (project, package), data=new_pkg_meta, apiurl=api_url)
elif dry_run:
print("Would not do anything, package meta would be unchanged")
......@@ -758,7 +758,7 @@ Macros:
print("prjconf unchanged")
print("Updating prjconf meta")
osc.core.edit_meta("prjconf", project, data=new_prjconf)
osc.core.edit_meta("prjconf", project, data=new_prjconf, apiurl=api_url)
# Create and remove the <enable/> flags before the new repsitories,
# that way no spurious builds are launched
......@@ -767,7 +767,7 @@ Macros:
# Update repositories
print("Updating prj meta")
osc.core.edit_meta("prj", project, data=new_prj, force=True)
osc.core.edit_meta("prj", project, data=new_prj, force=True, apiurl=api_url)
def mpcdf_enable_repositories_for_all_packages(api_url, project, ignore_repos=()):
......@@ -899,7 +899,7 @@ def sync_projects(api_url, package=None, from_project="software", to_projects=No
person.set("userid", userid)
person.set("role", "maintainer")
to_meta.insert(2, person)
osc.core.edit_meta("pkg", (to_project, orig_package), data=ElementTree.tostring(to_meta))
osc.core.edit_meta("pkg", (to_project, orig_package), data=ElementTree.tostring(to_meta), apiurl=api_url)
if package is None and redo_all:
# Check if distribution is already set in to_project
......@@ -112,7 +112,7 @@ def do_mpcdf_push(self, subcmd, opts, *args):
person.set("userid", user)
person.set("role", "maintainer")
to_meta.insert(2, person)
osc.core.edit_meta("pkg", (to_project, package), data=ElementTree.tostring(to_meta))
osc.core.edit_meta("pkg", (to_project, package), data=ElementTree.tostring(to_meta), apiurl=api_url)
# Give the system some time, sadly there is no transactional guarantee
......@@ -81,4 +81,4 @@ def do_mpcdf_setup_cluster_project(self, subcmd, opts, *args):
prjconf = prjconf_head + "\n".join(prjconf) + prjconf_tail
osc.core.edit_meta("prjconf", "clusters", data=prjconf)
osc.core.edit_meta("prjconf", "clusters", data=prjconf, apiurl=api_url)
......@@ -76,7 +76,7 @@ def do_mpcdf_setup_software_project(self, subcmd, opts, *args):
if opts.dry_run:
print("osc meta prjconf software -F - <<EOF\n{0}\nEOF\n".format(prjconf))
osc.core.edit_meta("prjconf", "software", data=prjconf)
osc.core.edit_meta("prjconf", "software", data=prjconf, apiurl=api_url)
if opts.ignore_repo:
ignore_repos = opts.ignore_repo
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment