typedef multimap<PoolItem_Ref, PoolItem_Ref> ConflictMap;
#define MAXPROBLEMS 20
+#define TAB " "
// match template over ItemCapabilityMap
template <class K, class V>
std::string logAdditionalInfo ( const ProblemMap &additionalInfo, const PoolItem_Ref item)
{
- string infoStr = "\n";
+ string infoStr = "";
for (ProblemMap::const_iterator iter = additionalInfo.find(item); iter != additionalInfo.end();) {
ResolverInfo_Ptr info = iter->second;
PoolItem_Ref iterItem = iter->first;
if (iter == additionalInfo.find(item)) {
string who = ResolverInfo::toString( item );
- infoStr = "\n\n" + who + "\n";
- for (unsigned int i = 1; i <= who.length(); i++) infoStr += "=";
- infoStr += "\n\n";
+ infoStr = "=== " + who + " ===\n";
ResStatus status = iterItem.status();
if (status.isToBeUninstalled()) {
if (status.isByUser())
// Translator: all.%s = name of package,patch,...
- infoStr += str::form (_("%s will be deleted by the user.\n"),
+ infoStr += TAB + str::form (_("%s will be deleted by the user.\n"),
who.c_str());
if (status.isByApplHigh()
|| status.isByApplLow())
// Translator: all.%s = name of package,patch,...
- infoStr += str::form (_("%s will be deleted by another application. (ApplLow/ApplHigh)\n"),
+ infoStr += TAB + str::form (_("%s will be deleted by another application. (ApplLow/ApplHigh)\n"),
who.c_str());
}
if (status.isToBeInstalled()) {
if (status.isByUser())
// Translator: all.%s = name of package,patch,...
- infoStr += str::form (_("%s will be installed by the user.\n"),
+ infoStr += TAB + str::form (_("%s will be installed by the user.\n"),
who.c_str());
if (status.isByApplHigh()
|| status.isByApplLow())
// Translator: all.%s = name of package,patch,...
- infoStr += str::form (_("%s will be installed by another application. (ApplLow/ApplHigh)\n"),
+ infoStr += TAB + str::form (_("%s will be installed by another application. (ApplLow/ApplHigh)\n"),
who.c_str());
}
}
&& info->type() != RESOLVER_INFO_TYPE_SKIPPING
&& info->type() != RESOLVER_INFO_TYPE_UNINSTALLABLE
&& info->type() != RESOLVER_INFO_TYPE_CONFLICT_UNINSTALLABLE) {
- infoStr += info->message();
+ infoStr += TAB +info->message();
infoStr += "\n";
}
iter++;
// TranslatorExplanation %s = name of package, patch, selection ...
what = str::form (_("%s conflicts with %s"), who.c_str(), conflicts_with->itemsToString(true).c_str());
- details = str::form (_("%s conflicts with:\n%s"), who.c_str(), conflicts_with->itemsToString(false).c_str());
+ details = str::form (_("%s conflicts with:\n%s"), who.c_str(), conflicts_with->itemsToString(false).c_str()) + "\n";
details += logAdditionalInfo(collector.additionalInfo, item);
PoolItemList item_list = conflicts_with->items();
for (PoolItemList::const_iterator it = item_list.begin(); it != item_list.end(); ++it) {
// TranslatorExplanation %s = name of package, patch, selection ...
details = str::form (_("%s obsoletes:%s"), who.c_str(), obsoletes->itemsToString(false).c_str());
details += _("\nThese resolvables will be deleted from the system.");
- details += logAdditionalInfo(collector.additionalInfo, item);
+ details += "\n" + logAdditionalInfo(collector.additionalInfo, item);
}
break;
case RESOLVER_INFO_TYPE_DEPENDS_ON: { // no solution; it is only a info
if (it->first == item) {
what = str::form (_("Cannot install %s because it is conflicting with %s"),
who.c_str(),
- it->second->name().c_str());
+ it->second->name().c_str()) + "\n";
details = logAdditionalInfo(collector.additionalInfo, item);
details += logAdditionalInfo(collector.additionalInfo, it->second);
ResolverProblem_Ptr problem = new ResolverProblem (what, details);
// default
what = misc_info->message();
// TranslatorExplanation %s = name of package,patch,...
- details = str::form (_("%s is not installed and has been marked as uninstallable"), who.c_str());
+ details = str::form (_("%s is not installed and has been marked as uninstallable"), who.c_str()) + "\n";
details += logAdditionalInfo(collector.additionalInfo, item);
ResolverProblem_Ptr problem = new ResolverProblem (what, details);
problem->addSolution (new ProblemSolutionInstall (problem, item)); // Install resolvable again
ResolverInfoMisc_constPtr misc_info = dynamic_pointer_cast<const ResolverInfoMisc>(info);
// TranslatorExplanation %s = name of package,patch,...
what = str::form (_("Cannot install %s due to dependency problems"), who.c_str());
- details = misc_info->message();
+ details = misc_info->message() + "\n";
details += logAdditionalInfo(collector.additionalInfo, item);
ResolverProblem_Ptr problem = new ResolverProblem (what, details);
// Uninstall it;
case RESOLVER_INFO_TYPE_INSTALL_TO_BE_UNINSTALLED: { // Can't install p since it is already marked as needing to be uninstalled
ResolverInfoMisc_constPtr misc_info = dynamic_pointer_cast<const ResolverInfoMisc>(info);
// TranslatorExplanation %s = name of package,patch,...
- what = misc_info->message();
+ what = misc_info->message() + "\n";
details = logAdditionalInfo(collector.additionalInfo, item);
ResolverProblem_Ptr problem = new ResolverProblem (what, details);
problem->addSolution (new ProblemSolutionInstall (problem, item)); // Install resolvable again
ResolverInfoMisc_constPtr misc_info = dynamic_pointer_cast<const ResolverInfoMisc>(info);
// TranslatorExplanation %s = name of package,patch,...
what = str::form (_("Cannot install %s"), who.c_str());
- details = misc_info->message();
+ details = misc_info->message() + "\n";
details += logAdditionalInfo(collector.additionalInfo, item);
details += logAdditionalInfo(collector.additionalInfo, misc_info->other());
ResolverProblem_Ptr problem = new ResolverProblem (what, details);
ResolverInfoMisc_constPtr misc_info = dynamic_pointer_cast<const ResolverInfoMisc>(info);
what = misc_info->message();
// TranslatorExplanation %s = name of package, patch, selection ...
- details = str::form (_("%s has unfulfilled requirements"), who.c_str());
+ details = str::form (_("%s has unfulfilled requirements"), who.c_str())+ "\n";
details += logAdditionalInfo(collector.additionalInfo, item);
ResolverProblem_Ptr problem = new ResolverProblem (what, details);
// Uninstall
ResolverInfoMisc_constPtr misc_info = dynamic_pointer_cast<const ResolverInfoMisc>(info);
// TranslatorExplanation %s = name of package, patch, selection ...
what = str::form (_("%s has missing dependencies"), who.c_str());
- details = misc_info->message();
+ details = misc_info->message() + "\n";
details += logAdditionalInfo(collector.additionalInfo, item);
ResolverProblem_Ptr problem = new ResolverProblem (what, details);
ResolverInfoMisc_constPtr misc_info = dynamic_pointer_cast<const ResolverInfoMisc>(info);
// TranslatorExplanation %s = name of package, patch, selection ...
what = str::form (_("%s cannot be installed due to missing dependencies"), who.c_str());
- details = misc_info->message();
+ details = misc_info->message() + "\n";
details += logAdditionalInfo(collector.additionalInfo, item);
ResolverProblem_Ptr problem = new ResolverProblem (what, details);
break;
case RESOLVER_INFO_TYPE_CANT_SATISFY: { // Can't satisfy requirement c
ResolverInfoMisc_constPtr misc_info = dynamic_pointer_cast<const ResolverInfoMisc>(info);
- what = misc_info->message();
+ what = misc_info->message() + "\n";
details = logAdditionalInfo(collector.additionalInfo, item);
ResolverProblem_Ptr problem = new ResolverProblem (what, details);
// uninstall
ResolverInfoMisc_constPtr misc_info = dynamic_pointer_cast<const ResolverInfoMisc>(info);
// TranslatorExplanation %s = name of package, patch, selection ...
what = str::form (_("%s will not be uninstalled cause it is still required"), who.c_str());
- details = misc_info->message();
+ details = misc_info->message() + "\n";
details += logAdditionalInfo(collector.additionalInfo, item);
ResolverProblem_Ptr problem = new ResolverProblem (what, details);
// TranslatorExplanation %s = name of package, patch, selection ...
details = str::form (_("%s obsoletes %s. But %s cannot be deleted because it is locked."),
misc_info->other()->name().c_str(),
- who.c_str(), who.c_str());
+ who.c_str(), who.c_str()) + "\n";
details += logAdditionalInfo(collector.additionalInfo, item);
}
else
what = str::form (_("Cannot install %s because it is conflicting"),
who.c_str());
- details = misc_info->message();
+ details = misc_info->message() + "\n";
details += logAdditionalInfo(collector.additionalInfo, item);
if (misc_info->other())
details += logAdditionalInfo(collector.additionalInfo, misc_info->other());