#include "zypp/base/Gettext.h"
#include "zypp/base/Logger.h"
#include "zypp/solver/detail/ProblemSolutionIgnore.h"
+#include "zypp/solver/detail/Helper.h"
using namespace std;
//---------------------------------------------------------------------------
ProblemSolutionIgnore::ProblemSolutionIgnore( ResolverProblem_Ptr parent,
- const Dep &kind,
- PoolItem item,
- const Capability & capability)
+ PoolItem item )
: ProblemSolution (parent, "", "")
{
- if (kind == Dep::CONFLICTS) {
- // TranslatorExplanation %s = name of package, patch, selection ...
- _description = str::form (_("Ignoring conflict of %s"),
- item->name().c_str());
- addAction (new InjectSolutionAction (capability, kind));
- } else if (kind == Dep::PROVIDES) {
- _description = _("Ignoring this requirement");
- addAction ( new InjectSolutionAction (capability, kind));
- } else {
- ERR << "Wrong kind of capability: " << kind << endl;
- }
+ // TranslatorExplanation %s = name of package, patch, selection ...
+ _description = str::form (_("break %s by ignoring some of its dependencies"), item.satSolvable().asString().c_str() );
+
+ addAction ( new InjectSolutionAction (item, WEAK));
+}
+
+ProblemSolutionIgnore::ProblemSolutionIgnore( ResolverProblem_Ptr parent,
+ PoolItemList itemList )
+ : ProblemSolution (parent, "", "")
+{
+ _description = _("generally ignore of some dependecies");
+ for (PoolItemList::const_iterator iter = itemList.begin();
+ iter != itemList.end(); iter++) {
+ addAction ( new InjectSolutionAction (*iter, WEAK));
+ }
}
///////////////////////////////////////////////////////////////////