* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
* 02111-1307, USA.
*/
+extern "C"
+{
+#include <solv/solver.h>
+}
+
+#define ZYPP_USE_RESOLVER_INTERNALS
#include "zypp/base/Logger.h"
+#include "zypp/IdString.h"
+#include "zypp/IdStringType.h"
#include "zypp/solver/detail/SolverQueueItemInstall.h"
/////////////////////////////////////////////////////////////////////////
-namespace zypp
+namespace zypp
{ ///////////////////////////////////////////////////////////////////////
///////////////////////////////////////////////////////////////////////
namespace solver
os << "[" << (_soft?"Soft":"") << "Install: "
<< _name
<< "]";
-
+
return os;
}
//---------------------------------------------------------------------------
-bool SolverQueueItemInstall::addRule (Queue & q, Pool *SATPool)
+bool SolverQueueItemInstall::addRule (sat::detail::CQueue & q)
{
- Id id = str2id( SATPool, _name.c_str(), 0 );
- queue_push( &(q), SOLVER_INSTALL_SOLVABLE_NAME );
- queue_push( &(q), id);
+ ::Id id = IdString(_name).id();
if (_soft) {
- queue_push( &(q), SOLVER_WEAK );
- queue_push( &(q), id);
+ queue_push( &(q), SOLVER_INSTALL | SOLVER_SOLVABLE_NAME | SOLVER_WEAK );
+ } else {
+ queue_push( &(q), SOLVER_INSTALL | SOLVER_SOLVABLE_NAME );
}
+ queue_push( &(q), id);
+
MIL << "Install " << _name << (_soft ? "(soft)" : "")
- << " with SAT-Pooly: " << id << endl;
+ << " with SAT-PoolID: " << id << endl;
return true;
}
SolverQueueItemInstall_constPtr ins = dynamic_pointer_cast<const SolverQueueItemInstall>(item);
if (_name != ins->_name) {
return _name.compare(ins->_name);
- } else {
- if (_soft == ins->_soft) {
- return 0;
- } else {
- if (_soft)
- return 1;
- else
- return -1;
- }
}
+ return 0;
}