Commit 483409b4 authored by Lorenz Hüdepohl's avatar Lorenz Hüdepohl
Browse files

Option '--only-project' for mcpdf_setup_subproject

parent 5ebf4d54
......@@ -579,7 +579,7 @@ def parse_prjconf(api_url, project):
def mpcdf_setup_subproject(api_url, project, distribution, microarchitecture,
parent=None, dry_run=False, remove_old=False, all_possible=False):
parent=None, dry_run=False, remove_old=False, all_possible=False, only_project=False):
if parent and not dry_run:
for attribute in config_attributes + default_attributes:
......@@ -615,6 +615,7 @@ def mpcdf_setup_subproject(api_url, project, distribution, microarchitecture,
prjconf_ours.append("Constraint: hostlabel {0}".format(microarchitecture))
prjconf_ours.append("Preinstall: mpcdf_{0}_directory".format(microarchitecture))
prjconf_ours.append("PublishFilter: ^mpcdf_.*$")
prjconf_ours.append("")
extra_tags = dist_prjconf_tags(distribution)
......@@ -805,8 +806,9 @@ Macros:
# Create and remove the <enable/> flags before the new repsitories,
# that way no spurious builds are launched
print("Updating enabled repositories for all packages")
mpcdf_enable_repositories_for_all_packages(api_url, project)
if not only_project:
print("Updating enabled repositories for all packages")
mpcdf_enable_repositories_for_all_packages(api_url, project)
# Update repositories
print("Updating prj meta")
......
......@@ -11,6 +11,8 @@ import osc.cmdln
@osc.cmdln.option('-n', '--dry-run', action="store_true",
help="Do not actually run anything but output the resulting XML configuration")
@osc.cmdln.option('--only-project', action="store_true",
help="Do not actually run anything but output the resulting XML configuration")
@osc.cmdln.option('--remove-old', action="store_true", default=False,
help="Remove all obsolete repositories instead of only disabling builds for packages there")
@osc.cmdln.alias("mpcdf_setup_sub")
......@@ -49,4 +51,4 @@ def do_mpcdf_setup_subproject(self, subcmd, opts, *args):
mpcdf_setup_subproject(self.get_api_url(),
project, distribution, microarchitecture,
dry_run=opts.dry_run, remove_old=opts.remove_old)
dry_run=opts.dry_run, remove_old=opts.remove_old, only_project=opts.only_project)
Markdown is supported
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