From: Zac Medico Date: Thu, 18 Jul 2013 20:23:02 +0000 (-0700) Subject: emerge --resume: reject atom or set arguments X-Git-Tag: v2.2.0_alpha189~45 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=6e66def727088b3322538444c582951243fc3741;p=portage.git emerge --resume: reject atom or set arguments It is an error to provide atoms or sets as arguments to --resume, since the arguments from the resumed command are used instead. --- diff --git a/man/emerge.1 b/man/emerge.1 index 609020251..da6bcbab7 100644 --- a/man/emerge.1 +++ b/man/emerge.1 @@ -202,9 +202,11 @@ generate and distribute cache for use by others, use \fBegencache\fR(1). .TP .BR "\-\-resume" (\fB\-r\fR) Resumes the most recent merge list that has been aborted due to an error. -This re\-uses the options that were given with the original +This re\-uses the arguments and options that were given with the original command that's being resumed, and the user may also provide -additional options when calling \fB\-\-resume\fR. +additional options when calling \fB\-\-resume\fR. It is an error to provide +atoms or sets as arguments to \fB\-\-resume\fR, since the arguments from the +resumed command are used instead. Please note that this operation will only return an error on failure. If there is nothing for portage to do, then portage will exit with a message and a success condition. A resume list will persist until it has been completed in diff --git a/pym/_emerge/actions.py b/pym/_emerge/actions.py index 730868e72..6d5d535ef 100644 --- a/pym/_emerge/actions.py +++ b/pym/_emerge/actions.py @@ -3657,6 +3657,12 @@ def run_action(emerge_config): ensure_required_sets(emerge_config.trees) + if emerge_config.action is None and \ + "--resume" in emerge_config.opts and emerge_config.args: + writemsg("emerge: unexpected argument(s) for --resume: %s\n" % + " ".join(emerge_config.args), noiselevel=-1) + return 1 + # only expand sets for actions taking package arguments oldargs = emerge_config.args[:] if emerge_config.action in ("clean", "config", "depclean",