Hello community, here is the log from the commit of package openSUSE-release-tools for openSUSE:Factory checked in at 2018-09-19 14:31:24 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/openSUSE-release-tools (Old) and /work/SRC/openSUSE:Factory/.openSUSE-release-tools.new (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Package is "openSUSE-release-tools" Wed Sep 19 14:31:24 2018 rev:132 rq:636473 version:20180918.aeb3b8c Changes: -------- --- /work/SRC/openSUSE:Factory/openSUSE-release-tools/openSUSE-release-tools.changes 2018-09-17 14:26:50.471761848 +0200 +++ /work/SRC/openSUSE:Factory/.openSUSE-release-tools.new/openSUSE-release-tools.changes 2018-09-19 14:33:24.151301955 +0200 @@ -1,0 +2,9 @@ +Tue Sep 18 21:23:12 UTC 2018 - opensuse-releaseteam@opensuse.org + +- Update to version 20180918.aeb3b8c: + * ReviewBots: utilize delete_package check where it was already assumed. + * check_source: split out delete repository check to new sub action check. + * check_source: decline all delete project requests. + * ReviewBot: break down sub-types of delete requests. + +------------------------------------------------------------------- Old: ---- openSUSE-release-tools-20180914.628c1a1.obscpio New: ---- openSUSE-release-tools-20180918.aeb3b8c.obscpio ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ openSUSE-release-tools.spec ++++++ --- /var/tmp/diff_new_pack.4oKO7D/_old 2018-09-19 14:33:26.099300641 +0200 +++ /var/tmp/diff_new_pack.4oKO7D/_new 2018-09-19 14:33:26.099300641 +0200 @@ -20,7 +20,7 @@ %define source_dir openSUSE-release-tools %define announcer_filename factory-package-news Name: openSUSE-release-tools -Version: 20180914.628c1a1 +Version: 20180918.aeb3b8c Release: 0 Summary: Tools to aid in staging and release work for openSUSE/SUSE License: GPL-2.0-or-later AND MIT ++++++ _servicedata ++++++ --- /var/tmp/diff_new_pack.4oKO7D/_old 2018-09-19 14:33:26.139300613 +0200 +++ /var/tmp/diff_new_pack.4oKO7D/_new 2018-09-19 14:33:26.143300611 +0200 @@ -1,6 +1,6 @@ <servicedata> <service name="tar_scm"> <param name="url">https://github.com/openSUSE/openSUSE-release-tools.git</param> - <param name="changesrevision">5c410b7c76aa85b5a0eb6b0859717f1e0aefe9c4</param> + <param name="changesrevision">406fc41a851a594f3cbcfa11b7afe9d793de3203</param> </service> </servicedata> ++++++ openSUSE-release-tools-20180914.628c1a1.obscpio -> openSUSE-release-tools-20180918.aeb3b8c.obscpio ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/openSUSE-release-tools-20180914.628c1a1/ReviewBot.py new/openSUSE-release-tools-20180918.aeb3b8c/ReviewBot.py --- old/openSUSE-release-tools-20180914.628c1a1/ReviewBot.py 2018-09-14 23:09:10.000000000 +0200 +++ new/openSUSE-release-tools-20180918.aeb3b8c/ReviewBot.py 2018-09-18 23:17:44.000000000 +0200 @@ -344,10 +344,7 @@ # Store in-case sub-classes need direct access to original values. self.action = a - fn = 'check_action_%s'%a.type - if not hasattr(self, fn): - fn = 'check_action__default' - func = getattr(self, fn) + func = getattr(self, self.action_method(a)) ret = func(req, a) # In the case of multiple actions take the "lowest" result where the @@ -359,6 +356,30 @@ return overall + def action_method(self, action): + method_prefix = 'check_action' + method_type = action.type + method_suffix = None + + if method_type == 'delete': + method_suffix = 'project' + if action.tgt_package is not None: + method_suffix = 'package' + elif action.tgt_repository is not None: + method_suffix = 'repository' + + if method_suffix: + method = '_'.join([method_prefix, method_type, method_suffix]) + if hasattr(self, method): + return method + + method = '_'.join([method_prefix, method_type]) + if hasattr(self, method): + return method + + method_type = '_default' + return '_'.join([method_prefix, method_type]) + @staticmethod def _is_patchinfo(pkgname): return pkgname == 'patchinfo' or pkgname.startswith('patchinfo.') diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/openSUSE-release-tools-20180914.628c1a1/check_maintenance_incidents.py new/openSUSE-release-tools-20180918.aeb3b8c/check_maintenance_incidents.py --- old/openSUSE-release-tools-20180914.628c1a1/check_maintenance_incidents.py 2018-09-14 23:09:10.000000000 +0200 +++ new/openSUSE-release-tools-20180918.aeb3b8c/check_maintenance_incidents.py 2018-09-18 23:17:44.000000000 +0200 @@ -129,7 +129,7 @@ return True - def check_action_delete(self, req, a): + def check_action_delete_package(self, req, a): self._check_maintainer_review_needed(req, a) return True diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/openSUSE-release-tools-20180914.628c1a1/check_source.py new/openSUSE-release-tools-20180918.aeb3b8c/check_source.py --- old/openSUSE-release-tools-20180914.628c1a1/check_source.py 2018-09-14 23:09:10.000000000 +0200 +++ new/openSUSE-release-tools-20180918.aeb3b8c/check_source.py 2018-09-18 23:17:44.000000000 +0200 @@ -251,19 +251,9 @@ self.review_messages['declined'] = message return False - def check_action_delete(self, request, action): + def check_action_delete_package(self, request, action): self.target_project_config(action.tgt_project) - if action.tgt_repository is not None: - if action.tgt_project.startswith('openSUSE:'): - self.review_messages['declined'] = 'The repositories in the openSUSE:* namespace ' \ - 'are managed by the Release Managers. For suggesting changes, send a mail ' \ - 'to opensuse-releaseteam@opensuse.org with an explanation of why the change ' \ - 'makes sense.' - return False - else: - self.review_messages['accepted'] = 'unhandled: removing repository' - return True try: result = osc.core.show_project_sourceinfo(self.apiurl, action.tgt_project, True, (action.tgt_package)) root = ET.fromstring(result) @@ -296,6 +286,23 @@ self.review_messages['declined'] = "This is an incorrect request, it's a linked package to %s/%s" % (linked_project, linked_package) return False + def check_action_delete_project(self, request, action): + # Presumably if the request is valid the bot should be disabled or + # overridden, but seems like no valid case for allowing this (see #1696). + self.review_messages['declined'] = 'Deleting the {} project is not allowed.'.format(action.tgt_project) + return False + + def check_action_delete_repository(self, request, action): + if action.tgt_project.startswith('openSUSE:'): + self.review_messages['declined'] = 'The repositories in the openSUSE:* namespace ' \ + 'are managed by the Release Managers. For suggesting changes, send a mail ' \ + 'to opensuse-releaseteam@opensuse.org with an explanation of why the change ' \ + 'makes sense.' + return False + + self.review_messages['accepted'] = 'unhandled: removing repository' + return True + class CommandLineInterface(ReviewBot.CommandLineInterface): def __init__(self, *args, **kwargs): diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/openSUSE-release-tools-20180914.628c1a1/repo_checker.py new/openSUSE-release-tools-20180918.aeb3b8c/repo_checker.py --- old/openSUSE-release-tools-20180914.628c1a1/repo_checker.py 2018-09-14 23:09:10.000000000 +0200 +++ new/openSUSE-release-tools-20180918.aeb3b8c/repo_checker.py 2018-09-18 23:17:44.000000000 +0200 @@ -546,7 +546,7 @@ self.review_messages['accepted'] = 'cycle and install check passed' return True - def check_action_delete(self, request, action): + def check_action_delete_package(self, request, action): # TODO Ignore tgt_project packages that depend on this that are part of # ignore list as and instead look at output from staging for those. ++++++ openSUSE-release-tools.obsinfo ++++++ --- /var/tmp/diff_new_pack.4oKO7D/_old 2018-09-19 14:33:26.779300182 +0200 +++ /var/tmp/diff_new_pack.4oKO7D/_new 2018-09-19 14:33:26.779300182 +0200 @@ -1,5 +1,5 @@ name: openSUSE-release-tools -version: 20180914.628c1a1 -mtime: 1536959350 -commit: 628c1a107d1928793cd54204e4c109a6d793e0b6 +version: 20180918.aeb3b8c +mtime: 1537305464 +commit: aeb3b8ce4d601ee5dcbd5f371ee2ed115dd34779