ref: refs/heads/master commit bb859f949f4fca255c1727f11696d0f2c8bb2bc6 Author: Michael Andres <ma@suse.de> Date: Fri May 8 16:44:23 2009 +0200 Allow service refresh to change a repositories url (bnc #502157) --- zypp/RepoManager.cc | 10 ++++++++-- 1 files changed, 8 insertions(+), 2 deletions(-) diff --git a/zypp/RepoManager.cc b/zypp/RepoManager.cc index 19b76ac..740f70f 100644 --- a/zypp/RepoManager.cc +++ b/zypp/RepoManager.cc @@ -1904,6 +1904,7 @@ namespace zypp // ==> an exising repo to check bool oldRepoModified = false; + // changed enable? if ( beEnabled ) { if ( ! oldRepo->enabled() ) @@ -1921,8 +1922,13 @@ namespace zypp } } -#warning also check changed URL due to PATH/URL change in service, but ignore ?credentials param! -// ma@: task for modifyRepository? + // changed url? + // service repo can contain only one URL now, so no need to iterate. + if ( oldRepo->url() != it->url() ) + { + oldRepo->setBaseUrl( it->url() ); + oldRepoModified = true; + } // save if modified: if ( oldRepoModified ) -- To unsubscribe, e-mail: zypp-commit+unsubscribe@opensuse.org For additional commands, e-mail: zypp-commit+help@opensuse.org