libzypp  13.10.6
ProblemSolutionIgnore.cc
Go to the documentation of this file.
1 
2 /* -*- Mode: C++; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 4 -*- */
3 /* ProblemSolution.cc
4  *
5  * Easy-to use interface to the ZYPP dependency resolver
6  *
7  * Copyright (C) 2000-2002 Ximian, Inc.
8  * Copyright (C) 2005 SUSE Linux Products GmbH
9  *
10  * This program is free software; you can redistribute it and/or
11  * modify it under the terms of the GNU General Public License,
12  * version 2, as published by the Free Software Foundation.
13  *
14  * This program is distributed in the hope that it will be useful, but
15  * WITHOUT ANY WARRANTY; without even the implied warranty of
16  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
17  * General Public License for more details.
18  *
19  * You should have received a copy of the GNU General Public License
20  * along with this program; if not, write to the Free Software
21  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
22  * 02111-1307, USA.
23  */
24 
25 #include "zypp/base/String.h"
26 #include "zypp/base/Gettext.h"
27 #include "zypp/base/Logger.h"
30 
31 using namespace std;
32 
34 namespace zypp
35 {
36  namespace solver
38  {
39  namespace detail
41  {
42 
43 IMPL_PTR_TYPE(ProblemSolutionIgnore);
44 
45 //---------------------------------------------------------------------------
46 
47 ProblemSolutionIgnore::ProblemSolutionIgnore( ResolverProblem_Ptr parent,
48  PoolItem item )
49  : ProblemSolution (parent, "", "")
50 {
51  // TranslatorExplanation %s = name of package, patch, selection ...
52  _description = str::form (_("break %s by ignoring some of its dependencies"), item.satSolvable().asString().c_str() );
53 
54  addAction ( new InjectSolutionAction (item, WEAK));
55 }
56 
58  PoolItemList itemList )
59  : ProblemSolution (parent, "", "")
60 {
61  _description = _("generally ignore of some dependecies");
62  for (PoolItemList::const_iterator iter = itemList.begin();
63  iter != itemList.end(); iter++) {
64  addAction ( new InjectSolutionAction (*iter, WEAK));
65  }
66 }
67 
69  };// namespace detail
72  };// namespace solver
75 };// namespace zypp
Interface to gettext.
A problem solution action that injects an artificial "provides" to the pool to satisfy open requireme...
std::string asString() const
String representation "ident-edition.arch" or "noSolvable".
Definition: Solvable.cc:506
std::list< PoolItem > PoolItemList
Definition: Types.h:51
void addAction(solver::detail::SolutionAction_constPtr action)
Add an action to the actions list.
#define _(MSG)
Return translated text.
Definition: Gettext.h:21
std::string form(const char *format,...)
Printf style construction of std::string.
Definition: String.cc:34
sat::Solvable satSolvable() const
Return the corresponding sat::Solvable.
Definition: PoolItem.h:114
Reference to a PoolItem connecting ResObject and ResStatus.
Definition: PoolItem.h:50
ProblemSolutionIgnore(ResolverProblem_Ptr parent, PoolItem item)
Constructor.
Class representing one possible solution to one problem found during resolving.
#define IMPL_PTR_TYPE(NAME)