2 /* -*- Mode: C++; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 4 -*- */
5 * Easy-to use interface to the ZYPP dependency resolver
7 * Copyright (C) 2000-2002 Ximian, Inc.
8 * Copyright (C) 2005 SUSE Linux Products GmbH
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.
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.
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
27 #include "zypp/base/String.h"
28 #include "zypp/base/Gettext.h"
29 #include "zypp/solver/detail/ProblemSolutionKeep.h"
30 #include "zypp/solver/detail/Helper.h"
34 /////////////////////////////////////////////////////////////////////////
36 { ///////////////////////////////////////////////////////////////////////
37 ///////////////////////////////////////////////////////////////////////
39 { /////////////////////////////////////////////////////////////////////
40 /////////////////////////////////////////////////////////////////////
42 { ///////////////////////////////////////////////////////////////////
44 IMPL_PTR_TYPE(ProblemSolutionKeep);
46 //---------------------------------------------------------------------------
48 ProblemSolutionKeep::ProblemSolutionKeep( ResolverProblem_Ptr parent,
50 : ProblemSolution (parent, "", "")
52 // TranslatorExplanation %s = name of package, patch, selection ...
53 _description = str::form (_("keep %s"), item->name().c_str() );
54 // TranslatorExplanation %s = name of package, patch, selection ...
55 _details = str::form (_("keep %s"), Helper::itemToString (item).c_str());
57 addAction ( new TransactionSolutionAction (item,
61 ProblemSolutionKeep::ProblemSolutionKeep( ResolverProblem_Ptr parent,
62 PoolItemList & itemList )
63 : ProblemSolution (parent, "", "")
65 _description = _("Keep resolvables");
67 for (PoolItemList::iterator iter = itemList.begin();
68 iter != itemList.end(); iter++) {
69 PoolItem item = *iter;
70 addAction ( new TransactionSolutionAction (item, KEEP));
73 ostringstream details;
75 _details = details.str();
79 ///////////////////////////////////////////////////////////////////
81 /////////////////////////////////////////////////////////////////////
82 /////////////////////////////////////////////////////////////////////
84 ///////////////////////////////////////////////////////////////////////
85 ///////////////////////////////////////////////////////////////////////
87 /////////////////////////////////////////////////////////////////////////