Author: jkupec Date: Fri Sep 19 13:29:32 2008 New Revision: 11103 URL: http://svn.opensuse.org/viewcvs/zypp?rev=11103&view=rev Log: - don't allow to change alias of a repo belonging to service Modified: trunk/zypper/doc/zypper.8 trunk/zypper/src/repos.cc Modified: trunk/zypper/doc/zypper.8 URL: http://svn.opensuse.org/viewcvs/zypp/trunk/zypper/doc/zypper.8?rev=11103&r1=11102&r2=11103&view=diff ============================================================================== --- trunk/zypper/doc/zypper.8 (original) +++ trunk/zypper/doc/zypper.8 Fri Sep 19 13:29:32 2008 @@ -861,7 +861,13 @@ Refreshing a service mean executing the service's special task. RIS services add, remove, or modify repositories on your system based on -current content of the repository index. +current content of the repository index. Services only manage defined +repositories, they do not refresh them. To refresh also repositories, +use \fI\-\-with\-repos\fR option or the \fBrefresh\fR command. + +.TP +.I \-r, \-\-with\-repos +Refresh also repositories. TODO more info Modified: trunk/zypper/src/repos.cc URL: http://svn.opensuse.org/viewcvs/zypp/trunk/zypper/src/repos.cc?rev=11103&r1=11102&r2=11103&view=diff ============================================================================== --- trunk/zypper/src/repos.cc (original) +++ trunk/zypper/src/repos.cc Fri Sep 19 13:29:32 2008 @@ -1484,12 +1484,23 @@ void rename_repo(Zypper & zypper, const std::string & alias, const std::string & newalias) -{ +{ RepoManager manager(zypper.globalOpts().rm_options); try { RepoInfo repo(manager.getRepositoryInfo(alias)); + + if (!repo.service().empty()) + { + zypper.out().error(str::form( + _("Cannot change alias of '%s' repository. The repository" + " belongs to service '%s' which is responsible for setting its alias."), + alias.c_str(), repo.service().c_str())); + zypper.setExitCode(ZYPPER_EXIT_ERR_ZYPP); + return; + } + repo.setAlias(newalias); manager.modifyRepository(alias, repo); -- To unsubscribe, e-mail: zypp-commit+unsubscribe@opensuse.org For additional commands, e-mail: zypp-commit+help@opensuse.org