ref: refs/heads/master
commit e9f3bf7b97fe452bbddb0975e77908f42756e55f
Author: Michael Andres
Date: Wed May 27 13:50:16 2009 +0200
New solver.allowVendorChange option in zypp.conf
---
zypp.conf | 14 ++++++++++++++
zypp/ZConfig.cc | 19 ++++++++++++-------
zypp/ZConfig.h | 5 +++++
3 files changed, 31 insertions(+), 7 deletions(-)
diff --git a/zypp.conf b/zypp.conf
index f50ce90..e1c8920 100644
--- a/zypp.conf
+++ b/zypp.conf
@@ -228,6 +228,20 @@
# solver.onlyRequires = false
##
+## EXPERTS ONLY: Per default the solver will not replace packages of
+## different vendors, unless you explicitly ask to do so. Setting this
+## option to TRUE will disable this vendor check (unless the application
+## explicitly re-enables it). Packages will then be considered based on
+## repository priority and version only. This may easily damage your system.
+##
+## CHANGING THE DEFAULT IS NOT RECOMMENDED.
+##
+## Valid values: boolean
+## Default value: false
+##
+# solver.allowVendorChange = false
+
+##
## This file contains requirements/conflicts which fulfill the
## needs of a running system.
## For example the system would be broken if not glibc or kernel is
diff --git a/zypp/ZConfig.cc b/zypp/ZConfig.cc
index ceab33f..7e17ad0 100644
--- a/zypp/ZConfig.cc
+++ b/zypp/ZConfig.cc
@@ -208,7 +208,6 @@ namespace zypp
, download_min_download_speed(0)
, download_max_download_speed(0)
, download_max_silent_tries(5)
- , solver_onlyRequires ( false )
, apply_locks_file ( true )
{
@@ -329,7 +328,11 @@ namespace zypp
}
else if ( entry == "solver.onlyRequires" )
{
- solver_onlyRequires = str::strToBool( value, solver_onlyRequires );
+ solver_onlyRequires.set( str::strToBool( value, solver_onlyRequires.get() ) );
+ }
+ else if ( entry == "solver.allowVendorChange" )
+ {
+ solver_allowVendorChange.set( str::strToBool( value, solver_allowVendorChange.get() ) );
}
else if ( entry == "solver.checkSystemFile" )
{
@@ -441,7 +444,8 @@ namespace zypp
int download_max_download_speed;
int download_max_silent_tries;
- bool solver_onlyRequires;
+ Option solver_onlyRequires;
+ Option solver_allowVendorChange;
Pathname solver_checkSystemFile;
std::set<IdString> multiversion;
@@ -646,7 +650,10 @@ namespace zypp
{ return _pimpl->download_max_silent_tries; }
bool ZConfig::solver_onlyRequires() const
- { return _pimpl->solver_onlyRequires; }
+ { return _pimpl->solver_onlyRequires.get(); }
+
+ bool ZConfig::solver_allowVendorChange() const
+ { return _pimpl->solver_allowVendorChange.get(); }
Pathname ZConfig::solver_checkSystemFile() const
{ return ( _pimpl->solver_checkSystemFile.empty()
@@ -662,9 +669,7 @@ namespace zypp
{ return _pimpl->multiversion.erase(IdString(name)); }
bool ZConfig::apply_locks_file() const
- {
- return _pimpl->apply_locks_file;
- }
+ { return _pimpl->apply_locks_file; }
Pathname ZConfig::update_dataPath() const
{
diff --git a/zypp/ZConfig.h b/zypp/ZConfig.h
index 42f602e..6d66838 100644
--- a/zypp/ZConfig.h
+++ b/zypp/ZConfig.h
@@ -229,6 +229,11 @@ namespace zypp
Pathname solver_checkSystemFile() const;
/**
+ * Whether vendor check is by default enabled.
+ */
+ bool solver_allowVendorChange() const;
+
+ /**
* Packages which can be installed parallel with different versions
* Returning a set of package names (IdString)
*/
--
To unsubscribe, e-mail: zypp-commit+unsubscribe@opensuse.org
For additional commands, e-mail: zypp-commit+help@opensuse.org