Skip to content
Snippets Groups Projects
Commit 483409b4 authored by Lorenz Hüdepohl's avatar Lorenz Hüdepohl
Browse files

Option '--only-project' for mcpdf_setup_subproject

parent 5ebf4d54
Branches
No related tags found
No related merge requests found
...@@ -579,7 +579,7 @@ def parse_prjconf(api_url, project): ...@@ -579,7 +579,7 @@ def parse_prjconf(api_url, project):
def mpcdf_setup_subproject(api_url, project, distribution, microarchitecture, 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: if parent and not dry_run:
for attribute in config_attributes + default_attributes: for attribute in config_attributes + default_attributes:
...@@ -615,6 +615,7 @@ def mpcdf_setup_subproject(api_url, project, distribution, microarchitecture, ...@@ -615,6 +615,7 @@ def mpcdf_setup_subproject(api_url, project, distribution, microarchitecture,
prjconf_ours.append("Constraint: hostlabel {0}".format(microarchitecture)) prjconf_ours.append("Constraint: hostlabel {0}".format(microarchitecture))
prjconf_ours.append("Preinstall: mpcdf_{0}_directory".format(microarchitecture)) prjconf_ours.append("Preinstall: mpcdf_{0}_directory".format(microarchitecture))
prjconf_ours.append("PublishFilter: ^mpcdf_.*$")
prjconf_ours.append("") prjconf_ours.append("")
extra_tags = dist_prjconf_tags(distribution) extra_tags = dist_prjconf_tags(distribution)
...@@ -805,6 +806,7 @@ Macros: ...@@ -805,6 +806,7 @@ Macros:
# Create and remove the <enable/> flags before the new repsitories, # Create and remove the <enable/> flags before the new repsitories,
# that way no spurious builds are launched # that way no spurious builds are launched
if not only_project:
print("Updating enabled repositories for all packages") print("Updating enabled repositories for all packages")
mpcdf_enable_repositories_for_all_packages(api_url, project) mpcdf_enable_repositories_for_all_packages(api_url, project)
......
...@@ -11,6 +11,8 @@ import osc.cmdln ...@@ -11,6 +11,8 @@ import osc.cmdln
@osc.cmdln.option('-n', '--dry-run', action="store_true", @osc.cmdln.option('-n', '--dry-run', action="store_true",
help="Do not actually run anything but output the resulting XML configuration") 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, @osc.cmdln.option('--remove-old', action="store_true", default=False,
help="Remove all obsolete repositories instead of only disabling builds for packages there") help="Remove all obsolete repositories instead of only disabling builds for packages there")
@osc.cmdln.alias("mpcdf_setup_sub") @osc.cmdln.alias("mpcdf_setup_sub")
...@@ -49,4 +51,4 @@ def do_mpcdf_setup_subproject(self, subcmd, opts, *args): ...@@ -49,4 +51,4 @@ def do_mpcdf_setup_subproject(self, subcmd, opts, *args):
mpcdf_setup_subproject(self.get_api_url(), mpcdf_setup_subproject(self.get_api_url(),
project, distribution, microarchitecture, 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)
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment