[PackageKit-commit] packagekit: Branch 'master' - 8 commits
Richard Hughes
hughsient at kemper.freedesktop.org
Mon Jul 20 10:09:35 PDT 2009
backends/portage/pk-backend-portage.c | 2
backends/portage/portageBackend.py | 181 +++++++++++----------
client/pk-console.c | 43 ++++
client/pk-monitor.c | 19 +-
client/pk-tools-common.h | 15 +
client/pkcon.xml | 37 ++++
client/pkmon.xml | 21 ++
configure.ac | 65 +++++--
contrib/browser-plugin/Makefile.am | 2
contrib/browser-plugin/pk-main.c | 41 +---
contrib/browser-plugin/pk-store.c | 175 --------------------
contrib/browser-plugin/pk-store.h | 64 -------
contrib/debuginfo-install/pk-debuginfo-install.xml | 4
src/pk-engine.c | 4
14 files changed, 286 insertions(+), 387 deletions(-)
New commits:
commit 4879754f71300a1eee6c810033241432793d1cb9
Author: Richard Hughes <richard at hughsie.com>
Date: Mon Jul 20 16:56:51 2009 +0100
Fix the exit codes for pkcon and pkmon, and document them. Fixes fd#22819
diff --git a/client/pk-console.c b/client/pk-console.c
index be0f167..de8d5b4 100644
--- a/client/pk-console.c
+++ b/client/pk-console.c
@@ -1773,6 +1773,7 @@ main (int argc, char *argv[])
gchar *text;
gboolean maybe_sync = TRUE;
PkBitfield filters = 0;
+ gint retval = PK_EXIT_CODE_SUCCESS;
const GOptionEntry options[] = {
{ "verbose", 'v', 0, G_OPTION_ARG_NONE, &verbose,
@@ -1834,12 +1835,13 @@ main (int argc, char *argv[])
if (program_version) {
g_print (VERSION "\n");
- return 0;
+ goto out_last;
}
if (argc < 2) {
g_print ("%s", options_help);
- return 1;
+ retval = PK_EXIT_CODE_SYNTAX_INVALID;
+ goto out_last;
}
loop = g_main_loop_new (NULL, FALSE);
@@ -1903,6 +1905,7 @@ main (int argc, char *argv[])
if (filters == 0) {
/* TRANSLATORS: The user specified an incorrect filter */
error = g_error_new (1, 0, "%s: %s", _("The filter specified was invalid"), filter);
+ retval = PK_EXIT_CODE_SYNTAX_INVALID;
goto out;
}
}
@@ -1921,12 +1924,14 @@ main (int argc, char *argv[])
if (value == NULL) {
/* TRANSLATORS: a search type can be name, details, file, etc */
error = g_error_new (1, 0, "%s", _("A search type is required, e.g. name"));
+ retval = PK_EXIT_CODE_SYNTAX_INVALID;
goto out;
} else if (strcmp (value, "name") == 0) {
if (details == NULL) {
/* TRANSLATORS: the user needs to provide a search term */
error = g_error_new (1, 0, "%s", _("A search term is required"));
+ retval = PK_EXIT_CODE_SYNTAX_INVALID;
goto out;
}
ret = pk_client_search_name (client_primary, filters, details, &error);
@@ -1935,6 +1940,7 @@ main (int argc, char *argv[])
if (details == NULL) {
/* TRANSLATORS: the user needs to provide a search term */
error = g_error_new (1, 0, "%s", _("A search term is required"));
+ retval = PK_EXIT_CODE_SYNTAX_INVALID;
goto out;
}
ret = pk_client_search_details (client_primary, filters, details, &error);
@@ -1943,6 +1949,7 @@ main (int argc, char *argv[])
if (details == NULL) {
/* TRANSLATORS: the user needs to provide a search term */
error = g_error_new (1, 0, "%s", _("A search term is required"));
+ retval = PK_EXIT_CODE_SYNTAX_INVALID;
goto out;
}
ret = pk_client_search_group (client_primary, filters, details, &error);
@@ -1951,6 +1958,7 @@ main (int argc, char *argv[])
if (details == NULL) {
/* TRANSLATORS: the user needs to provide a search term */
error = g_error_new (1, 0, "%s", _("A search term is required"));
+ retval = PK_EXIT_CODE_SYNTAX_INVALID;
goto out;
}
ret = pk_client_search_file (client_primary, filters, details, &error);
@@ -1963,6 +1971,7 @@ main (int argc, char *argv[])
if (value == NULL) {
/* TRANSLATORS: the user did not specify what they wanted to install */
error = g_error_new (1, 0, "%s", _("A package name or filename to install is required"));
+ retval = PK_EXIT_CODE_SYNTAX_INVALID;
goto out;
}
ret = pk_console_install_stuff (client_primary, argv, &error);
@@ -1971,6 +1980,7 @@ main (int argc, char *argv[])
if (value == NULL || details == NULL || parameter == NULL) {
/* TRANSLATORS: geeky error, 99.9999% of users won't see this */
error = g_error_new (1, 0, "%s", _("A type, key_id and package_id are required"));
+ retval = PK_EXIT_CODE_SYNTAX_INVALID;
goto out;
}
ret = pk_client_install_signature (client_primary, PK_SIGTYPE_ENUM_GPG, details, parameter, &error);
@@ -1979,19 +1989,22 @@ main (int argc, char *argv[])
if (value == NULL) {
/* TRANSLATORS: the user did not specify what they wanted to remove */
error = g_error_new (1, 0, "%s", _("A package name to remove is required"));
+ retval = PK_EXIT_CODE_SYNTAX_INVALID;
goto out;
}
ret = pk_console_remove_packages (client_primary, argv, &error);
} else if (strcmp (mode, "download") == 0) {
if (value == NULL || details == NULL) {
/* TRANSLATORS: the user did not specify anything about what to download or where */
- error = g_error_new (1, 0, "%s", _("A destination directory and then the package names to download are required"));
+ error = g_error_new (1, 0, "%s", _("A destination directory and the package names to download are required"));
+ retval = PK_EXIT_CODE_SYNTAX_INVALID;
goto out;
}
ret = g_file_test (value, G_FILE_TEST_EXISTS | G_FILE_TEST_IS_DIR);
if (!ret) {
/* TRANSLATORS: the directory does not exist, so we can't continue */
error = g_error_new (1, 0, "%s: %s", _("Directory not found"), value);
+ retval = PK_EXIT_CODE_FILE_NOT_FOUND;
goto out;
}
ret = pk_console_download_packages (client_primary, argv, value, &error);
@@ -1999,6 +2012,7 @@ main (int argc, char *argv[])
if (value == NULL) {
/* TRANSLATORS: geeky error, 99.9999% of users won't see this */
error = g_error_new (1, 0, "%s", _("A licence identifier (eula-id) is required"));
+ retval = PK_EXIT_CODE_SYNTAX_INVALID;
goto out;
}
ret = pk_client_accept_eula (client_primary, value, &error);
@@ -2008,6 +2022,7 @@ main (int argc, char *argv[])
if (value == NULL) {
/* TRANSLATORS: geeky error, 99.9999% of users won't see this */
error = g_error_new (1, 0, "%s", _("A transaction identifier (tid) is required"));
+ retval = PK_EXIT_CODE_SYNTAX_INVALID;
goto out;
}
ret = pk_client_rollback (client_primary, value, &error);
@@ -2024,6 +2039,7 @@ main (int argc, char *argv[])
if (value == NULL) {
/* TRANSLATORS: The user did not specify a package name */
error = g_error_new (1, 0, "%s", _("A package name to resolve is required"));
+ retval = PK_EXIT_CODE_SYNTAX_INVALID;
goto out;
}
ret = pk_client_resolve (client_primary, filters, argv+2, &error);
@@ -2032,6 +2048,7 @@ main (int argc, char *argv[])
if (value == NULL) {
/* TRANSLATORS: The user did not specify a repository (software source) name */
error = g_error_new (1, 0, "%s", _("A repository name is required"));
+ retval = PK_EXIT_CODE_SYNTAX_INVALID;
goto out;
}
ret = pk_client_repo_enable (client_primary, value, TRUE, &error);
@@ -2040,6 +2057,7 @@ main (int argc, char *argv[])
if (value == NULL) {
/* TRANSLATORS: The user did not specify a repository (software source) name */
error = g_error_new (1, 0, "%s", _("A repository name is required"));
+ retval = PK_EXIT_CODE_SYNTAX_INVALID;
goto out;
}
ret = pk_client_repo_enable (client_primary, value, FALSE, &error);
@@ -2048,6 +2066,7 @@ main (int argc, char *argv[])
if (value == NULL || details == NULL || parameter == NULL) {
/* TRANSLATORS: The user didn't provide any data */
error = g_error_new (1, 0, "%s", _("A repo name, parameter and value are required"));
+ retval = PK_EXIT_CODE_SYNTAX_INVALID;
goto out;
}
ret = pk_client_repo_set_data (client_primary, value, details, parameter, &error);
@@ -2061,18 +2080,21 @@ main (int argc, char *argv[])
if (value == NULL) {
/* TRANSLATORS: The user didn't specify what action to use */
error = g_error_new (1, 0, "%s", _("An action, e.g. 'update-system' is required"));
+ retval = PK_EXIT_CODE_SYNTAX_INVALID;
goto out;
}
role = pk_role_enum_from_text (value);
if (role == PK_ROLE_ENUM_UNKNOWN) {
/* TRANSLATORS: The user specified an invalid action */
error = g_error_new (1, 0, "%s", _("A correct role is required"));
+ retval = PK_EXIT_CODE_SYNTAX_INVALID;
goto out;
}
ret = pk_control_get_time_since_action (control, role, &time_ms, &error);
if (!ret) {
/* TRANSLATORS: we keep a database updated with the time that an action was last executed */
error = g_error_new (1, 0, "%s", _("Failed to get the time since this action was last completed"));
+ retval = PK_EXIT_CODE_FAILED;
goto out;
}
g_print ("time since %s is %is\n", value, time_ms);
@@ -2082,6 +2104,7 @@ main (int argc, char *argv[])
if (value == NULL) {
/* TRANSLATORS: The user did not provide a package name */
error = g_error_new (1, 0, "%s", _("A package name is required"));
+ retval = PK_EXIT_CODE_SYNTAX_INVALID;
goto out;
}
ret = pk_console_get_depends (client_primary, filters, value, &error);
@@ -2093,6 +2116,7 @@ main (int argc, char *argv[])
if (value == NULL) {
/* TRANSLATORS: The user did not provide a package name */
error = g_error_new (1, 0, "%s", _("A package name is required"));
+ retval = PK_EXIT_CODE_SYNTAX_INVALID;
goto out;
}
ret = pk_console_get_update_detail (client_primary, value, &error);
@@ -2101,6 +2125,7 @@ main (int argc, char *argv[])
if (value == NULL) {
/* TRANSLATORS: The user did not provide a package name */
error = g_error_new (1, 0, "%s", _("A package name is required"));
+ retval = PK_EXIT_CODE_SYNTAX_INVALID;
goto out;
}
ret = pk_console_get_requires (client_primary, filters, value, &error);
@@ -2109,6 +2134,7 @@ main (int argc, char *argv[])
if (value == NULL) {
/* TRANSLATORS: each package "provides" certain things, e.g. mime(gstreamer-decoder-mp3), the user didn't specify it */
error = g_error_new (1, 0, "%s", _("A package provide string is required"));
+ retval = PK_EXIT_CODE_SYNTAX_INVALID;
goto out;
}
ret = pk_client_what_provides (client_primary, filters, PK_PROVIDES_ENUM_CODEC, value, &error);
@@ -2117,6 +2143,7 @@ main (int argc, char *argv[])
if (value == NULL) {
/* TRANSLATORS: The user did not provide a package name */
error = g_error_new (1, 0, "%s", _("A package name is required"));
+ retval = PK_EXIT_CODE_SYNTAX_INVALID;
goto out;
}
ret = pk_console_get_details (client_primary, value, &error);
@@ -2125,6 +2152,7 @@ main (int argc, char *argv[])
if (value == NULL) {
/* TRANSLATORS: The user did not provide a package name */
error = g_error_new (1, 0, "%s", _("A package name is required"));
+ retval = PK_EXIT_CODE_SYNTAX_INVALID;
goto out;
}
ret = pk_console_get_files (client_primary, value, &error);
@@ -2133,6 +2161,7 @@ main (int argc, char *argv[])
if (value == NULL) {
/* TRANSLATORS: The user didn't specify a filename to create as a list */
error = g_error_new (1, 0, "%s", _("A list file name to create is required"));
+ retval = PK_EXIT_CODE_SYNTAX_INVALID;
goto out;
}
ret = pk_console_list_create (client_primary, value, &error);
@@ -2142,6 +2171,7 @@ main (int argc, char *argv[])
if (value == NULL) {
/* TRANSLATORS: The user didn't specify a filename to open as a list */
error = g_error_new (1, 0, "%s", _("A list file to open is required"));
+ retval = PK_EXIT_CODE_SYNTAX_INVALID;
goto out;
}
ret = pk_console_list_diff (client_primary, value, &error);
@@ -2151,6 +2181,7 @@ main (int argc, char *argv[])
if (value == NULL) {
/* TRANSLATORS: The user didn't specify a filename to open as a list */
error = g_error_new (1, 0, "%s", _("A list file to open is required"));
+ retval = PK_EXIT_CODE_SYNTAX_INVALID;
goto out;
}
ret = pk_console_list_install (client_primary, value, &error);
@@ -2222,6 +2253,8 @@ out:
g_print ("%s: %s\n", _("Command failed"), error->message);
g_error_free (error);
}
+ if (retval == PK_EXIT_CODE_SUCCESS)
+ retval = PK_EXIT_CODE_FAILED;
}
g_free (options_help);
@@ -2231,8 +2264,8 @@ out:
g_object_unref (client_primary);
g_object_unref (client_sync);
g_object_unref (client_secondary);
-
- return 0;
+out_last:
+ return retval;
}
/***************************************************************************
diff --git a/client/pk-monitor.c b/client/pk-monitor.c
index e2d1d40..3ec577c 100644
--- a/client/pk-monitor.c
+++ b/client/pk-monitor.c
@@ -32,6 +32,8 @@
#include "egg-debug.h"
+#include "pk-tools-common.h"
+
static PkControl *control = NULL;
static gboolean verbose = FALSE;
@@ -119,6 +121,7 @@ main (int argc, char *argv[])
gboolean program_version = FALSE;
gchar *state;
GOptionContext *context;
+ gint retval = PK_EXIT_CODE_SUCCESS;
const GOptionEntry options[] = {
{ "verbose", 'v', 0, G_OPTION_ARG_NONE, &verbose,
@@ -147,7 +150,7 @@ main (int argc, char *argv[])
if (program_version) {
g_print (VERSION "\n");
- return 0;
+ goto out;
}
egg_debug_init (verbose);
@@ -174,17 +177,19 @@ main (int argc, char *argv[])
g_signal_connect (tlist, "status-changed",
G_CALLBACK (pk_monitor_task_list_changed_cb), NULL);
-
egg_debug ("refreshing task list");
ret = pk_task_list_refresh (tlist);
- if (!ret)
- g_error ("cannot refresh transaction list");
+ if (!ret) {
+ g_print ("%s\n", _("Cannot show the list of transactions"));
+ retval = PK_EXIT_CODE_FAILED;
+ goto out;
+ }
pk_task_list_print (tlist);
/* only print state when verbose */
if (verbose) {
state = pk_control_get_daemon_state (control, NULL);
- g_print ("%s", state);
+ g_print ("%s\n", state);
g_free (state);
}
@@ -194,6 +199,6 @@ main (int argc, char *argv[])
g_object_unref (control);
g_object_unref (tlist);
g_object_unref (pconnection);
-
- return 0;
+out:
+ return retval;
}
diff --git a/client/pk-tools-common.h b/client/pk-tools-common.h
index ed8b6bf..fbfe357 100644
--- a/client/pk-tools-common.h
+++ b/client/pk-tools-common.h
@@ -25,6 +25,21 @@
#include <glib/gi18n.h>
#include <packagekit-glib/packagekit.h>
+/* Reserved exit codes:
+ * 1 miscellaneous errors, such as "divide by zero"
+ * 2 misuse of shell builtins
+ * 126 command invoked cannot execute
+ * 127 "command not found"
+ * 128 invalid argument to exit
+ * 128+n fatal error signal "n"
+ * 130 script terminated by Control-C
+ * 255 exit status out of range
+ */
+#define PK_EXIT_CODE_SUCCESS 0
+#define PK_EXIT_CODE_FAILED 1
+#define PK_EXIT_CODE_SYNTAX_INVALID 3
+#define PK_EXIT_CODE_FILE_NOT_FOUND 4
+
guint pk_console_get_number (const gchar *question,
guint maxnum);
gboolean pk_console_get_prompt (const gchar *question,
diff --git a/client/pkcon.xml b/client/pkcon.xml
index f550f59..ce31201 100644
--- a/client/pkcon.xml
+++ b/client/pkcon.xml
@@ -66,6 +66,43 @@ manpage.1: manpage.xml
</para>
</refsect1>
<refsect1>
+ <title>Return values</title>
+ <variablelist>
+ <varlistentry>
+ <term>
+ <option>0</option>
+ </term>
+ <listitem>
+ <para>Success, at least one package was installed</para>
+ </listitem>
+ </varlistentry>
+ <varlistentry>
+ <term>
+ <option>1</option>
+ </term>
+ <listitem>
+ <para>Failed with miscellaneous internal error.</para>
+ </listitem>
+ </varlistentry>
+ <varlistentry>
+ <term>
+ <option>3</option>
+ </term>
+ <listitem>
+ <para>Failed with syntax error, or failed to parse command.</para>
+ </listitem>
+ </varlistentry>
+ <varlistentry>
+ <term>
+ <option>4</option>
+ </term>
+ <listitem>
+ <para>Failed as a file or directory was not found.</para>
+ </listitem>
+ </varlistentry>
+ </variablelist>
+ </refsect1>
+ <refsect1>
<title>SEE ALSO</title>
<para>pkmon (1).</para>
<para>
diff --git a/client/pkmon.xml b/client/pkmon.xml
index 7e50a16..09ebc55 100644
--- a/client/pkmon.xml
+++ b/client/pkmon.xml
@@ -66,6 +66,27 @@ manpage.1: manpage.xml
</para>
</refsect1>
<refsect1>
+ <title>Return values</title>
+ <variablelist>
+ <varlistentry>
+ <term>
+ <option>0</option>
+ </term>
+ <listitem>
+ <para>Success, at least one package was installed</para>
+ </listitem>
+ </varlistentry>
+ <varlistentry>
+ <term>
+ <option>1</option>
+ </term>
+ <listitem>
+ <para>Failed with miscellaneous internal error.</para>
+ </listitem>
+ </varlistentry>
+ </variablelist>
+ </refsect1>
+ <refsect1>
<title>SEE ALSO</title>
<para>pkcon (1).</para>
<para>
diff --git a/contrib/debuginfo-install/pk-debuginfo-install.xml b/contrib/debuginfo-install/pk-debuginfo-install.xml
index 66528a5..ea62bcd 100644
--- a/contrib/debuginfo-install/pk-debuginfo-install.xml
+++ b/contrib/debuginfo-install/pk-debuginfo-install.xml
@@ -133,7 +133,7 @@ manpage.1: manpage.xml
<option>1</option>
</term>
<listitem>
- <para>Miscellaneous internal errors.</para>
+ <para>Failed with miscellaneous internal error.</para>
</listitem>
</varlistentry>
<varlistentry>
@@ -157,7 +157,7 @@ manpage.1: manpage.xml
<option>5</option>
</term>
<listitem>
- <para>Nothing to do.</para>
+ <para>Failed as nothing to do.</para>
</listitem>
</varlistentry>
<varlistentry>
commit 97e4a6660da322023b182a750243d1cd6f75ab05
Author: Richard Hughes <richard at hughsie.com>
Date: Mon Jul 20 11:12:54 2009 +0100
plugin: use the pdata instance handle, rather than our own lookup function
diff --git a/contrib/browser-plugin/Makefile.am b/contrib/browser-plugin/Makefile.am
index 6e538ef..61a7239 100644
--- a/contrib/browser-plugin/Makefile.am
+++ b/contrib/browser-plugin/Makefile.am
@@ -17,8 +17,6 @@ packagekit_plugin_la_LIBADD = \
$(top_builddir)/lib/packagekit-glib/libpackagekit-glib.la
packagekit_plugin_la_SOURCES = \
- pk-store.c \
- pk-store.h \
pk-plugin.c \
pk-plugin.h \
pk-plugin-install.c \
diff --git a/contrib/browser-plugin/pk-main.c b/contrib/browser-plugin/pk-main.c
index e0ef751..df10105 100644
--- a/contrib/browser-plugin/pk-main.c
+++ b/contrib/browser-plugin/pk-main.c
@@ -32,13 +32,11 @@
#include <dlfcn.h>
#include "pk-main.h"
-#include "pk-store.h"
#include "pk-plugin.h"
#include "pk-plugin-install.h"
static NPNetscapeFuncs *npnfuncs = NULL;
static void *module_handle = NULL;
-static PkStore *store = NULL;
#ifndef HIBYTE
#define HIBYTE(x) ((((uint32_t)(x)) & 0xff00) >> 8)
@@ -78,7 +76,7 @@ pk_warning_real (const gchar *func, const gchar *file, const int line, const gch
g_vasprintf (&buffer, format, args);
va_end (args);
- g_print ("FN:%s FC:%s LN:%i\n\t%s\n", file, func, line, buffer);
+ g_print ("FN:%s FC:%s LN:%i\n!!\t%s\n", file, func, line, buffer);
g_free(buffer);
}
@@ -173,7 +171,7 @@ pk_main_newp (NPMIMEType pluginType, NPP instance, uint16_t mode, int16_t argc,
}
/* add to list */
- pk_store_add_plugin (store, instance, plugin);
+ instance->pdata = plugin;
npnfuncs->setvalue (instance, NPPVpluginWindowBool, (void *) FALSE);
@@ -186,20 +184,10 @@ pk_main_newp (NPMIMEType pluginType, NPP instance, uint16_t mode, int16_t argc,
static NPError
pk_main_destroy (NPP instance, NPSavedData **save)
{
- gboolean ret;
- PkPlugin *plugin;
+ PkPlugin *plugin = PK_PLUGIN (instance->pdata);
pk_debug ("pk_main_destroy [%p]", instance);
-
- /* remove from list */
- ret = pk_store_remove_plugin (store, instance);
- if (!ret)
- return NPERR_GENERIC_ERROR;
-
- /* find plugin */
- plugin = pk_store_lookup_plugin (store, instance);
- if (plugin == NULL)
- return NPERR_GENERIC_ERROR;
+ g_object_unref (plugin);
/* free content instance */
g_signal_handlers_disconnect_by_func (plugin, G_CALLBACK (pk_main_refresh_cb), instance);
@@ -232,7 +220,7 @@ pk_main_handle_event (NPP instance, void *event)
pk_debug ("pk_main_handle_event [%p]", instance);
/* find plugin */
- plugin = pk_store_lookup_plugin (store, instance);
+ plugin = PK_PLUGIN (instance->pdata);
if (plugin == NULL)
return NPERR_GENERIC_ERROR;
@@ -309,13 +297,20 @@ pk_main_set_window (NPP instance, NPWindow* pNPWindow)
}
/* find plugin */
- plugin = pk_store_lookup_plugin (store, instance);
- if (plugin == NULL) {
- pk_warning ("NULL plugin");
+ plugin = PK_PLUGIN (instance->pdata);
+ if (plugin == NULL)
return NPERR_GENERIC_ERROR;
- }
+ /* type */
+ pk_debug ("type=%i (NPWindowTypeWindow=%i, NPWindowTypeDrawable=%i)",
+ pNPWindow->type, NPWindowTypeWindow, NPWindowTypeDrawable);
+
+ /* do we have a callback struct (WebKit doesn't send this) */
ws_info = (NPSetWindowCallbackStruct *) pNPWindow->ws_info;
+ if (ws_info == NULL) {
+ pk_debug ("no callback struct");
+ goto out;
+ }
/* no visual yet */
if (ws_info->visual == NULL) {
@@ -422,8 +417,6 @@ NP_Initialize (NPNetscapeFuncs *npnf, NPPluginFuncs *nppfuncs)
if (module_handle != NULL)
return NPERR_NO_ERROR;
- store = pk_store_new ();
-
/* if libpackagekit get unloaded, bad stuff happens */
pk_main_make_module_resident ();
@@ -444,8 +437,6 @@ NPError
NP_Shutdown ()
{
pk_debug ("NP_Shutdown");
-
- g_object_unref (store);
return NPERR_NO_ERROR;
}
diff --git a/contrib/browser-plugin/pk-store.c b/contrib/browser-plugin/pk-store.c
deleted file mode 100644
index 3671d04..0000000
--- a/contrib/browser-plugin/pk-store.c
+++ /dev/null
@@ -1,175 +0,0 @@
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*-
- *
- * Copyright (C) 2009 Richard Hughes <richard at hughsie.com>
- *
- * Licensed under the GNU General Public License Version 2
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
- */
-
-#include <config.h>
-
-#include <glib-object.h>
-
-#include "pk-main.h"
-#include "pk-store.h"
-
-#define PK_STORE_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), PK_TYPE_STORE, PkStorePrivate))
-
-struct PkStorePrivate
-{
- GHashTable *data;
-};
-
-G_DEFINE_TYPE (PkStore, pk_store, G_TYPE_OBJECT)
-
-/**
- * pk_store_lookup_plugin:
- **/
-PkPlugin *
-pk_store_lookup_plugin (PkStore *store, NPP instance)
-{
- PkPlugin *plugin;
-
- g_return_val_if_fail (PK_IS_STORE (store), NULL);
-
- /* find plugin for this instance */
- plugin = g_hash_table_lookup (store->priv->data, instance);
-
- return plugin;
-}
-
-/**
- * pk_store_add_plugin:
- **/
-gboolean
-pk_store_add_plugin (PkStore *store, NPP instance, PkPlugin *plugin)
-{
- PkPlugin *plugin_tmp;
- gboolean ret = TRUE;
-
- /* check it's not already here */
- plugin_tmp = pk_store_lookup_plugin (store, instance);
- if (plugin_tmp != NULL) {
- pk_warning ("already added plugin <%p> for instance [%p]", plugin_tmp, instance);
- ret = FALSE;
- goto out;
- }
-
- /* it's no, so add it */
- pk_debug ("adding plugin <%p> for instance [%p]", plugin, instance);
-
- g_hash_table_insert (store->priv->data, instance, g_object_ref (plugin));
-out:
- return ret;
-}
-
-/**
- * pk_store_remove_plugin:
- **/
-gboolean
-pk_store_remove_plugin (PkStore *store, NPP instance)
-{
- gboolean ret;
-
- pk_debug ("removing plugin for instance [%p]", instance);
-
- /* remove from hash (also unrefs) */
- ret = g_hash_table_remove (store->priv->data, instance);
- if (!ret) {
- pk_warning ("nothing to remove for instance [%p]", instance);
- goto out;
- }
-out:
- return ret;
-}
-
-/**
- * pk_store_finalize:
- **/
-static void
-pk_store_finalize (GObject *object)
-{
- PkStore *store;
- g_return_if_fail (PK_IS_STORE (object));
- store = PK_STORE (object);
-
- g_hash_table_unref (store->priv->data);
-
- G_OBJECT_CLASS (pk_store_parent_class)->finalize (object);
-}
-
-/**
- * pk_store_class_init:
- **/
-static void
-pk_store_class_init (PkStoreClass *klass)
-{
- GObjectClass *object_class = G_OBJECT_CLASS (klass);
- object_class->finalize = pk_store_finalize;
-
- g_type_class_add_private (klass, sizeof (PkStorePrivate));
-}
-
-/**
- * pk_store_init:
- **/
-static void
-pk_store_init (PkStore *store)
-{
- store->priv = PK_STORE_GET_PRIVATE (store);
- store->priv->data = g_hash_table_new_full (g_direct_hash, g_direct_equal, NULL, g_object_unref);
-}
-
-/**
- * pk_store_new:
- * Return value: A new store_install class instance.
- **/
-PkStore *
-pk_store_new (void)
-{
- PkStore *store;
- store = g_object_new (PK_TYPE_STORE, NULL);
- return PK_STORE (store);
-}
-
-/***************************************************************************
- *** MAKE CHECK TESTS ***
- ***************************************************************************/
-#ifdef EGG_TEST
-#include "egg-test.h"
-
-void
-egg_test_store_install (EggTest *test)
-{
- PkStore *store;
-
- if (!egg_test_start (test, "PkStore"))
- return;
-
- /************************************************************/
- egg_test_title (test, "get an instance");
- store = pk_store_new ();
- if (store != NULL)
- egg_test_success (test, NULL);
- else
- egg_test_failed (test, NULL);
-
- g_object_unref (store);
-
- egg_test_end (test);
-}
-#endif
-
diff --git a/contrib/browser-plugin/pk-store.h b/contrib/browser-plugin/pk-store.h
deleted file mode 100644
index 3969a1b..0000000
--- a/contrib/browser-plugin/pk-store.h
+++ /dev/null
@@ -1,64 +0,0 @@
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*-
- *
- * Copyright (C) 2009 Richard Hughes <richard at hughsie.com>
- *
- * Licensed under the GNU General Public License Version 2
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
- */
-
-#ifndef __PK_STORE_H
-#define __PK_STORE_H
-
-#include <glib-object.h>
-#include <npapi.h>
-
-#include "pk-plugin.h"
-
-G_BEGIN_DECLS
-
-#define PK_TYPE_STORE (pk_store_get_type ())
-#define PK_STORE(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), PK_TYPE_STORE, PkStore))
-#define PK_STORE_CLASS(k) (G_TYPE_CHECK_CLASS_CAST((k), PK_TYPE_STORE, PkStoreClass))
-#define PK_IS_STORE(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), PK_TYPE_STORE))
-#define PK_IS_STORE_CLASS(k) (G_TYPE_CHECK_CLASS_TYPE ((k), PK_TYPE_STORE))
-#define PK_STORE_GET_CLASS(o) (G_TYPE_INSTANCE_GET_CLASS ((o), PK_TYPE_STORE, PkStoreClass))
-
-typedef struct PkStorePrivate PkStorePrivate;
-
-typedef struct
-{
- GObject parent;
- PkStorePrivate *priv;
-} PkStore;
-
-typedef struct
-{
- GObjectClass parent_class;
-} PkStoreClass;
-
-GType pk_store_get_type (void);
-PkStore *pk_store_new (void);
-gboolean pk_store_add_plugin (PkStore *store,
- NPP instance,
- PkPlugin *plugin);
-gboolean pk_store_remove_plugin (PkStore *store,
- NPP instance);
-PkPlugin *pk_store_lookup_plugin (PkStore *store,
- NPP instance);
-
-G_END_DECLS
-
-#endif /* __PK_STORE_H */
commit b6a5f82497349d7420c5a4a5f6e6692d47828787
Author: Mounir Lamouri (volkmar) <mounir.lamouri at gmail.com>
Date: Mon Jul 20 00:48:27 2009 +0200
portage: cleaning, fixing not-found-error, misc
diff --git a/backends/portage/portageBackend.py b/backends/portage/portageBackend.py
index d8ff3f0..3da43ef 100755
--- a/backends/portage/portageBackend.py
+++ b/backends/portage/portageBackend.py
@@ -1075,59 +1075,69 @@ class PackageKitPortageBackend(PackageKitBaseBackend, PackagekitPackage):
def remove_packages(self, allowdep, pkgs):
# can't use allowdep: never removing dep
- # TODO: filters ?
+
self.status(STATUS_RUNNING)
self.allow_cancel(True)
self.percentage(None)
+ cpv_list = []
+ packages = []
+
+ myopts = {} # TODO: --nodeps ?
+ #myopts['--nodeps'] = True
+ spinner = ""
+ favorites = []
+ settings, trees, mtimedb = _emerge.actions.load_emerge_config()
+ spinner = _emerge.stdout_spinner.stdout_spinner()
+ root_config = trees[self.portage_settings["ROOT"]]["root_config"]
+
+ # create cpv_list
for pkg in pkgs:
cpv = id_to_cpv(pkg)
- # is cpv valid
- if not portage.portdb.cpv_exists(cpv):
- self.error(ERROR_PACKAGE_NOT_FOUND, "Package %s was not found" % pkg)
+ if not self.is_cpv_valid(cpv):
+ self.error(ERROR_PACKAGE_NOT_FOUND,
+ "Package %s was not found" % pkg)
continue
- # is package installed
- if not self.vardb.match(cpv):
+ if not self.is_installed(cpv):
self.error(ERROR_PACKAGE_NOT_INSTALLED,
"Package %s is not installed" % pkg)
continue
- myopts = {} # TODO: --nodepends ?
- spinner = ""
- favorites = []
- settings, trees, mtimedb = _emerge.load_emerge_config()
- spinner = _emerge.stdout_spinner()
- rootconfig = _emerge.RootConfig(self.portage_settings, trees["/"],
- portage._sets.load_default_config(self.portage_settings, trees["/"])
- )
+ cpv_list.append(cpv)
- if "resume" in mtimedb and \
- "mergelist" in mtimedb["resume"] and \
- len(mtimedb["resume"]["mergelist"]) > 1:
- mtimedb["resume_backup"] = mtimedb["resume"]
- del mtimedb["resume"]
- mtimedb.commit()
-
- mtimedb["resume"] = {}
- mtimedb["resume"]["myopts"] = myopts.copy()
- mtimedb["resume"]["favorites"] = [str(x) for x in favorites]
-
- db_keys = list(portage.portdb._aux_cache_keys)
- metadata = self.get_metadata(cpv, db_keys)
- package = _emerge.Package(
+ # create packages list
+ db_keys = list(portage.portdb._aux_cache_keys)
+ for cpv in cpv_list:
+ metadata = self.get_metadata(cpv, db_keys, in_dict=True)
+ package = _emerge.Package.Package(
type_name="ebuild",
built=True,
installed=True,
- root_config=rootconfig,
+ root_config=root_config,
cpv=cpv,
metadata=metadata,
operation="uninstall")
+ packages.append(package)
+ del db_keys
- mergetask = _emerge.Scheduler(settings,
- trees, mtimedb, myopts, spinner, [package], favorites, package)
- mergetask.merge()
+ # now, we can remove
+ if "resume" in mtimedb and \
+ "mergelist" in mtimedb["resume"] and \
+ len(mtimedb["resume"]["mergelist"]) > 1:
+ mtimedb["resume_backup"] = mtimedb["resume"]
+ del mtimedb["resume"]
+ mtimedb.commit()
+
+ mtimedb["resume"] = {}
+ mtimedb["resume"]["myopts"] = myopts.copy()
+ mtimedb["resume"]["favorites"] = [str(x) for x in favorites]
+
+ mergetask = _emerge.Scheduler.Scheduler(settings,
+ trees, mtimedb, myopts, spinner,
+ packages, favorites, None)
+ mergetask.merge()
def repo_enable(self, repoid, enable):
# NOTES: use layman API >= 1.2.3
commit d1f0fa4c1d683159c54fd312034ac9d5759c3341
Author: Mounir Lamouri (volkmar) <mounir.lamouri at gmail.com>
Date: Sun Jul 19 13:26:39 2009 +0200
portage: trivial: fix stupid error
diff --git a/backends/portage/portageBackend.py b/backends/portage/portageBackend.py
index 942d5cc..d8ff3f0 100755
--- a/backends/portage/portageBackend.py
+++ b/backends/portage/portageBackend.py
@@ -55,6 +55,7 @@ from itertools import izip
# TODO:
# ERRORS with messages ?
# remove percentage(None) if percentage is used
+# protection against signal when installing/removing
# Map Gentoo categories to the PackageKit group name space
CATEGORY_GROUP_MAP = {
@@ -87,7 +88,7 @@ CATEGORY_GROUP_MAP = {
"dev-cpp" : GROUP_PROGRAMMING,
"dev-db" : GROUP_PROGRAMMING,
"dev-dotnet" : GROUP_PROGRAMMING,
- "dev-embedded" : GROUP_PROGRAMMING,,
+ "dev-embedded" : GROUP_PROGRAMMING,
"dev-games" : GROUP_PROGRAMMING,
"dev-haskell" : GROUP_PROGRAMMING,
"dev-java" : GROUP_PROGRAMMING,
commit fe534787aa921d6a4ce30035bedb8f75fd7f145d
Author: Mounir Lamouri (volkmar) <mounir.lamouri at gmail.com>
Date: Sat Jul 18 12:15:01 2009 +0200
Add networkmanager, connman and service-packs options to prevent auto-magic deps
diff --git a/configure.ac b/configure.ac
index 15f5d3d..34598a0 100644
--- a/configure.ac
+++ b/configure.ac
@@ -233,18 +233,27 @@ fi
AM_CONDITIONAL(PK_BUILD_MANAGED, test $build_managed = "yes")
dnl ---------------------------------------------------------------------------
-dnl - libarchive
-dnl ---------------------------------------------------------------------------
-AC_CHECK_HEADERS(archive.h,
- HAVE_ARCHIVE_H="yes",
- HAVE_ARCHIVE_H="no")
-if test "x$HAVE_ARCHIVE_H" = "xyes"; then
- AC_DEFINE(HAVE_ARCHIVE_H)
- ARCHIVE_LIBS=-larchive
- AC_SUBST(ARCHIVE_LIBS)
+dnl - Service Packs (default enabled)
+dnl ---------------------------------------------------------------------------
+AC_ARG_ENABLE(service-packs, AC_HELP_STRING([--enable-service-packs],
+ [Enable Service Packs]), enable_servicepacks=$enableval)
+if test x$enable_servicepacks != xno; then
+ AC_CHECK_HEADERS(archive.h,
+ HAVE_ARCHIVE_H="yes",
+ HAVE_ARCHIVE_H="no")
+ if test "x$HAVE_ARCHIVE_H" = "xyes"; then
+ AC_DEFINE(HAVE_ARCHIVE_H)
+ ARCHIVE_LIBS=-larchive
+ AC_SUBST(ARCHIVE_LIBS)
+ else
+ if test x$enable_servicepacks = xyes; then
+ AC_MSG_ERROR([Service Packs support need libarchive])
+ fi
+ fi
else
- AC_MSG_WARN([Cannot find archive.h. Service packs cannot be created or checked.])
+ HAVE_ARCHIVE_H="no"
fi
+
AM_CONDITIONAL(HAVE_ARCHIVE_H, test x$HAVE_ARCHIVE_H = xyes)
dnl ---------------------------------------------------------------------------
@@ -268,12 +277,20 @@ AC_PATH_PROG([MOC], [moc-qt4])
networking_apis="unix"
dnl ---------------------------------------------------------------------------
-dnl - Is NetworkManager available?
+dnl - NetworkManager (default enabled)
dnl ---------------------------------------------------------------------------
-PKG_CHECK_MODULES(LIBNM, libnm_glib >= $LIBNM_GLIB_REQUIRED, PK_BUILD_NETWORKMANAGER="yes", PK_BUILD_NETWORKMANAGER="no")
-if test "x$PK_BUILD_NETWORKMANAGER" = "xyes"; then
- networking_apis="${networking_apis},NetworkManager"
- AC_DEFINE(PK_BUILD_NETWORKMANAGER, 1, [define if NetworkManager is installed])
+AC_ARG_ENABLE(networkmanager, AC_HELP_STRING([--enable-networkmanager],
+ [Enable NetworkManager]), enable_networkmanager=$enableval)
+if test x$enable_networkmanager != xno; then
+ PKG_CHECK_MODULES(LIBNM, libnm_glib >= $LIBNM_GLIB_REQUIRED, PK_BUILD_NETWORKMANAGER="yes", PK_BUILD_NETWORKMANAGER="no")
+ if test "x$PK_BUILD_NETWORKMANAGER" = "xyes"; then
+ networking_apis="${networking_apis},NetworkManager"
+ AC_DEFINE(PK_BUILD_NETWORKMANAGER, 1, [define if NetworkManager is installed])
+ else
+ if test x$enable_networkmanager = xyes; then
+ AC_MSG_ERROR([NetworkManager enabled but not found])
+ fi
+ fi
else
PK_BUILD_NETWORKMANAGER=no
fi
@@ -283,12 +300,20 @@ AC_SUBST(LIBNM_CFLAGS)
AC_SUBST(LIBNM_LIBS)
dnl ---------------------------------------------------------------------------
-dnl - Is ConnMan available?
+dnl - ConnMan (default enabled)
dnl ---------------------------------------------------------------------------
-PKG_CHECK_MODULES(CONNMAN, connman, PK_BUILD_CONNMAN="yes", PK_BUILD_CONNMAN="no")
-if test "x$PK_BUILD_CONNMAN" = "xyes"; then
- networking_apis="${networking_apis},ConnMan"
- AC_DEFINE(PK_BUILD_CONNMAN, 1, [define if Connection Manager is installed])
+AC_ARG_ENABLE(connman, AC_HELP_STRING([--enable-connman],
+ [Enable ConnMan]), enable_connman=$enableval)
+if test x$enable_connman != xno; then
+ PKG_CHECK_MODULES(CONNMAN, connman, PK_BUILD_CONNMAN="yes", PK_BUILD_CONNMAN="no")
+ if test "x$PK_BUILD_CONNMAN" = "xyes"; then
+ networking_apis="${networking_apis},ConnMan"
+ AC_DEFINE(PK_BUILD_CONNMAN, 1, [define if Connection Manager is installed])
+ else
+ if test x$enable_connman = xyes; then
+ AC_MSG_ERROR([Connman enabled but not found])
+ fi
+ fi
else
PK_BUILD_CONNMAN=no
fi
commit eb6d26fa3e6fc0901ce41d8e1ba56892022955b1
Author: Mounir Lamouri (volkmar) <mounir.lamouri at gmail.com>
Date: Sat Jul 18 01:42:23 2009 +0200
portage: update category/groups map
diff --git a/backends/portage/portageBackend.py b/backends/portage/portageBackend.py
index 89ab2d5..942d5cc 100755
--- a/backends/portage/portageBackend.py
+++ b/backends/portage/portageBackend.py
@@ -60,8 +60,8 @@ from itertools import izip
CATEGORY_GROUP_MAP = {
"app-accessibility" : GROUP_ACCESSIBILITY,
"app-admin" : GROUP_ADMIN_TOOLS,
- "app-antivirus" : GROUP_OTHER, #TODO
- "app-arch" : GROUP_OTHER,
+ "app-antivirus" : GROUP_SYSTEM,
+ "app-arch" : GROUP_OTHER, # TODO
"app-backup" : GROUP_OTHER,
"app-benchmarks" : GROUP_OTHER,
"app-cdr" : GROUP_OTHER,
@@ -77,36 +77,36 @@ CATEGORY_GROUP_MAP = {
"app-misc" : GROUP_OTHER,
"app-mobilephone" : GROUP_OTHER,
"app-office" : GROUP_OFFICE, # DONE
- "app-pda" : GROUP_OTHER,
+ "app-pda" : GROUP_OTHER, # TODO
"app-portage" : GROUP_OTHER,
"app-shells" : GROUP_OTHER,
"app-text" : GROUP_OTHER,
"app-vim" : GROUP_OTHER,
"app-xemacs" : GROUP_OTHER,
- "dev-ada" : GROUP_OTHER,
- "dev-cpp" : GROUP_OTHER,
- "dev-db" : GROUP_OTHER,
- "dev-dotnet" : GROUP_OTHER,
- "dev-embedded" : GROUP_OTHER,
- "dev-games" : GROUP_OTHER,
- "dev-haskell" : GROUP_OTHER,
- "dev-java" : GROUP_OTHER,
- "dev-lang" : GROUP_OTHER,
- "dev-libs" : GROUP_OTHER,
- "dev-lisp" : GROUP_OTHER,
- "dev-ml" : GROUP_OTHER,
- "dev-perl" : GROUP_OTHER,
- "dev-php" : GROUP_OTHER,
- "dev-php5" : GROUP_OTHER,
- "dev-python" : GROUP_OTHER,
- "dev-ruby" : GROUP_OTHER,
- "dev-scheme" : GROUP_OTHER,
- "dev-tcltk" : GROUP_OTHER,
- "dev-tex" : GROUP_OTHER,
- "dev-texlive" : GROUP_OTHER,
- "dev-tinyos" : GROUP_OTHER,
- "dev-util" : GROUP_OTHER,
- "games-action" : GROUP_GAMES, # DONE from there
+ "dev-ada" : GROUP_PROGRAMMING, # DONE
+ "dev-cpp" : GROUP_PROGRAMMING,
+ "dev-db" : GROUP_PROGRAMMING,
+ "dev-dotnet" : GROUP_PROGRAMMING,
+ "dev-embedded" : GROUP_PROGRAMMING,,
+ "dev-games" : GROUP_PROGRAMMING,
+ "dev-haskell" : GROUP_PROGRAMMING,
+ "dev-java" : GROUP_PROGRAMMING,
+ "dev-lang" : GROUP_PROGRAMMING,
+ "dev-libs" : GROUP_PROGRAMMING,
+ "dev-lisp" : GROUP_PROGRAMMING,
+ "dev-ml" : GROUP_PROGRAMMING,
+ "dev-perl" : GROUP_PROGRAMMING,
+ "dev-php" : GROUP_PROGRAMMING,
+ "dev-php5" : GROUP_PROGRAMMING,
+ "dev-python" : GROUP_PROGRAMMING,
+ "dev-ruby" : GROUP_PROGRAMMING,
+ "dev-scheme" : GROUP_PROGRAMMING,
+ "dev-tcltk" : GROUP_PROGRAMMING,
+ "dev-tex" : GROUP_PROGRAMMING,
+ "dev-texlive" : GROUP_PROGRAMMING,
+ "dev-tinyos" : GROUP_PROGRAMMING,
+ "dev-util" : GROUP_PROGRAMMING,
+ "games-action" : GROUP_GAMES,
"games-arcade" : GROUP_GAMES,
"games-board" : GROUP_GAMES,
"games-emulation" : GROUP_GAMES,
@@ -134,12 +134,12 @@ CATEGORY_GROUP_MAP = {
"kde-base" : GROUP_DESKTOP_KDE, # DONE from there
"kde-misc" : GROUP_DESKTOP_KDE,
"lxde-base" : GROUP_DESKTOP_OTHER,
- "mail-client" : GROUP_COMMUNICATION, # TODO: or GROUP_INTERNET ?
- "mail-filter" : GROUP_OTHER, # TODO: from there
- "mail-mta" : GROUP_OTHER,
- "media-fonts" : GROUP_FONTS, # DONE (only this one)
- "media-gfx" : GROUP_GRAPHICS, # DONE
- "media-libs" : GROUP_OTHER,
+ "mail-client" : GROUP_NETWORK,
+ "mail-filter" : GROUP_NETWORK,
+ "mail-mta" : GROUP_NETWORK,
+ "media-fonts" : GROUP_FONTS,
+ "media-gfx" : GROUP_GRAPHICS,
+ "media-libs" : GROUP_OTHER, # TODO
"media-plugins" : GROUP_OTHER,
"media-radio" : GROUP_OTHER,
"media-sound" : GROUP_OTHER,
@@ -172,7 +172,7 @@ CATEGORY_GROUP_MAP = {
"sci-biology" : GROUP_SCIENCE,
"sci-calculators" : GROUP_SCIENCE,
"sci-chemistry" : GROUP_SCIENCE,
- "sci-electronics" : GROUP_SCIENCE,
+ "sci-electronics" : GROUP_ELECTRONICS,
"sci-geosciences" : GROUP_SCIENCE,
"sci-libs" : GROUP_SCIENCE,
"sci-mathematics" : GROUP_SCIENCE,
@@ -180,26 +180,26 @@ CATEGORY_GROUP_MAP = {
"sci-physics" : GROUP_SCIENCE,
"sci-visualization" : GROUP_SCIENCE,
"sec-policy" : GROUP_SECURITY,
- "sys-apps" : GROUP_OTHER, # TODO: from there
- "sys-auth" : GROUP_OTHER,
- "sys-block" : GROUP_OTHER,
- "sys-boot" : GROUP_OTHER,
- "sys-cluster" : GROUP_OTHER,
- "sys-devel" : GROUP_OTHER,
- "sys-freebsd" : GROUP_OTHER,
- "sys-fs" : GROUP_OTHER,
- "sys-kernel" : GROUP_OTHER,
- "sys-libs" : GROUP_OTHER,
- "sys-power" : GROUP_POWER_MANAGEMENT, # DONE
- "sys-process" : GROUP_OTHER,
+ "sys-apps" : GROUP_SYSTEM,
+ "sys-auth" : GROUP_SYSTEM,
+ "sys-block" : GROUP_SYSTEM,
+ "sys-boot" : GROUP_SYSTEM,
+ "sys-cluster" : GROUP_SYSTEM,
+ "sys-devel" : GROUP_SYSTEM,
+ "sys-freebsd" : GROUP_SYSTEM,
+ "sys-fs" : GROUP_SYSTEM,
+ "sys-kernel" : GROUP_SYSTEM,
+ "sys-libs" : GROUP_SYSTEM,
+ "sys-power" : GROUP_POWER_MANAGEMENT,
+ "sys-process" : GROUP_SYSTEM,
"virtual" : GROUP_OTHER, # TODO: what to do ?
- "www-apache" : GROUP_OTHER,
- "www-apps" : GROUP_OTHER,
- "www-client" : GROUP_OTHER,
- "www-misc" : GROUP_OTHER,
- "www-plugins" : GROUP_OTHER,
- "www-servers" : GROUP_OTHER,
- "x11-apps" : GROUP_OTHER,
+ "www-apache" : GROUP_NETWORK,
+ "www-apps" : GROUP_NETWORK,
+ "www-client" : GROUP_NETWORK,
+ "www-misc" : GROUP_NETWORK,
+ "www-plugins" : GROUP_NETWORK,
+ "www-servers" : GROUP_NETWORK,
+ "x11-apps" : GROUP_OTHER, # TODO
"x11-base" : GROUP_OTHER,
"x11-drivers" : GROUP_OTHER,
"x11-libs" : GROUP_OTHER,
commit 0c7b0cfbda4115f9b266d7e36b1233cb3b65633f
Author: Mounir Lamouri (volkmar) <mounir.lamouri at gmail.com>
Date: Sat Jul 18 01:41:33 2009 +0200
portage: explicitely let portage backend accept sigkill
diff --git a/backends/portage/pk-backend-portage.c b/backends/portage/pk-backend-portage.c
index 6866888..45a1299 100644
--- a/backends/portage/pk-backend-portage.c
+++ b/backends/portage/pk-backend-portage.c
@@ -35,6 +35,8 @@ backend_initialize (PkBackend *backend)
egg_debug ("backend: initialize");
spawn = pk_backend_spawn_new ();
pk_backend_spawn_set_name (spawn, "portage");
+ /* allowing sigkill as long as no one complain */
+ pk_backend_spawn_set_allow_sigkill (spawn, TRUE);
}
/**
commit bf262a75f2e9c1ef34e9eaf28ac2cf936bd1ed5b
Author: Richard Hughes <richard at hughsie.com>
Date: Fri Jul 17 12:31:30 2009 +0100
Trivially fix the build whe nnot using PolicyKit
diff --git a/src/pk-engine.c b/src/pk-engine.c
index 8b8a51b..52aebcf 100644
--- a/src/pk-engine.c
+++ b/src/pk-engine.c
@@ -648,12 +648,12 @@ out:
void
pk_engine_set_proxy (PkEngine *engine, const gchar *proxy_http, const gchar *proxy_ftp, DBusGMethodInvocation *context)
{
+ guint len;
+ GError *error = NULL;
#ifdef USE_SECURITY_POLKIT
gchar *sender = NULL;
PolkitSubject *subject;
PolkitDetails *details;
- GError *error = NULL;
- guint len;
#else
gboolean ret;
#endif
More information about the PackageKit-commit
mailing list