00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025 #include <sstream>
00026
00027 #include "zypp/base/String.h"
00028 #include "zypp/base/Gettext.h"
00029
00030 #include "zypp/solver/detail/ProblemSolutionInstall.h"
00031 #include "zypp/solver/detail/ResolverInfo.h"
00032
00033 using namespace std;
00034
00036 namespace zypp
00037 {
00038
00039 namespace solver
00040 {
00041
00042 namespace detail
00043 {
00044
00045 IMPL_PTR_TYPE(ProblemSolutionInstall);
00046
00047
00048
00049 ProblemSolutionInstall::ProblemSolutionInstall( ResolverProblem_Ptr parent,
00050 PoolItem_Ref item )
00051 : ProblemSolution (parent, "", "")
00052 {
00053
00054 _description = str::form (_("install %s"), item->name().c_str() );
00055
00056 _details = str::form (_("install %s"), ResolverInfo::toString (item).c_str());
00057
00058 addAction ( new TransactionSolutionAction (item,
00059 INSTALL));
00060 }
00061
00062 ProblemSolutionInstall::ProblemSolutionInstall( ResolverProblem_Ptr parent,
00063 PoolItemList & itemList )
00064 : ProblemSolution (parent, "", "")
00065 {
00066 _description = _("Install missing resolvables");
00067
00068 for (PoolItemList::iterator iter = itemList.begin();
00069 iter != itemList.end(); iter++) {
00070 PoolItem_Ref item = *iter;
00071 addAction ( new TransactionSolutionAction (item, INSTALL));
00072 }
00073
00074 ostringstream details;
00075 details << _actions;
00076 _details = details.str();
00077
00078 }
00079
00081 };
00084 };
00087 };