libzypp  17.23.8
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 #define ZYPP_USE_RESOLVER_INTERNALS
25 
26 #include <zypp/base/String.h>
27 #include <zypp/base/Gettext.h>
30 
32 namespace zypp
33 {
35  namespace solver
36  {
38  namespace detail
39  {
40  ProblemSolutionIgnore::ProblemSolutionIgnore( PoolItem item )
41  // TranslatorExplanation %s = name of package, patch, selection ...
42  : ProblemSolution( str::form(_("break %s by ignoring some of its dependencies"), item.satSolvable().asString().c_str() ) )
43  {
44  addAction( new InjectSolutionAction( item, WEAK ) );
45  }
46 
47  ProblemSolutionIgnore::ProblemSolutionIgnore( PoolItemList itemList )
48  : ProblemSolution( _("generally ignore of some dependencies") )
49  {
50  for ( const auto & item : itemList)
51  { addAction( new InjectSolutionAction( item, WEAK ) ); }
52  }
53 
54  } // namespace detail
56  } // namespace solver
58 } // namespace zypp
_
#define _(MSG)
Definition: Gettext.h:37
zypp::str::form
std::string form(const char *format,...) __attribute__((format(printf
Printf style construction of std::string.
Definition: String.cc:35
zypp
Easy-to use interface to the ZYPP dependency resolver.
Definition: CodePitfalls.doc:1
SolutionAction.h
Gettext.h
String.h
ProblemSolutionIgnore.h