if (retv < 0)
retv = ZYPPER_EXIT_OK;
else if (retv == ZYPPER_EXIT_INF_REBOOT_NEEDED)
- cout << _("WARNING: One of installed patches requires reboot of"
- " your machine. Please, do it as soon as possible.") << endl;
+ {
+ if (gSettings.machine_readable)
+ cout << "<message type=\"warning\" text=\"" << _("One of installed patches requires reboot of"
+ " your machine. Please, do it as soon as possible.") << "\">" << endl;
+ else
+ cout << _("WARNING: One of installed patches requires reboot of"
+ " your machine. Please, do it as soon as possible.") << endl;
+ }
else if (retv == ZYPPER_EXIT_INF_RESTART_NEEDED)
- cout << _("WARNING: One of installed patches affects the package"
+ {
+ if (gSettings.machine_readable)
+ cout << "<message type=\"warning\" text=\"" << _("One of installed patches affects the package"
+ " manager itself, thus it requires restart before executing"
+ " next operations.") << "\">" << endl;
+ else
+ cout << _("WARNING: One of installed patches affects the package"
" manager itself, thus it requires restart before executing"
" next operations.") << endl;
+ }
return retv;
}
catch (Exception & excpt_r) {
ZYPP_CAUGHT (excpt_r);
ERR << "A ZYpp transaction is already in progress." << endl;
- cerr << _("A ZYpp transaction is already in progress."
- "This means, there is another application using libzypp library for"
- "package management running. All such applications must be closed before"
- "using this command.") << endl;
+
+ if ( gSettings.machine_readable )
+ cout << "<message type=\"error\" text=\"" << _("A ZYpp transaction is already in progress."
+ "This means, there is another application using libzypp library for"
+ "package management running. All such applications must be closed before"
+ "using this command.") << "\">" << endl;
+ else
+ cerr << _("A ZYpp transaction is already in progress."
+ "This means, there is another application using libzypp library for"
+ "package management running. All such applications must be closed before"
+ "using this command.") << endl;
+
return ZYPPER_EXIT_ERR_ZYPP;
}