/* set minimal environment... done */
/* prevent the user from sending signals */
if (setuid (0)) {
- perror ("setuid");
- fprintf (stderr, "Forgot to chmod this program?\n");
+// perror ("setuid");
+// fprintf (stderr, "Forgot to chmod this program?\n");
fprintf (stdout, "<?xml version='1.0'?>\n");
- fprintf (stdout, "<update-status version=\"0.5\">\n");
- fprintf (stdout, " <errors>");
- fprintf (stdout, " <error>Unable to check for patches and updates because /usr/sbin/zypp-checkpatches-wrapper helper programm is not set SUID root.\nThis problem might be solved by setting \"File Permissons\" in YaST \"Local Security\" tab to \"easy\" or by modifying /etc/permissions.local</error>");
- fprintf (stdout, " </errors>");
- fprintf (stdout, " </update-status>");
+ fprintf (stdout, "<stream>\n");
+ fprintf (stdout, "<message type=\"error\">Unable to check for patches and updates because /usr/sbin/zypp-checkpatches-wrapper helper programm is not set SUID root.\nThis problem might be solved by setting \"File Permissons\" in YaST \"Local Security\" tab to \"easy\" or by modifying /etc/permissions.local</message>\n");
+ fprintf (stdout, "</stream>\n");
return WRAPPER_ERROR;
}
if (retv == -1)
{
if (gSettings.machine_readable)
- cout << "<message type=\"warning\" text=\"" << _("Nothing to do.") << "\">" << endl;
+ cout << "<message type=\"warning\">" << _("Nothing to do.") << "</message>" << endl;
else
cout << _("Nothing to do.") << endl;
else if (retv == ZYPPER_EXIT_INF_REBOOT_NEEDED)
{
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;
+ cout << "<message type=\"warning\">" << _("One of installed patches requires reboot of"
+ " your machine. Please, do it as soon as possible.") << "</message>" << endl;
else
cout << _("WARNING: One of installed patches requires a reboot of"
" your machine. Please do it as soon as possible.") << endl;
return;
}
- cout << "<message>" << message->text() << "</message>" << endl;
+ cout << "<message type=\"info\">" << message->text() << "</message>" << endl;
//! \todo in interactive mode, wait for ENTER?
}
" using this command.");
if ( gSettings.machine_readable )
- cout << "<message type=\"error\" text=\"" << msg << "\">" << endl;
+ cout << "<message type=\"error\">" << msg << "</message>" << endl;
else
cerr << msg << endl;
cond_load_resolvables();
establish ();
- cout << "<update-status version=\"0.4\">" << endl;
+ cout << "<update-status version=\"0.6\">" << endl;
cout << "<update-list>" << endl;
if (!xml_list_patches ()) // Only list updates if no
xml_list_updates (); // affects-pkg-mgr patches are available