ref: refs/heads/master
commit 5af4164f84b65cd148368cb3cfdb0e2182f85fe0
Author: Michael Andres
Date: Tue Feb 24 16:36:08 2009 +0100
- Let 'zypper clean' keep the raw metadata cache of CD/DVD based
repositories. We'd need the CD/DVD again to recreate the data.
If this is actually desired, explicitly remove an recreate the
CD/DVD based repository. (bnc #476429).
---
src/repos.cc | 18 ++++++++++++++----
1 files changed, 14 insertions(+), 4 deletions(-)
diff --git a/src/repos.cc b/src/repos.cc
index aa9dabb..cdbc412 100644
--- a/src/repos.cc
+++ b/src/repos.cc
@@ -1157,10 +1157,20 @@ void clean_repos(Zypper & zypper)
}
if( clean_raw_metadata )
{
- zypper.out().info(boost::str(format(
- _("Cleaning raw metadata cache for '%s'.")) % repo.alias ()),
- Out::HIGH);
- manager.cleanMetadata(repo);
+ std::string scheme( repo.url().getScheme() );
+ if ( ! ( scheme == "cd" || scheme == "dvd" ) )
+ {
+ zypper.out().info(boost::str(format(
+ _("Cleaning raw metadata cache for '%s'.")) % repo.alias ()),
+ Out::HIGH);
+ manager.cleanMetadata(repo);
+ }
+ else
+ {
+ zypper.out().info(boost::str(format(
+ _("Keeping raw metadata cache for %s '%s'.")) %scheme %repo.alias ()),
+ Out::HIGH);
+ }
}
if( clean_packages )
{
--
To unsubscribe, e-mail: zypp-commit+unsubscribe@opensuse.org
For additional commands, e-mail: zypp-commit+help@opensuse.org