Author: jkupec Date: Tue Mar 25 13:59:40 2008 New Revision: 9266 URL: http://svn.opensuse.org/viewcvs/zypp?rev=9266&view=rev Log: - support reinstallation in the install summary (fate #302551) Modified: trunk/zypper/src/zypper-misc.cc Modified: trunk/zypper/src/zypper-misc.cc URL: http://svn.opensuse.org/viewcvs/zypp/trunk/zypper/src/zypper-misc.cc?rev=9266&r1=9265&r2=9266&view=diff ============================================================================== --- trunk/zypper/src/zypper-misc.cc (original) +++ trunk/zypper/src/zypper-misc.cc Tue Mar 25 13:59:40 2008 @@ -672,6 +672,7 @@ TO_UPGRADE, TO_DOWNGRADE, TO_INSTALL, + TO_REINSTALL, TO_REMOVE } SummaryType; @@ -688,6 +689,9 @@ case TO_INSTALL: cout << "<" << (end ? "/" : "") << "to-install>" << endl; break; + case TO_REINSTALL: + cout << "<" << (end ? "/" : "") << "to-reinstall>" << endl; + break; case TO_REMOVE: cout << "<" << (end ? "/" : "") << "to-remove>" << endl; break; @@ -769,6 +773,15 @@ it->second.size() )) % kind_to_string_localized(it->first, it->second.size())); break; + case TO_REINSTALL: + title = boost::str(format(_PL( + // TranslatorExplanation %s is a "package", "patch", "pattern", etc + "The following NEW %s is going to be re-installed:", + // TranslatorExplanation %s is a "packages", "patches", "patterns", etc + "The following NEW %s are going to be re-installed:", + it->second.size() + )) % kind_to_string_localized(it->first, it->second.size())); + break; case TO_REMOVE: title = boost::str(format(_PL( // TranslatorExplanation %s is a "package", "patch", "pattern", etc @@ -847,6 +860,7 @@ KindToResObjectSet toinstall; KindToResObjectSet toupgrade; KindToResObjectSet todowngrade; + KindToResObjectSet toreinstall; KindToResObjectSet toremove; // iterate the to_be_installed to find installs/upgrades/downgrades + size info @@ -869,6 +883,8 @@ { if (res->edition() > (*rmit)->edition()) toupgrade[res->kind()].insert(res); + else if (res->edition() == (*rmit)->edition()) + toreinstall[res->kind()].insert(res); else todowngrade[res->kind()].insert(res); @@ -916,6 +932,7 @@ show_summary_of_type(zypper, TO_UPGRADE, toupgrade); show_summary_of_type(zypper, TO_DOWNGRADE, todowngrade); show_summary_of_type(zypper, TO_INSTALL, toinstall); + show_summary_of_type(zypper, TO_REINSTALL, toremove); show_summary_of_type(zypper, TO_REMOVE, toremove); // "</install-summary>" -- To unsubscribe, e-mail: zypp-commit+unsubscribe@opensuse.org For additional commands, e-mail: zypp-commit+help@opensuse.org