This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "ZYpp based command line package management tool". The branch, master has been updated via 338ea88a69540857175d3d7a07012cc26e902157 (commit) from 07f3dd92702f365e65f8c35d3485d417a507c9b7 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- commit 338ea88a69540857175d3d7a07012cc26e902157 Author: Josef Reidinger <jreidinger@suse.cz> Date: Wed Jan 14 09:58:29 2009 +0100 modifyrepo - accept multiple arguments ----------------------------------------------------------------------- Summary of changes and diff: doc/zypper.8 | 6 +++--- src/Zypper.cc | 31 +++++++++++++------------------ 2 files changed, 16 insertions(+), 21 deletions(-) diff --git a/doc/zypper.8 b/doc/zypper.8 index 552606c..a13e03f 100644 --- a/doc/zypper.8 +++ b/doc/zypper.8 @@ -1,4 +1,4 @@ -.TH "zypper" "8" "1.0.3" "zypper" "System Tools" +.TH "zypper" "8" "1.1.0" "zypper" "System Tools" .SH "SYNTAX" .LP zypper [\fI\-\-global\-opts\fR] <\fBcommand\fR> [\fI\-\-command\-opts\fR] [\fBcommand-arguments\fR] @@ -911,10 +911,10 @@ dreadful alias which is not usable on the command line). .B $ zypper nr 8 myrepo .TP -.B modifyrepo (mr) <options> <alias|#|URI> +.B modifyrepo (mr) <options> <alias|#|URI> ... .TP .B modifyrepo (mr) <options> <--all|--remote|--local|--medium-type> -Modify properties of the repository specified by alias, number or URI or +Modify properties of repositories specified by alias, number or URI or one of the aggregate options. .TP \fI\-e, \-\-enable\fR diff --git a/src/Zypper.cc b/src/Zypper.cc index e6db512..8d2afe5 100644 --- a/src/Zypper.cc +++ b/src/Zypper.cc @@ -1338,7 +1338,7 @@ void Zypper::processCommandOptions() _command_help = str::form(_( // translators: %s is "--all|--remote|--local|--medium-type" // and "--all, --remote, --local, --medium-type" - "modifyrepo (mr) <options> <alias|#|URI>\n" + "modifyrepo (mr) <options> <alias|#|URI> ...\n" "modifyrepo (mr) <options> <%s>\n" "\n" "Modify properties of repositories specified by alias, number, or URI, or by the\n" @@ -2858,14 +2858,6 @@ void Zypper::doCommand() setExitCode(ZYPPER_EXIT_ERR_INVALID_ARGS); return; } - // too many arguments - if (_arguments.size() > 1 - || (_arguments.size() > 0 && non_alias)) - { - report_too_many_arguments(_command_help); - setExitCode(ZYPPER_EXIT_ERR_INVALID_ARGS); - return; - } initRepoManager(); if (non_alias) @@ -2874,16 +2866,19 @@ void Zypper::doCommand() } else { - RepoInfo repo; - if (match_repo(*this,_arguments[0],&repo)) + for_(arg,_arguments.begin(),_arguments.end()) { - modify_repo(*this, repo.alias()); - } - else - { - out().error( - boost::str(format(_("Repository %s not found.")) % _arguments[0])); - ERR << "Repo " << _arguments[0] << " not found" << endl; + RepoInfo r; + if (match_repo(*this,*arg,&r)) + { + modify_repo(*this, r.alias()); + } + else + { + out().error( + boost::str(format(_("Repository %s not found.")) % *arg)); + ERR << "Repo " << *arg << " not found" << endl; + } } } hooks/post-receive -- ZYpp based command line package management tool -- To unsubscribe, e-mail: zypp-commit+unsubscribe@opensuse.org For additional commands, e-mail: zypp-commit+help@opensuse.org