Author: tgoettlicher
Date: Fri Aug 3 10:21:07 2007
New Revision: 6411
URL: http://svn.opensuse.org/viewcvs/zypp?rev=6411&view=rev
Log:
added xml output for some messages
Modified:
trunk/zypper/src/zypper-misc.cc
trunk/zypper/src/zypper.cc
Modified: trunk/zypper/src/zypper-misc.cc
URL: http://svn.opensuse.org/viewcvs/zypp/trunk/zypper/src/zypper-misc.cc?rev=6411&r1=6410&r2=6411&view=diff
==============================================================================
--- trunk/zypper/src/zypper-misc.cc (original)
+++ trunk/zypper/src/zypper-misc.cc Fri Aug 3 10:21:07 2007
@@ -1146,12 +1146,25 @@
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 << "" << 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 << "" << endl;
+ else
+ cout << _("WARNING: One of installed patches affects the package"
" manager itself, thus it requires restart before executing"
" next operations.") << endl;
+ }
return retv;
}
Modified: trunk/zypper/src/zypper.cc
URL: http://svn.opensuse.org/viewcvs/zypp/trunk/zypper/src/zypper.cc?rev=6411&r1=6410&r2=6411&view=diff
==============================================================================
--- trunk/zypper/src/zypper.cc (original)
+++ trunk/zypper/src/zypper.cc Fri Aug 3 10:21:07 2007
@@ -699,10 +699,18 @@
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 << "" << 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;
}
--
To unsubscribe, e-mail: zypp-commit+unsubscribe@opensuse.org
For additional commands, e-mail: zypp-commit+help@opensuse.org