operator<<( ostream& os, const ProblemSolutionList & solutionlist)
{
for (ProblemSolutionList::const_iterator iter = solutionlist.begin(); iter != solutionlist.end(); ++iter) {
- os << (*iter) << endl;
+ os << *(*iter) << endl;
}
return os;
}
operator<<( ostream& os, const CProblemSolutionList & solutionlist)
{
for (CProblemSolutionList::const_iterator iter = solutionlist.begin(); iter != solutionlist.end(); ++iter) {
- os << (*iter) << endl;
+ os << *(*iter) << endl;
}
return os;
}
// Uninstall p
problem->addSolution (new ProblemSolutionUninstall (problem, item));
// Remove conflict in the resolvable which has to be installed
+
problem->addSolution (new ProblemSolutionIgnore (problem, Dep::CONFLICTS, item, misc_info->capability(),
misc_info->other()));
problems.push_back (problem);
//---------------------------------------------------------------------------
-ostream&
-operator<<( ostream& os, const TransactionSolutionAction & action)
+ostream &
+TransactionSolutionAction::dumpOn( ostream& os) const
{
os << "TransactionSolutionAction: ";
- switch (action._action) {
+ switch (_action) {
case KEEP: os << "Keep"; break;
case INSTALL: os << "Install"; break;
case UPDATE: os << "Update"; break;
case UNLOCK: os << "Unlock"; break;
}
os << " ";
- os << action._item;
+ os << _item;
os << endl;
return os;
}
operator<<( ostream& os, const SolutionActionList & actionlist)
{
for (SolutionActionList::const_iterator iter = actionlist.begin(); iter != actionlist.end(); ++iter) {
- os << (*iter);
+ os << *(*iter);
os << endl;
}
return os;
operator<<( ostream& os, const CSolutionActionList & actionlist)
{
for (CSolutionActionList::const_iterator iter = actionlist.begin(); iter != actionlist.end(); ++iter) {
- os << (*iter);
+ os << *(*iter);
os << endl;
}
return os;
//---------------------------------------------------------------------------
-ostream&
-operator<<( ostream& os, const InjectSolutionAction & action)
+ostream &
+InjectSolutionAction::dumpOn( ostream& os ) const
{
os << "InjectSolutionAction: ";
- os << action._capability;
+ os << _capability;
os << ", ";
- os << action._kind;
+ os << _kind;
os << endl;
return os;
}
//---------------------------------------------------------------------------
+ostream &
+SolutionAction::dumpOn( std::ostream & os ) const
+{
+ os << "SolutionAction<";
+ os << "not specified";
+ os << "> ";
+ return os;
+}
+
+
bool
TransactionSolutionAction::execute(Resolver & resolver) const
{
virtual ~SolutionAction();
// ---------------------------------- I/O
-
- friend std::ostream& operator<<(std::ostream&, const SolutionAction & action);
- friend std::ostream& operator<<(std::ostream&, const SolutionActionList & actionlist);
- friend std::ostream& operator<<(std::ostream&, const CSolutionActionList & actionlist);
+ virtual std::ostream & dumpOn( std::ostream & str ) const;
+ friend std::ostream& operator<<(std::ostream & str, const SolutionAction & action)
+ { return action.dumpOn (str); }
+ friend std::ostream& operator<<(std::ostream & str, const SolutionActionList & actionlist);
+ friend std::ostream& operator<<(std::ostream & str, const CSolutionActionList & actionlist);
// ---------------------------------- methods
/**
_item( item ), _action( action ) {}
// ---------------------------------- I/O
-
- friend std::ostream& operator<<(std::ostream&, const TransactionSolutionAction & action);
+ virtual std::ostream & dumpOn( std::ostream & str ) const;
+ friend std::ostream& operator<<(std::ostream& str, const TransactionSolutionAction & action)
+ { return action.dumpOn (str); }
// ---------------------------------- accessors
_capability( capability ), _kind( kind ), _otherItem( otherItem ) {}
// ---------------------------------- I/O
-
- friend std::ostream& operator<<(std::ostream&, const InjectSolutionAction & action);
+ virtual std::ostream & dumpOn( std::ostream & str ) const;
+ friend std::ostream& operator<<(std::ostream& str, const InjectSolutionAction & action)
+ { return action.dumpOn (str); }
// ---------------------------------- accessors
const Capability & capability() const { return _capability; };
protected:
- const Capability & _capability;
- const Dep & _kind;
+ const Capability _capability;
+ const Dep _kind;
PoolItem_Ref _item, _otherItem;
};