case SELECTED_IS_OLDER:
{
+ ostringstream cmdhint;
+ cmdhint << "zypper install --force " << _objsel->name() << "-" << _objsel->edition()
+ << "." << _objsel->arch();
+
ostringstream msg;
msg << str::form(_(
"The selected package '%s' from repository '%s' has lower"
_objsel->repoInfo().name().c_str());
msg << " ";
msg << str::form(
- // translators: %s = "--force"
- _("Use '%s' to force installation of the package."), "--force");
+ // translators: %s = "zypper install --force package-version.arch"
+ _("Use '%s' to force installation of the package."), cmdhint.str().c_str());
return msg.str();
}
}
else if (installed->edition() > selected->edition())
{
+ if (_opts.force)
+ return;
+
addFeedback(Feedback::SELECTED_IS_OLDER, pkg, selected, installed);
MIL << "Selected is older than the installed."
" Will not downgrade unless --force is used" << endl;