ref: refs/heads/SuSE-Code-11-Branch
commit 6903ade874dd37b0b40f2addf69b47f4cb7a46ee
Author: Michael Andres
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 f14291d..f926001 100644
--- a/zypp/RepoManager.cc
+++ b/zypp/RepoManager.cc
@@ -1884,6 +1884,7 @@ namespace zypp
// ==> an exising repo to check
bool oldRepoModified = false;
+ // changed enable?
if ( beEnabled )
{
if ( ! oldRepo->enabled() )
@@ -1901,8 +1902,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