Author: jreidinger Date: Fri Mar 14 09:32:14 2008 New Revision: 9143 URL: http://svn.opensuse.org/viewcvs/zypp?rev=9143&view=rev Log: add check and nocheck option to addrepo command (bnc #309612) Modified: trunk/zypper/doc/zypper.8 trunk/zypper/src/zypper.cc Modified: trunk/zypper/doc/zypper.8 URL: http://svn.opensuse.org/viewcvs/zypp/trunk/zypper/doc/zypper.8?rev=9143&r1=9142&r2=9143&view=diff ============================================================================== --- trunk/zypper/doc/zypper.8 (original) +++ trunk/zypper/doc/zypper.8 Fri Mar 14 09:32:14 2008 @@ -333,6 +333,12 @@ .TP \fI\-n, \-\-no\-refresh\fR Add the repository with auto-refresh disabled. +.TP +\fI\-c, \-\-check\fR +Probe given URI. +.TP +\fI\-x, \-\-nocheck\fR +Don't probe URI, probe later during refresh. .PP NOTE: This command does not automatically refresh the newly added repositories. You have to use the \fBrefresh\fR command after finishing your modifications to repositories with \fB*repo\fR commands. Modified: trunk/zypper/src/zypper.cc URL: http://svn.opensuse.org/viewcvs/zypp/trunk/zypper/src/zypper.cc?rev=9143&r1=9142&r2=9143&view=diff ============================================================================== --- trunk/zypper/src/zypper.cc (original) +++ trunk/zypper/src/zypper.cc Fri Mar 14 09:32:14 2008 @@ -849,6 +849,8 @@ {"no-refresh", no_argument, 0, 'n'}, {"repo", required_argument, 0, 'r'}, {"help", no_argument, 0, 'h'}, + {"check", no_argument, 0, 'c'}, + {"nocheck", no_argument, 0, 'x'}, {0, 0, 0, 0} }; specific_options = service_add_options; @@ -863,6 +865,8 @@ "-t, --type <TYPE> Type of repository (%s)\n" "-d, --disable Add the repository as disabled\n" "-n, --no-refresh Add the repository with auto-refresh disabled\n" + "-c, --check Probe URI\n" + "-x, --nocheck Don't probe URI, probe later during refresh.\n" )) % "yast2, rpm-md, plaindir"); break; } @@ -1518,6 +1522,16 @@ // by default, enable the repo and set autorefresh to false if (indeterminate(enabled)) enabled = true; if (indeterminate(refresh)) refresh = false; + if (copts.count("check")) + { + if (!copts.count("nocheck")) + this->_gopts.rm_options.probe = true; + else + this->out().warning(_("Cannot use --check together with --nocheck." + " Used settings from zypp.conf."),Out::QUIET); + } + else if (copts.count("nocheck")) + this->_gopts.rm_options.probe = false; warn_if_zmd(); -- To unsubscribe, e-mail: zypp-commit+unsubscribe@opensuse.org For additional commands, e-mail: zypp-commit+help@opensuse.org