libzypp  10.5.0
ProblemSolutionIgnore.cc
Go to the documentation of this file.
00001 
00002 /* -*- Mode: C++; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 4 -*- */
00003 /* ProblemSolution.cc
00004  *
00005  * Easy-to use interface to the ZYPP dependency resolver
00006  *
00007  * Copyright (C) 2000-2002 Ximian, Inc.
00008  * Copyright (C) 2005 SUSE Linux Products GmbH
00009  *
00010  * This program is free software; you can redistribute it and/or
00011  * modify it under the terms of the GNU General Public License,
00012  * version 2, as published by the Free Software Foundation.
00013  *
00014  * This program is distributed in the hope that it will be useful, but
00015  * WITHOUT ANY WARRANTY; without even the implied warranty of
00016  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00017  * General Public License for more details.
00018  *
00019  * You should have received a copy of the GNU General Public License
00020  * along with this program; if not, write to the Free Software
00021  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
00022  * 02111-1307, USA.
00023  */
00024 
00025 #include "zypp/base/String.h"
00026 #include "zypp/base/Gettext.h"
00027 #include "zypp/base/Logger.h"
00028 #include "zypp/solver/detail/ProblemSolutionIgnore.h"
00029 #include "zypp/solver/detail/Helper.h"
00030 
00031 using namespace std;
00032 
00034 namespace zypp
00035 { 
00036 
00037   namespace solver
00038   { 
00039 
00040     namespace detail
00041     { 
00042 
00043 IMPL_PTR_TYPE(ProblemSolutionIgnore);
00044 
00045 //---------------------------------------------------------------------------
00046 
00047 ProblemSolutionIgnore::ProblemSolutionIgnore( ResolverProblem_Ptr parent,
00048                                               PoolItem item )
00049     : ProblemSolution (parent, "", "")
00050 {
00051     // TranslatorExplanation %s = name of package, patch, selection ...
00052     _description = str::form (_("break %s by ignoring some of its dependencies"), item.satSolvable().asString().c_str() );
00053 
00054     addAction ( new InjectSolutionAction (item, WEAK));
00055 }
00056 
00057 ProblemSolutionIgnore::ProblemSolutionIgnore( ResolverProblem_Ptr parent,
00058                                               PoolItemList itemList )
00059     : ProblemSolution (parent, "", "")
00060 {
00061         _description = _("generally ignore of some dependecies");
00062         for (PoolItemList::const_iterator iter = itemList.begin();
00063              iter != itemList.end(); iter++) {
00064             addAction ( new InjectSolutionAction (*iter, WEAK));
00065         }
00066 }
00067 
00069     };// namespace detail
00072   };// namespace solver
00075 };// namespace zypp