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"
30 #include "zypp/solver/detail/ProblemSolutionInstall.h"
31 #include "zypp/solver/detail/Helper.h"
35 /////////////////////////////////////////////////////////////////////////
37 { ///////////////////////////////////////////////////////////////////////
38 ///////////////////////////////////////////////////////////////////////
40 { /////////////////////////////////////////////////////////////////////
41 /////////////////////////////////////////////////////////////////////
43 { ///////////////////////////////////////////////////////////////////
45 IMPL_PTR_TYPE(ProblemSolutionInstall);
47 //---------------------------------------------------------------------------
49 ProblemSolutionInstall::ProblemSolutionInstall( ResolverProblem_Ptr parent,
51 : ProblemSolution (parent, "", "")
53 // TranslatorExplanation %s = name of package, patch, selection ...
54 _description = str::form (_("install %s"), item->name().c_str() );
55 // TranslatorExplanation %s = name of package, patch, selection ...
56 _details = str::form (_("install %s"), Helper::itemToString (item).c_str());
58 addAction ( new TransactionSolutionAction (item,
62 ProblemSolutionInstall::ProblemSolutionInstall( ResolverProblem_Ptr parent,
63 PoolItemList & itemList )
64 : ProblemSolution (parent, "", "")
66 _description = _("Install missing resolvables");
68 for (PoolItemList::iterator iter = itemList.begin();
69 iter != itemList.end(); iter++) {
70 PoolItem item = *iter;
71 addAction ( new TransactionSolutionAction (item, INSTALL));
74 ostringstream details;
76 _details = details.str();
80 ///////////////////////////////////////////////////////////////////
82 /////////////////////////////////////////////////////////////////////
83 /////////////////////////////////////////////////////////////////////
85 ///////////////////////////////////////////////////////////////////////
86 ///////////////////////////////////////////////////////////////////////
88 /////////////////////////////////////////////////////////////////////////