addAction (new TransactionSolutionAction(capability, action));
actNumber++;
}
-
+
void ProblemSolutionCombi::addSingleAction( PoolItem item, const TransactionKind action)
{
addAction (new TransactionSolutionAction(item, action));
}
// all other
_details += "\n";
- _details += description;
+ _details += description;
+ }
+}
+
+void ProblemSolutionCombi::addFrontDescription( const std::string & description )
+{
+ if ( _description.size() == 0
+ && _details.size() == 0) {
+ // first entry
+ _description = description;
+ } else {
+ if ( _description.size() > 0
+ && _details.size() == 0) {
+ // second entry
+ _details = _description;
+ _description = _("Following actions will be done:");
+ }
+ // all other
+ std::string tmp( _details );
+ _details = description;
+ _details += "\n";
+ _details += tmp;
}
}
* Class representing one possible solution to one problem found during resolving
* This problem solution is a combination of different actions.
* e.G. install, delete, keep different resolvables.
- *
+ *
**/
class ProblemSolutionCombi : public ProblemSolution
{
/**
* Add a single action of a SolverQueueItem
*/
- void addSingleAction( SolverQueueItem_Ptr item, const TransactionKind action);
+ void addSingleAction( SolverQueueItem_Ptr item, const TransactionKind action);
/**
* returns the number of actions
*/
int actionCount() { return actNumber;}
-
+
/**
- * Set description text
+ * Set description text (append)
*/
void addDescription( const std::string description);
+ /**
+ * Set description text (prepend)
+ */
+ void addFrontDescription( const std::string & description );
};
///////////////////////////////////////////////////////////////////
resolverProblem->setDetails( resolverProblem->description() + "\n" + resolverProblem->details() );
resolverProblem->setDescription(_("This request will break your system!"));
description = _("ignore the warning of a broken system");
+ description += string(" (requires:")+dep2str(pool, what)+")";
+ MIL << description << endl;
+ problemSolution->addFrontDescription (description);
} else {
description = str::form (_("do not ask to install a solvable providing %s"), dep2str(pool, what));
+ MIL << description << endl;
+ problemSolution->addDescription (description);
}
- MIL << description << endl;
- problemSolution->addDescription (description);
}
break;
case SOLVER_ERASE_SOLVABLE_PROVIDES:
resolverProblem->setDetails( resolverProblem->description() + "\n" + resolverProblem->details() );
resolverProblem->setDescription(_("This request will break your system!"));
description = _("ignore the warning of a broken system");
+ description += string(" (conflicts:")+dep2str(pool, what)+")";
+ MIL << description << endl;
+ problemSolution->addFrontDescription (description);
+
} else {
description = str::form (_("do not ask to delete all solvables providing %s"), dep2str(pool, what));
+ MIL << description << endl;
+ problemSolution->addDescription (description);
}
- MIL << description << endl;
- problemSolution->addDescription (description);
}
break;
case SOLVER_INSTALL_SOLVABLE_UPDATE: