| |
@@ -78,8 +78,10 @@
|
| |
# Automatically close bugs when this marked as stable
|
| |
close_bugs=%(close_bugs)s
|
| |
|
| |
- # Suggest that users restart after update
|
| |
- suggest_reboot=%(suggest_reboot)s
|
| |
+ # Suggest that users performs one of the following actions after the update:
|
| |
+ # unspecified, restart, logout
|
| |
+ # The default value is unspecified
|
| |
+ suggest=%(suggest)s
|
| |
|
| |
# A boolean to require that all of the bugs in your update have been confirmed by testers.
|
| |
require_bugs=%(require_bugs)s
|
| |
@@ -245,12 +247,6 @@
|
| |
' automatically. If this is what you do not want, use this '
|
| |
'option to disable the default behavior.')
|
| |
update_parser.add_argument(
|
| |
- '--suggest-reboot',
|
| |
- action='store_true',
|
| |
- default=False,
|
| |
- dest='suggest_reboot',
|
| |
- help='Suggest user to reboot after update. Default is False.')
|
| |
- update_parser.add_argument(
|
| |
'--no-require-bugs',
|
| |
action='store_false',
|
| |
default=True,
|
| |
@@ -264,6 +260,21 @@
|
| |
dest='require_testcases',
|
| |
help='Disables the requirement that this update passes all test cases '
|
| |
'before reaching stable. Default is True.')
|
| |
+
|
| |
+ group = update_parser.add_mutually_exclusive_group()
|
| |
+ group.add_argument(
|
| |
+ '--suggest-reboot',
|
| |
+ action='store_true',
|
| |
+ default=False,
|
| |
+ dest='suggest_reboot',
|
| |
+ help='Suggest user to reboot after update. Default is False.')
|
| |
+ group.add_argument(
|
| |
+ '--suggest-logout',
|
| |
+ action='store_true',
|
| |
+ default=False,
|
| |
+ dest='suggest_logout',
|
| |
+ help='Suggest user to logout after update. Default is False.')
|
| |
+
|
| |
update_parser.set_defaults(command=self.update)
|
| |
|
| |
def get_distgit_namespaces(self):
|
| |
@@ -810,11 +821,16 @@
|
| |
'stable_karma': self.args.stable_karma,
|
| |
'unstable_karma': self.args.unstable_karma,
|
| |
'close_bugs': str(self.args.close_bugs),
|
| |
- 'suggest_reboot': str(self.args.suggest_reboot),
|
| |
+ 'suggest': 'unspecified',
|
| |
'require_bugs': str(self.args.require_bugs),
|
| |
'require_testcases': str(self.args.require_testcases),
|
| |
}
|
| |
|
| |
+ if self.args.suggest_reboot:
|
| |
+ bodhi_args['suggest'] = 'reboot'
|
| |
+ elif self.args.suggest_logout:
|
| |
+ bodhi_args['suggest'] = 'logout'
|
| |
+
|
| |
if self.args.update_type:
|
| |
bodhi_args['type_'] = self.args.update_type
|
| |
else:
|
| |
Option --suggest-logout was not implemented although it
is supported by Bodhi. This commit adds this option.
Jira: RHELCMP-8704
Fixes: https://pagure.io/fedpkg/issue/472
Signed-off-by: Dominik Rumian drumian@redhat.com