[PackageKit-commit] packagekit: Branch 'master' - 19 commits
Richard Hughes
hughsient at kemper.freedesktop.org
Tue Nov 4 05:11:46 PST 2008
backends/alpm/pk-backend-alpm.c | 50 -
backends/dummy/pk-backend-dummy.c | 5
backends/yum/yumBackend.py | 21
backends/yum/yumComps.py | 2
backends/zypp/pk-backend-zypp.cpp | 45 -
contrib/PackageKit.spec.in | 3
contrib/packagekit-plugin/src/contents.cpp | 908 ++++++++++++++---------------
contrib/packagekit-plugin/src/contents.h | 125 +--
contrib/packagekit-plugin/src/plugin.cpp | 306 ++++-----
contrib/packagekit-plugin/src/plugin.h | 46 -
po/ca.po | 321 +++-------
po/fi.po | 258 ++------
po/gu.po | 175 ++---
po/zh_CN.po | 291 +++------
src/pk-backend-spawn.c | 16
src/pk-spawn.c | 26
16 files changed, 1194 insertions(+), 1404 deletions(-)
New commits:
commit cef2c5e75a3f6dd9addce34e5cffce2baa238d38
Author: Richard Hughes <richard at hughsie.com>
Date: Tue Nov 4 12:43:14 2008 +0000
feature: if the library used in a PkSpawn executable emits standard error, kill the script and emit an error code as this is not allowed
diff --git a/src/pk-backend-spawn.c b/src/pk-backend-spawn.c
index 7532097..55e107a 100644
--- a/src/pk-backend-spawn.c
+++ b/src/pk-backend-spawn.c
@@ -462,6 +462,20 @@ pk_backend_spawn_stdout_cb (PkBackendSpawn *spawn, const gchar *line, PkBackendS
}
/**
+ * pk_backend_spawn_stderr_cb:
+ **/
+static void
+pk_backend_spawn_stderr_cb (PkBackendSpawn *spawn, const gchar *line, PkBackendSpawn *backend_spawn)
+{
+ /* send error up to session, this is never going to be pretty... */
+ egg_warning ("STDERR: %s", line);
+ pk_backend_error_code (backend_spawn->priv->backend, PK_ERROR_ENUM_INTERNAL_ERROR,
+ "library error: %s", line);
+ pk_backend_finished (backend_spawn->priv->backend);
+ pk_spawn_kill (backend_spawn->priv->spawn);
+}
+
+/**
* pk_backend_spawn_get_envp:
*
* Return all the environment variables the script will need
@@ -728,6 +742,8 @@ pk_backend_spawn_init (PkBackendSpawn *backend_spawn)
G_CALLBACK (pk_backend_spawn_exit_cb), backend_spawn);
g_signal_connect (backend_spawn->priv->spawn, "stdout",
G_CALLBACK (pk_backend_spawn_stdout_cb), backend_spawn);
+ g_signal_connect (backend_spawn->priv->spawn, "stderr",
+ G_CALLBACK (pk_backend_spawn_stderr_cb), backend_spawn);
}
/**
commit 1bb25d4693e6b1e6d415da26826764acd5683b99
Author: Richard Hughes <richard at hughsie.com>
Date: Tue Nov 4 12:42:13 2008 +0000
feature: monitor scripts in PkSpawn for standard error too, as critical errors often get put there by libraries and this will be useful
diff --git a/src/pk-spawn.c b/src/pk-spawn.c
index f121419..0988fc2 100644
--- a/src/pk-spawn.c
+++ b/src/pk-spawn.c
@@ -63,6 +63,7 @@ struct PkSpawnPrivate
gint child_pid;
gint stdin_fd;
gint stdout_fd;
+ gint stderr_fd;
guint poll_id;
guint kill_id;
gboolean finished;
@@ -70,6 +71,7 @@ struct PkSpawnPrivate
gboolean is_changing_dispatcher;
PkSpawnExitType exit;
GString *stdout_buf;
+ GString *stderr_buf;
gchar *last_argv0;
gchar **last_envp;
PkConf *conf;
@@ -78,6 +80,7 @@ struct PkSpawnPrivate
enum {
PK_SPAWN_EXIT,
PK_SPAWN_STDOUT,
+ PK_SPAWN_STDERR,
PK_SPAWN_LAST_SIGNAL
};
@@ -157,6 +160,16 @@ pk_spawn_check_child (PkSpawn *spawn)
}
pk_spawn_read_fd_into_buffer (spawn->priv->stdout_fd, spawn->priv->stdout_buf);
+ pk_spawn_read_fd_into_buffer (spawn->priv->stderr_fd, spawn->priv->stderr_buf);
+
+ /* emit all lines on standard out in one callback, as it's all probably
+ * related to the error that just happened */
+ if (spawn->priv->stderr_buf->len != 0) {
+ g_signal_emit (spawn, signals [PK_SPAWN_STDERR], 0, spawn->priv->stderr_buf->str);
+ g_string_set_size (spawn->priv->stderr_buf, 0);
+ }
+
+ /* all usual output goes on standard out, only bad libraries bitch to stderr */
pk_spawn_emit_whole_lines (spawn, spawn->priv->stdout_buf);
/* Only print one in twenty times to avoid filling the screen */
@@ -176,8 +189,10 @@ pk_spawn_check_child (PkSpawn *spawn)
/* child exited, close resources */
close (spawn->priv->stdin_fd);
close (spawn->priv->stdout_fd);
+ close (spawn->priv->stderr_fd);
spawn->priv->stdin_fd = -1;
spawn->priv->stdout_fd = -1;
+ spawn->priv->stderr_fd = -1;
spawn->priv->child_pid = -1;
if (WEXITSTATUS (status) > 0) {
@@ -437,7 +452,7 @@ pk_spawn_argv (PkSpawn *spawn, gchar **argv, gchar **envp)
NULL, NULL, &spawn->priv->child_pid,
&spawn->priv->stdin_fd,
&spawn->priv->stdout_fd,
- NULL,
+ &spawn->priv->stderr_fd,
NULL);
/* get the nice value and ensure we are in the valid range */
@@ -466,6 +481,7 @@ pk_spawn_argv (PkSpawn *spawn, gchar **argv, gchar **envp)
/* install an idle handler to check if the child returnd successfully. */
fcntl (spawn->priv->stdout_fd, F_SETFL, O_NONBLOCK);
+ fcntl (spawn->priv->stderr_fd, F_SETFL, O_NONBLOCK);
/* sanity check */
if (spawn->priv->poll_id != 0)
@@ -498,6 +514,11 @@ pk_spawn_class_init (PkSpawnClass *klass)
G_TYPE_FROM_CLASS (object_class), G_SIGNAL_RUN_LAST,
0, NULL, NULL, g_cclosure_marshal_VOID__STRING,
G_TYPE_NONE, 1, G_TYPE_STRING);
+ signals [PK_SPAWN_STDERR] =
+ g_signal_new ("stderr",
+ G_TYPE_FROM_CLASS (object_class), G_SIGNAL_RUN_LAST,
+ 0, NULL, NULL, g_cclosure_marshal_VOID__STRING,
+ G_TYPE_NONE, 1, G_TYPE_STRING);
g_type_class_add_private (klass, sizeof (PkSpawnPrivate));
}
@@ -513,6 +534,7 @@ pk_spawn_init (PkSpawn *spawn)
spawn->priv->child_pid = -1;
spawn->priv->stdout_fd = -1;
+ spawn->priv->stderr_fd = -1;
spawn->priv->stdin_fd = -1;
spawn->priv->poll_id = 0;
spawn->priv->kill_id = 0;
@@ -524,6 +546,7 @@ pk_spawn_init (PkSpawn *spawn)
spawn->priv->exit = PK_SPAWN_EXIT_TYPE_UNKNOWN;
spawn->priv->stdout_buf = g_string_new ("");
+ spawn->priv->stderr_buf = g_string_new ("");
spawn->priv->conf = pk_conf_new ();
}
@@ -557,6 +580,7 @@ pk_spawn_finalize (GObject *object)
/* free the buffers */
g_string_free (spawn->priv->stdout_buf, TRUE);
+ g_string_free (spawn->priv->stderr_buf, TRUE);
g_free (spawn->priv->last_argv0);
g_strfreev (spawn->priv->last_envp);
g_object_unref (spawn->priv->conf);
commit 2df6ee1319dadb9d06a7f117cd3a02362b82cf99
Author: Ankitkumar Patel <ankit at redhat.com>
Date: Mon Nov 3 12:34:58 2008 +0000
Minor updates...
Transmitted-via: Transifex (translate.fedoraproject.org)
diff --git a/po/gu.po b/po/gu.po
index 1afc05f..d4a68a3 100644
--- a/po/gu.po
+++ b/po/gu.po
@@ -7,8 +7,8 @@ msgid ""
msgstr ""
"Project-Id-Version: packagekit.master.gu\n"
"Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2008-10-22 01:39+0000\n"
-"PO-Revision-Date: 2008-10-22 16:02+0530\n"
+"POT-Creation-Date: 2008-10-27 13:38+0000\n"
+"PO-Revision-Date: 2008-11-03 18:04+0530\n"
"Last-Translator: Ankit Patel <ankit at redhat.com>\n"
"Language-Team: Gujarati <fedora-trans-gu at redhat.com>\n"
"MIME-Version: 1.0\n"
@@ -16,6 +16,7 @@ msgstr ""
"Content-Transfer-Encoding: 8bit\n"
"X-Generator: KBabel 1.11.4\n"
"Plural-Forms: nplurals=2; plural=(n!=1);\n\n"
+"\n"
#. TRANSLATORS: this is a header for the package that can be updated
#: ../client/pk-console.c:271
@@ -35,20 +36,20 @@ msgid "Please restart the application as it is being used."
msgstr "મહà«àª°àª¬àª¾àª¨à« àªàª°à«àª¨à« àªàª¾àª°à«àª¯àªà«àª°àª® ફરૠશરૠàªàª°à« àªàª¾àª°àª£ àªà« તૠવપરાઠરહà«àª¯à« àªà«."
#. TRANSLATORS: The package is already installed on the system
-#: ../client/pk-console.c:579
+#: ../client/pk-console.c:580
#, c-format
msgid "The package '%s' is already installed"
msgstr "પà«àªà«àª '%s' પહà«àª²àª¾àª¥à« ઠસà«àª¥àª¾àªªàª¿àª¤ થયà«àª² àªà«"
#. TRANSLATORS: The package name was not found in any software sources. The detailed error follows
-#: ../client/pk-console.c:587
+#: ../client/pk-console.c:588
#, c-format
msgid "The package '%s' could not be installed: %s"
msgstr "પà«àªà«àª '%s' સà«àª¥àª¾àªªàª¿àª¤ àªàª°à« શàªà«àª¯àª¾ નહિàª: %s"
#. TRANSLATORS: There was a programming error that shouldn't happen. The detailed error follows
-#: ../client/pk-console.c:612 ../client/pk-console.c:639
-#: ../client/pk-console.c:735 ../client/pk-console.c:852
+#: ../client/pk-console.c:613 ../client/pk-console.c:640
+#: ../client/pk-console.c:736 ../client/pk-console.c:853
#: ../client/pk-tools-common.c:55 ../client/pk-tools-common.c:74
#: ../client/pk-tools-common.c:81
#, c-format
@@ -56,360 +57,370 @@ msgid "Internal error: %s"
msgstr "àªàªàª¤àª°àª¿àª àªà«àª²: %s"
#. TRANSLATORS: There was an error installing the packages. The detailed error follows
-#: ../client/pk-console.c:620
+#: ../client/pk-console.c:621
#, c-format
msgid "This tool could not install the packages: %s"
msgstr "ઠસાધન પà«àªà«àªà« સà«àª¥àª¾àªªàª¿àª¤ àªàª°à« શàªà«àª¯à«àª નહિàª: %s"
#. TRANSLATORS: There was an error installing the files. The detailed error follows
-#: ../client/pk-console.c:647
+#: ../client/pk-console.c:648
#, c-format
msgid "This tool could not install the files: %s"
msgstr "ઠસાધન ફાàªàª²à« સà«àª¥àª¾àªªàª¿àª¤ àªàª°à« શàªà«àª¯à«àª નહિàª: %s"
#. TRANSLATORS: The package name was not found in the installed list. The detailed error follows
-#: ../client/pk-console.c:703
+#: ../client/pk-console.c:704
#, c-format
msgid "This tool could not remove '%s': %s"
msgstr "ઠસાધન '%s' દà«àª° àªàª°à« શàªà«àª¯à«àª નહિàª: %s"
#. TRANSLATORS: There was an error removing the packages. The detailed error follows
-#: ../client/pk-console.c:726 ../client/pk-console.c:797
+#: ../client/pk-console.c:727 ../client/pk-console.c:798
#, c-format
msgid "This tool could not remove the packages: %s"
msgstr "ઠસાધન પà«àªà«àªà« દà«àª° àªàª°à« શàªà«àª¯à«àª નહિàª: %s"
#. TRANSLATORS: There was an error removing the packages. The detailed error follows
-#: ../client/pk-console.c:764
+#: ../client/pk-console.c:765
#, c-format
msgid "This tool could not remove the packages: '%s'"
msgstr "ઠસાધન પà«àªà«àªà« દà«àª° àªàª°à« શàªà«àª¯à«àª નહિàª: '%s'"
#. TRANSLATORS: When removing, we might have to remove other dependencies
-#: ../client/pk-console.c:776
+#: ../client/pk-console.c:777
msgid "The following packages have to be removed:"
msgstr "નà«àªà«àª¨àª¾ પà«àªà«àªà« દà«àª° àªàª°àªµàª¾àª®àª¾àª àªàªµàªµàª¾ àªà«àªàª:"
#. TRANSLATORS: We are checking if it's okay to remove a list of packages
-#: ../client/pk-console.c:783
+#: ../client/pk-console.c:784
msgid "Proceed removing additional packages?"
msgstr "શà«àª વધારાના પà«àªà«àªà« દà«àª° àªàª°àªµàª¾ પર પà«àª°àªà«àª°àª¿àª¯àª¾ àªàª°àªµà« àªà«?"
#. TRANSLATORS: We did not remove any packages
-#: ../client/pk-console.c:788
+#: ../client/pk-console.c:789
msgid "The package removal was canceled!"
msgstr "પà«àªà«àª નિરાàªàª°àª£ રદ થઠહતà«!"
#. TRANSLATORS: The package name was not found in any software sources
-#: ../client/pk-console.c:829
+#: ../client/pk-console.c:830
#, c-format
msgid "This tool could not download the package '%s' as it could not be found"
msgstr "ઠસાધન પà«àªà«àª '%s' દà«àª° àªàª°à« શàªà«àª¯à«àª નહિઠàªàª¾àª°àª£ àªà« તૠશà«àª§à« શàªàª¾àª¯à«àª નહિàª"
#. TRANSLATORS: Could not download the packages for some reason. The detailed error follows
-#: ../client/pk-console.c:860
+#: ../client/pk-console.c:861
#, c-format
msgid "This tool could not download the packages: %s"
msgstr "ઠસાધન પà«àªà«àªà« ડાàªàª¨àª²à«àª¡ àªàª°à« શàªà«àª¯àª¾ નહિàª: %s"
#. TRANSLATORS: There was an error getting the list of files for the package. The detailed error follows
-#: ../client/pk-console.c:887 ../client/pk-console.c:896
+#: ../client/pk-console.c:888 ../client/pk-console.c:897
#, c-format
msgid "This tool could not update '%s': %s"
msgstr "ઠસાધન '%s' સà«àª§àª¾àª°à« શàªà«àª¯à«àª નહિàª: %s"
#. TRANSLATORS: There was an error getting the list of files for the package. The detailed error follows
-#: ../client/pk-console.c:918 ../client/pk-console.c:926
+#: ../client/pk-console.c:919 ../client/pk-console.c:927
#, c-format
msgid "This tool could not get the requirements for '%s': %s"
msgstr "ઠસાધન '%s' માàªà«àª¨à« àªàª°à«àª°à«àª¯àª¾àª¤à« મà«àª³àªµà« શàªà«àª¯à«àª નહિàª: %s"
#. TRANSLATORS: There was an error getting the dependencies for the package. The detailed error follows
-#: ../client/pk-console.c:948 ../client/pk-console.c:956
+#: ../client/pk-console.c:949 ../client/pk-console.c:957
#, c-format
msgid "This tool could not get the dependencies for '%s': %s"
msgstr "ઠસાધન '%s' માàªà« àªàª§àª¾àª°àªà«àª¤àªªàª£àª¾àª મà«àª³àªµà« શàªà«àª¯à«àª નહિàª: %s"
#. TRANSLATORS: There was an error getting the details about the package. The detailed error follows
-#: ../client/pk-console.c:978 ../client/pk-console.c:986
+#: ../client/pk-console.c:979 ../client/pk-console.c:987
#, c-format
msgid "This tool could not get package details for '%s': %s"
msgstr "ઠસાધન '%s' માàªà« પà«àªà«àª વિàªàª¤à« મà«àª³àªµà« શàªà«àª¯à«àª નહિàª: %s"
#. TRANSLATORS: The package name was not found in any software sources. The detailed error follows
-#: ../client/pk-console.c:1008
+#: ../client/pk-console.c:1009
#, c-format
msgid "This tool could not find the files for '%s': %s"
msgstr "ઠસાધન '%s' માàªà« ફાàªàª²à« શà«àª§à« શàªà«àª¯à«àª નહિàª: %s"
#. TRANSLATORS: There was an error getting the list of files for the package. The detailed error follows
-#: ../client/pk-console.c:1016
+#: ../client/pk-console.c:1017
#, c-format
msgid "This tool could not get the file list for '%s': %s"
msgstr "ઠસાધન '%s' માàªà« ફાàªàª² યાદૠમà«àª³àªµà« શàªà«àª¯à«àª નહિàª: %s"
#. TRANSLATORS: The package name was not found in any software sources. The detailed error follows
-#: ../client/pk-console.c:1038
+#: ../client/pk-console.c:1039
#, c-format
msgid "This tool could not find the update details for '%s': %s"
msgstr "ઠસાધન '%s' માàªà« સà«àª§àª¾àª°àª¾ વિàªàª¤à« મà«àª³àªµà« શàªà«àª¯à«àª નહિàª: %s"
#. TRANSLATORS: There was an error getting the details about the update for the package. The detailed error follows
-#: ../client/pk-console.c:1046
+#: ../client/pk-console.c:1047
#, c-format
msgid "This tool could not get the update details for '%s': %s"
msgstr "ઠસાધન '%s' માàªà« સà«àª§àª¾àª°àª¾ વિàªàª¤à« મà«àª³àªµà« શàªà«àª¯à«àª નહિàª: %s"
#. TRANSLATORS: This was an unhandled error, and we don't have _any_ context
-#: ../client/pk-console.c:1092
+#: ../client/pk-console.c:1093
msgid "Error:"
msgstr "àªà«àª²:"
#. TRANSLATORS: This a list of details about the package
-#: ../client/pk-console.c:1106
+#: ../client/pk-console.c:1107
msgid "Package description"
msgstr "પà«àªà«àª વરà«àª£àª¨"
#. TRANSLATORS: This a list files contained in the package
-#: ../client/pk-console.c:1139
+#: ../client/pk-console.c:1140
msgid "Package files"
msgstr "પà«àªà«àª ફાàªàª²à«"
#. TRANSLATORS: This where the package has no files
-#: ../client/pk-console.c:1148
+#: ../client/pk-console.c:1149
msgid "No files"
msgstr "àªà«àª ફાàªàª²à« નથà«"
#. TRANSLATORS: This a request for a GPG key signature from the backend, which the client will prompt for later
-#: ../client/pk-console.c:1171
+#: ../client/pk-console.c:1172
msgid "Repository signature required"
msgstr "રà«àªªà«àªà«àªàª°à« સહૠàªàª°à«àª°à«"
#. TRANSLATORS: This a prompt asking the user to import the security key
-#: ../client/pk-console.c:1181
-msgid "You you accept this signature?"
+#: ../client/pk-console.c:1182
+msgid "Do you accept this signature?"
msgstr "શà«àª તમૠઠસહૠસà«àªµà«àªàª¾àª°àª¶à«?"
#. TRANSLATORS: This is where the user declined the security key
-#: ../client/pk-console.c:1185
+#: ../client/pk-console.c:1186
msgid "The signature was not accepted."
msgstr "સહૠસà«àªµà«àªàª¾àª°àª¾àª¯à«àª² ન હતà«."
#. TRANSLATORS: This a request for a EULA
-#: ../client/pk-console.c:1219
+#: ../client/pk-console.c:1220
msgid "End user license agreement required"
msgstr "àª
àªàª¤àª¿àª® વપરાશàªàª°à«àª¤àª¾ લાàªàª¸àª¨à«àª¸ મàªàªà«àª°à«àªªàª¤à«àª°àª àªàª°à«àª°à«"
#. TRANSLATORS: This a prompt asking the user to agree to the license
-#: ../client/pk-console.c:1226
+#: ../client/pk-console.c:1227
msgid "Do you agree to this license?"
msgstr "શà«àª તમૠઠલાàªàª¸àª¨à«àª¸ સાથૠમàªàªà«àª° àªà«?"
#. TRANSLATORS: This is where the user declined the license
-#: ../client/pk-console.c:1230
+#: ../client/pk-console.c:1231
msgid "The license was refused."
msgstr "લાàªàª¸àª¨à«àª¸ રદ થયà«àª હતà«àª."
#. TRANSLATORS: This is when the daemon crashed, and we are up shit creek without a paddle
-#: ../client/pk-console.c:1259
+#: ../client/pk-console.c:1260
msgid "The daemon crashed mid-transaction!"
msgstr "ડિમન મધà«àª¯-પરિવહન દરમà«àª¯àª¾àª¨ àªàª¾àªàªà« પડà«àª¯à«àª!"
#. TRANSLATORS: This is the header to the --help menu
-#: ../client/pk-console.c:1312
+#: ../client/pk-console.c:1313
msgid "PackageKit Console Interface"
msgstr "PackageKit àªàª¨à«àª¸à«àª² àªàª¨à«àªàª°àª«à«àª¸"
-#: ../client/pk-console.c:1312
+#: ../client/pk-console.c:1313
msgid "Subcommands:"
msgstr "àªàªªàªàª¦à«àª¶à«:"
-#: ../client/pk-console.c:1403 ../client/pk-generate-pack.c:138
+#: ../client/pk-console.c:1404 ../client/pk-generate-pack.c:182
#: ../client/pk-monitor.c:115 ../src/pk-main.c:196
msgid "Show extra debugging information"
msgstr "વધારાનૠડિબàªà«àªàª àªàª¾àª£àªàª¾àª°à« બતાવà«"
-#: ../client/pk-console.c:1405 ../client/pk-monitor.c:117
+#: ../client/pk-console.c:1406 ../client/pk-monitor.c:117
msgid "Show the program version and exit"
msgstr "àªàª¾àª°à«àª¯àªà«àª°àª® àªàªµà«àª¤à«àª¤àª¿ બતાવૠàª
નૠબહાર નà«àªàª³à«"
-#: ../client/pk-console.c:1407
+#: ../client/pk-console.c:1408
msgid "Set the filter, e.g. installed"
msgstr "àªàª¾àª³àª સà«àª¯à«àªà«àª¤ àªàª°à«, દા.ત. સà«àª¥àª¾àªªàª¿àª¤"
-#: ../client/pk-console.c:1409
+#: ../client/pk-console.c:1410
msgid "Exit without waiting for actions to complete"
msgstr "àªà«àª°àª¿àª¯àª¾àª સમાપà«àª¤ થવાનૠરાહ àªà«àª¯àª¾ વિના બહાર નà«àªàª³à«"
#. TRANSLATORS: This is when we could not connect to the system bus, and is fatal
-#: ../client/pk-console.c:1431
+#: ../client/pk-console.c:1432
msgid "This tool could not connect to system DBUS."
msgstr "ઠસાધન સિસà«àªàª® DBUS સાથૠàªà«àª¡à« શàªà«àª¯àª¾ નહિàª."
-#: ../client/pk-console.c:1526
+#: ../client/pk-console.c:1527
msgid "You need to specify a search type, e.g. name"
msgstr "તમારૠશà«àª§ પà«àª°àªàª¾àª° સà«àªªàª·à«àª àªàª°àªµàª¾àª¨à« àªàª°à«àª° àªà«, દા.ત. નામ"
-#: ../client/pk-console.c:1531 ../client/pk-console.c:1538
-#: ../client/pk-console.c:1545 ../client/pk-console.c:1552
-#: ../client/pk-console.c:1663 ../client/pk-console.c:1673
-#: ../client/pk-console.c:1680 ../client/pk-console.c:1687
+#: ../client/pk-console.c:1532 ../client/pk-console.c:1539
+#: ../client/pk-console.c:1546 ../client/pk-console.c:1553
+#: ../client/pk-console.c:1664 ../client/pk-console.c:1674
+#: ../client/pk-console.c:1681 ../client/pk-console.c:1688
msgid "You need to specify a search term"
msgstr "તમારૠશà«àª§ પદ સà«àªªàª·à«àª àªàª°àªµàª¾àª¨à« àªàª°à«àª° àªà«"
-#: ../client/pk-console.c:1557
+#: ../client/pk-console.c:1558
msgid "Invalid search type"
msgstr "àª
યà«àªà«àª¯ શà«àª§ પà«àª°àªàª¾àª°"
-#: ../client/pk-console.c:1562
+#: ../client/pk-console.c:1563
msgid "You need to specify a package or file to install"
msgstr "તમારૠસà«àª¥àª¾àªªàª¿àª¤ àªàª°àªµàª¾ માàªà«àª¨à«àª પà«àªà«àª àªà« ફાàªàª² સà«àªªàª·à«àª àªàª°àªµàª¾àª¨à« àªàª°à«àª° àªà«"
-#: ../client/pk-console.c:1569
+#: ../client/pk-console.c:1570
msgid "You need to specify a type, key_id and package_id"
msgstr "તમારૠપà«àª°àªàª¾àª°, key_id àª
નૠpackage_id સà«àªªàª·à«àª àªàª°àªµàª¾àª¨à« àªàª°à«àª° àªà«"
-#: ../client/pk-console.c:1576
+#: ../client/pk-console.c:1577
msgid "You need to specify a package to remove"
msgstr "તમારૠદà«àª° àªàª°àªµàª¾àª¨à«àª પà«àªà«àª સà«àªªàª·à«àª àªàª°àªµàª¾àª¨à« àªàª°à«àª° àªà«"
-#: ../client/pk-console.c:1582
+#: ../client/pk-console.c:1583
msgid ""
"You need to specify the destination directory and then the packages to "
"download"
msgstr "તમારૠàª
àªàª¤àª¿àª® મà«àªàª¾àª® ડિરà«àªà«àªàª°à« àª
નૠપàªà« ડાàªàª¨àª²à«àª¡ àªàª°àªµàª¾ માàªà«àª¨àª¾ પà«àªà«àªà« સà«àªªàª·à«àª àªàª°àªµàª¾àª¨à« àªàª°à«àª° àªà«"
-#: ../client/pk-console.c:1587
+#: ../client/pk-console.c:1588
msgid "Directory not found"
msgstr "ડિરà«àªà«àªàª°à« મળૠનહિàª"
-#: ../client/pk-console.c:1593
+#: ../client/pk-console.c:1594
msgid "You need to specify a licence identifier (eula-id)"
msgstr "તમારૠલાàªàª¸àª¨à«àª¸ àªàª³àªàª¨àª¾àª° સà«àªªàª·à«àª àªàª°àªµàª¾àª¨à« àªàª°à«àª° àªà« (eula-id)"
-#: ../client/pk-console.c:1609
+#: ../client/pk-console.c:1610
msgid "You need to specify a package name to resolve"
msgstr "તમારૠàªàªà«àª²àªµàª¾ માàªà«àª¨à«àª પà«àªà«àª નામ સà«àªªàª·à«àª àªàª°àªµàª¾àª¨à« àªàª°à«àª° àªà«"
-#: ../client/pk-console.c:1618 ../client/pk-console.c:1625
+#: ../client/pk-console.c:1619 ../client/pk-console.c:1626
msgid "You need to specify a repository name"
msgstr "તમારૠરà«àªªà«àªà«àªàª°à« નામ સà«àªªàª·à«àª àªàª°àªµàª¾àª¨à« àªàª°à«àª° àªà«"
-#: ../client/pk-console.c:1632
+#: ../client/pk-console.c:1633
msgid "You need to specify a repo name/parameter and value"
msgstr "તમારૠરà«àªªà« નામ/પરિમાણ àª
નૠàªàª¿àªàª®àª¤ સà«àªªàª·à«àª àªàª°àªµàª¾àª¨à« àªàª°à«àª° àªà«"
-#: ../client/pk-console.c:1645
+#: ../client/pk-console.c:1646
msgid "You need to specify an action, e.g. 'update-system'"
msgstr "તમારૠàªà«àª°àª¿àª¯àª¾ સà«àªªàª·à«àª àªàª°àªµàª¾àª¨à« àªàª°à«àª° àªà«, દા.ત. 'update-system'"
-#: ../client/pk-console.c:1650
+#: ../client/pk-console.c:1651
msgid "You need to specify a correct role"
msgstr "તમારૠયà«àªà«àª¯ àªà«àª®àª¿àªàª¾ સà«àªªàª·à«àª àªàª°àªµàª¾àª¨à« àªàª°à«àª° àªà«"
-#: ../client/pk-console.c:1655
+#: ../client/pk-console.c:1656
msgid "Failed to get last time"
msgstr "àªà«àª²à«àª²à« સમય મà«àª³àªµàªµàª¾àª®àª¾àª નિષà«àª«àª³"
-#: ../client/pk-console.c:1694
+#: ../client/pk-console.c:1695
msgid "You need to specify a package to find the details for"
msgstr "પà«àªà«àª માàªà«àª¨à« વિàªàª¤à« મà«àª³àªµàªµàª¾ માàªà« તમારૠપà«àªà«àª સà«àªªàª·à«àª àªàª°àªµàª¾àª¨à« àªàª°à«àª° àªà«"
-#: ../client/pk-console.c:1701
+#: ../client/pk-console.c:1702
msgid "You need to specify a package to find the files for"
msgstr "પà«àªà«àª માàªà« ફાàªàª²à« શà«àª§àªµàª¾ માàªà« તમારૠપà«àªà«àª સà«àªªàª·à«àª àªàª°àªµàª¾àª¨à« àªàª°à«àª° àªà«"
#. TRANSLATORS: The user tried to use an unsupported option on the command line
-#: ../client/pk-console.c:1754
+#: ../client/pk-console.c:1755
#, c-format
msgid "Option '%s' is not supported"
msgstr "વિàªàª²à«àªª '%s' àªàª§àª¾àª°àªà«àª¤ નથà«"
#. TRANSLATORS: User does not have permission to do this
-#: ../client/pk-console.c:1767
+#: ../client/pk-console.c:1768
msgid "You don't have the necessary privileges for this operation"
msgstr "ઠપà«àª°àªà«àª°àª¿àª¯àª¾ àªàª°àªµàª¾ માàªà« તમારૠપાસૠàªàª°à«àª°à« વિશà«àª·àª¾àª§àª¿àªàª¾àª°à« નથà«"
#. TRANSLATORS: Generic failure of what they asked to do
-#: ../client/pk-console.c:1770
+#: ../client/pk-console.c:1771
msgid "Command failed"
msgstr "àªàª¦à«àª¶ નિષà«àª«àª³"
#. TRANSLATORS: This is the state of the transaction
-#: ../client/pk-generate-pack.c:96
+#: ../client/pk-generate-pack.c:98
msgid "Downloading"
msgstr "ડાàªàª¨àª²à«àª¡ àªàª°à« રહà«àª¯àª¾ àªà«àª"
-#: ../client/pk-generate-pack.c:140
+#. TRANSLATORS: This is when the main packages are being downloaded
+#: ../client/pk-generate-pack.c:118
+msgid "Downloading packages"
+msgstr "પà«àªà«àªà« ડાàªàª¨àª²à«àª¡ àªàª°à« રહà«àª¯àª¾ àªà«àª"
+
+#. TRANSLATORS: This is when the dependency packages are being downloaded
+#: ../client/pk-generate-pack.c:123
+msgid "Downloading dependencies"
+msgstr "àªàª§àª¾àª°àªà«àª¤àªªàª£àª¾àª ડાàªàª¨àª²à«àª¡ àªàª°à« રહà«àª¯àª¾ àªà«àª"
+
+#: ../client/pk-generate-pack.c:184
msgid "Set the file name of dependencies to be excluded"
msgstr "નહિઠસમાવવાના àªàª§àª¾àª°àªà«àª¤àªªàª£àª¾àªàª¨àª¾ ફાàªàª² નામ સà«àª¯à«àªà«àª¤ àªàª°à«"
-#: ../client/pk-generate-pack.c:142
+#: ../client/pk-generate-pack.c:186
msgid "The output directory (the current directory is used if ommitted)"
msgstr "àªàªàªàªªà«àª ડિરà«àªà«àªàª°à« (વરà«àª¤àª®àª¾àª¨ ડિરà«àªà«àªàª°à« વાપરવામાઠàªàªµàª¶à« àªà« àª
વàªàª£àªµàª¾àª®àª¾àª àªàªµà«)"
-#: ../client/pk-generate-pack.c:144
+#: ../client/pk-generate-pack.c:188
msgid "The package to be put into the service pack"
msgstr "સà«àªµàª¾ પà«àªàª®àª¾àª મà«àªàªµàª¾ માàªà«àª¨à«àª પà«àªà«àª"
-#: ../client/pk-generate-pack.c:146
+#: ../client/pk-generate-pack.c:190
msgid "Put all updates available in the service pack"
msgstr "સà«àªµàª¾ પà«àªàª®àª¾àª àªàªªàª²àª¬à«àª§ બધા સà«àª§àª¾àª°àª¾àª મà«àªà«"
#. TRANSLATORS: This is when the user fails to supply the correct arguments
-#: ../client/pk-generate-pack.c:166
+#: ../client/pk-generate-pack.c:213
msgid "Neither --package or --updates option selected."
msgstr "ના તૠ--package àªà« --updates વિàªàª²à«àªª પસàªàª¦ થયà«àª² àªà«."
#. TRANSLATORS: This is when the user fails to supply just one argument
-#: ../client/pk-generate-pack.c:174
+#: ../client/pk-generate-pack.c:221
msgid "Both options selected."
msgstr "બàªàª¨à« વિàªàª²à«àªªà« પસàªàª¦ થયà«àª² àªà«."
#. TRANSLATORS: This is when file already exists
-#: ../client/pk-generate-pack.c:207
+#: ../client/pk-generate-pack.c:254
msgid "A pack with the same name already exists, do you want to overwrite it?"
msgstr "ઠઠનામ સાથà«àª¨à«àª પà«àª પહà«àª²àª¾àª¥à« ઠહાàªàª° àªà«, શà«àª તમૠતà«àª¨àª¾ પર ફરà«àª¥à« લàªàªµàª¾ માàªàªà« àªà«?"
#. TRANSLATORS: This is when the pack was not overwritten
-#: ../client/pk-generate-pack.c:210
+#: ../client/pk-generate-pack.c:257
msgid "The pack was not overwritten."
msgstr "પà«àª àªàªªàª° ફરà«àª¥à« લàªàª¾àª¯à«àª² નથà«."
#. TRANSLATORS: This is when the temporary directory cannot be created, the directory name follows
-#: ../client/pk-generate-pack.c:222
+#: ../client/pk-generate-pack.c:269
msgid "Failed to create directory:"
msgstr "ડિરà«àªà«àªàª°à« બનાવવામાઠનિષà«àª«àª³:"
#. TRANSLATORS: This is when the list of packages from the remote computer cannot be opened
-#: ../client/pk-generate-pack.c:231
+#: ../client/pk-generate-pack.c:278
msgid "Failed to open package list."
msgstr "પà«àªà«àª યાદૠàªà«àª²àªµàª¾àª®àª¾àª નિષà«àª«àª³."
#. TRANSLATORS: The package name is being matched up to available packages
-#: ../client/pk-generate-pack.c:241
+#: ../client/pk-generate-pack.c:288
msgid "Finding package name."
msgstr "પà«àªà«àª નામ શà«àª§à« રહà«àª¯àª¾ àªà«àª."
#. TRANSLATORS: This is when the package cannot be found in any software source. The detailed error follows
-#: ../client/pk-generate-pack.c:245
+#: ../client/pk-generate-pack.c:292
#, c-format
msgid "Failed to find package '%s': %s"
msgstr "પà«àªà«àª '%s' શà«àª§àªµàª¾àª®àª¾àª નિષà«àª«àª³: %s"
#. TRANSLATORS: This is telling the user we are in the process of making the pack
-#: ../client/pk-generate-pack.c:260
+#: ../client/pk-generate-pack.c:308
msgid "Creating service pack..."
msgstr "સà«àªµàª¾ પà«àª બનાવૠરહà«àª¯àª¾ àªà«àª..."
#. TRANSLATORS: we succeeded in making the file
-#: ../client/pk-generate-pack.c:267
+#: ../client/pk-generate-pack.c:315
#, c-format
msgid "Service pack created '%s'"
msgstr "સà«àªµàª¾ પà«àª બનાવાયà«àª '%s'"
#. TRANSLATORS: we failed to make te file
-#: ../client/pk-generate-pack.c:271
+#: ../client/pk-generate-pack.c:319
#, c-format
msgid "Failed to create '%s': %s"
msgstr "'%s' બનાવવામાઠનિષà«àª«àª³: %s"
commit 0570664588f4911284a316696b9d9afa8ebdcc70
Merge: f4888d0... 2719b19...
Author: Stefan Haas <shaas at suse.de>
Date: Mon Nov 3 13:34:34 2008 +0100
Merge branch 'master' of git+ssh://shaas@git.packagekit.org/srv/git/PackageKit
commit f4888d097b6d02bcc5559c32298448d5cf27410a
Author: Stefan Haas <shaas at suse.de>
Date: Mon Nov 3 13:34:17 2008 +0100
zypp: changed get_distro_upgrades function
diff --git a/backends/zypp/pk-backend-zypp.cpp b/backends/zypp/pk-backend-zypp.cpp
index 4c43846..6cedb5e 100644
--- a/backends/zypp/pk-backend-zypp.cpp
+++ b/backends/zypp/pk-backend-zypp.cpp
@@ -49,6 +49,8 @@
#include <zypp/target/rpm/RpmDb.h>
#include <zypp/target/rpm/RpmHeader.h>
#include <zypp/target/rpm/RpmException.h>
+#include <zypp/base/Functional.h>
+#include <zypp/parser/ProductFileReader.h>
#include <zypp/TmpPath.h>
#include <zypp/sat/Solvable.h>
@@ -574,38 +576,33 @@ static gboolean
backend_get_distro_upgrades_thread(PkBackend *backend)
{
pk_backend_set_status (backend, PK_STATUS_ENUM_QUERY);
- pk_backend_set_percentage (backend, 0);
- // refresh the repos before checking for updates
- if (!zypp_refresh_cache (backend, FALSE)) {
+ std::vector<zypp::parser::ProductFileData> result;
+ if (!zypp::parser::ProductFileReader::scanDir (zypp::functor::getAll (std::back_inserter (result)), "/etc/products.d")) {
+ pk_backend_error_code (backend, PK_ERROR_ENUM_INTERNAL_ERROR, "Could not parse /etc/products.d");
pk_backend_finished (backend);
return FALSE;
}
- zypp::ResPool pool = zypp_build_pool (TRUE);
- pk_backend_set_percentage (backend, 40);
-
- // get all Packages and Patches for Update
- std::set<zypp::PoolItem> *candidates = zypp_get_patches ();
-
- pk_backend_set_percentage (backend, 80);
-
- std::set<zypp::PoolItem>::iterator cb = candidates->begin (), ce = candidates->end (), ci;
- for (ci = cb; ci != ce; ++ci) {
- zypp::ResObject::constPtr res = ci->resolvable();
-
- if (zypp::isKind<zypp::Patch>(res)) {
- zypp::Patch::constPtr patch = zypp::asKind<zypp::Patch>(res);
- if (patch->category () == "distupgrade")
- {
- // here emit a distupgrade available using the patch summary
- pk_backend_distro_upgrade(backend,
- PK_DISTRO_UPGRADE_ENUM_STABLE,
- patch->name ().c_str (),
- patch->summary ().c_str ());
+ for (std::vector<zypp::parser::ProductFileData>::iterator it = result.begin (); it != result.end (); it++) {
+ std::vector<zypp::parser::ProductFileData::Upgrade> upgrades = it->upgrades();
+ for (std::vector<zypp::parser::ProductFileData::Upgrade>::iterator it2 = upgrades.begin (); it2 != upgrades.end (); it2++) {
+ if (it2->notify ()){
+ PkDistroUpgradeEnum status = PK_DISTRO_UPGRADE_ENUM_UNKNOWN;
+ if (it2->status () == "stable") {
+ status = PK_DISTRO_UPGRADE_ENUM_STABLE;
+ } else if (it2->status () == "unstable") {
+ status = PK_DISTRO_UPGRADE_ENUM_UNSTABLE;
+ }
+ pk_backend_distro_upgrade (backend,
+ status,
+ it2->name ().c_str (),
+ it2->summary ().c_str ());
}
}
}
+
+ pk_backend_finished (backend);
return TRUE;
}
commit 2719b1941a4cb4902abeca6185b44812f1e517c3
Author: Richard Hughes <richard at hughsie.com>
Date: Mon Nov 3 11:19:43 2008 +0000
yum: fix a recently introduced regression where installing a zero byte file would not return the correct error code
diff --git a/backends/yum/yumBackend.py b/backends/yum/yumBackend.py
index 85cf4da..5a81644 100755
--- a/backends/yum/yumBackend.py
+++ b/backends/yum/yumBackend.py
@@ -1307,6 +1307,8 @@ class PackageKitYumBackend(PackageKitBaseBackend, PackagekitPackage):
pkgs_local = self.yumbase.rpmdb.searchNevra(name=pkg.name)
except yum.Errors.YumBaseError, e:
self.error(ERROR_INVALID_PACKAGE_FILE, 'Package could not be decompressed')
+ except yum.Errors.MiscError:
+ self.error(ERROR_INVALID_PACKAGE_FILE, "%s does not appear to be a valid package." % inst_file)
except:
self.error(ERROR_UNKNOWN, "Failed to open local file -- please report")
else:
@@ -1341,7 +1343,10 @@ class PackageKitYumBackend(PackageKitBaseBackend, PackagekitPackage):
# This means we don't run runYumTransaction, and don't get the GPG failure in
# PackageKitYumBase(_checkSignatures) -- so we check here
for inst_file in inst_files:
- po = YumLocalPackage(ts=self.yumbase.rpmdb.readOnlyTS(), filename=inst_file)
+ try:
+ po = YumLocalPackage(ts=self.yumbase.rpmdb.readOnlyTS(), filename=inst_file)
+ except yum.Errors.MiscError:
+ self.error(ERROR_INVALID_PACKAGE_FILE, "%s does not appear to be a valid package." % inst_file)
try:
self.yumbase._checkSignatures([po], None)
except yum.Errors.YumGPGCheckError, e:
commit bc92f4ee28b6c4e11a270ceec533cb08b9a8152e
Author: Xavier Conde <xavi.conde at gmail.com>
Date: Sun Nov 2 15:10:13 2008 +0000
Updated catalan po
Transmitted-via: Transifex (translate.fedoraproject.org)
diff --git a/po/ca.po b/po/ca.po
index 1d2a69d..5429d27 100644
--- a/po/ca.po
+++ b/po/ca.po
@@ -21,8 +21,8 @@ msgid ""
msgstr ""
"Project-Id-Version: packagekit\n"
"Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2008-10-22 11:10+0100\n"
-"PO-Revision-Date: 2008-10-18 12:27+0100\n"
+"POT-Creation-Date: 2008-10-27 02:03+0000\n"
+"PO-Revision-Date: 2008-11-02 12:27+0100\n"
"Last-Translator: Xavier Conde Rueda <xavi.conde at gmail.com>\n"
"Language-Team: Catalan <fedora at softcatala.net>\n"
"MIME-Version: 1.0\n"
@@ -48,20 +48,20 @@ msgid "Please restart the application as it is being used."
msgstr "Cal que reinicieu l'aplicació perquè s'està fent servir."
#. TRANSLATORS: The package is already installed on the system
-#: ../client/pk-console.c:579
-#, fuzzy, c-format
+#: ../client/pk-console.c:580
+#, c-format
msgid "The package '%s' is already installed"
-msgstr "No s'ha pogut instal·lar el paquet «%s»: %s"
+msgstr "El paquet «%s» ja s'ha instal·lat"
#. TRANSLATORS: The package name was not found in any software sources. The detailed error follows
-#: ../client/pk-console.c:587
+#: ../client/pk-console.c:588
#, c-format
msgid "The package '%s' could not be installed: %s"
msgstr "No s'ha pogut instal·lar el paquet «%s»: %s"
#. TRANSLATORS: There was a programming error that shouldn't happen. The detailed error follows
-#: ../client/pk-console.c:612 ../client/pk-console.c:639
-#: ../client/pk-console.c:735 ../client/pk-console.c:852
+#: ../client/pk-console.c:613 ../client/pk-console.c:640
+#: ../client/pk-console.c:736 ../client/pk-console.c:853
#: ../client/pk-tools-common.c:55 ../client/pk-tools-common.c:74
#: ../client/pk-tools-common.c:81
#, c-format
@@ -69,375 +69,374 @@ msgid "Internal error: %s"
msgstr "Error intern: %s"
#. TRANSLATORS: There was an error installing the packages. The detailed error follows
-#: ../client/pk-console.c:620
+#: ../client/pk-console.c:621
#, c-format
msgid "This tool could not install the packages: %s"
msgstr "No s'ha pogut instal·lar els paquets: %s"
#. TRANSLATORS: There was an error installing the files. The detailed error follows
-#: ../client/pk-console.c:647
-#, fuzzy, c-format
+#: ../client/pk-console.c:648
+#, c-format
msgid "This tool could not install the files: %s"
-msgstr "No s'ha pogut instal·lar els paquets: %s"
+msgstr "No s'ha pogut instal·lar els fitxers: %s"
#. TRANSLATORS: The package name was not found in the installed list. The detailed error follows
-#: ../client/pk-console.c:703
+#: ../client/pk-console.c:704
#, c-format
msgid "This tool could not remove '%s': %s"
msgstr "No s'ha pogut suprimir «%s»: %s"
#. TRANSLATORS: There was an error removing the packages. The detailed error follows
-#: ../client/pk-console.c:726 ../client/pk-console.c:797
+#: ../client/pk-console.c:727 ../client/pk-console.c:798
#, c-format
msgid "This tool could not remove the packages: %s"
msgstr "No s'ha pogut suprimir els paquets: %s"
#. TRANSLATORS: There was an error removing the packages. The detailed error follows
-#: ../client/pk-console.c:764
+#: ../client/pk-console.c:765
#, c-format
msgid "This tool could not remove the packages: '%s'"
msgstr "No s'ha pogut suprimir els paquets: «%s»"
#. TRANSLATORS: When removing, we might have to remove other dependencies
-#: ../client/pk-console.c:776
-#, fuzzy
+#: ../client/pk-console.c:777
msgid "The following packages have to be removed:"
-msgstr "Els següents paquets seran eliminats"
+msgstr "Els següents paquets s'han hagut d'eliminar:"
#. TRANSLATORS: We are checking if it's okay to remove a list of packages
-#: ../client/pk-console.c:783
+#: ../client/pk-console.c:784
msgid "Proceed removing additional packages?"
msgstr "Voleu eliminar els paquets addicionals?"
#. TRANSLATORS: We did not remove any packages
-#: ../client/pk-console.c:788
-#, fuzzy
+#: ../client/pk-console.c:789
msgid "The package removal was canceled!"
msgstr "S'ha cancel·lat la supressió dels paquets"
#. TRANSLATORS: The package name was not found in any software sources
-#: ../client/pk-console.c:829
-#, fuzzy, c-format
+#: ../client/pk-console.c:830
+#, c-format
msgid "This tool could not download the package '%s' as it could not be found"
msgstr "No s'ha trobat el paquet «%s» per a baixar"
#. TRANSLATORS: Could not download the packages for some reason. The detailed error follows
-#: ../client/pk-console.c:860
-#, fuzzy, c-format
+#: ../client/pk-console.c:861
+#, c-format
msgid "This tool could not download the packages: %s"
-msgstr "No s'ha pogut instal·lar els paquets: %s"
+msgstr "No s'ha pogut baixar els paquets: %s"
#. TRANSLATORS: There was an error getting the list of files for the package. The detailed error follows
-#: ../client/pk-console.c:887 ../client/pk-console.c:896
+#: ../client/pk-console.c:888 ../client/pk-console.c:897
#, c-format
msgid "This tool could not update '%s': %s"
msgstr "No s'ha pogut actualitzar «%s»: %s"
#. TRANSLATORS: There was an error getting the list of files for the package. The detailed error follows
-#: ../client/pk-console.c:918 ../client/pk-console.c:926
-#, fuzzy, c-format
+#: ../client/pk-console.c:919 ../client/pk-console.c:927
+#, c-format
msgid "This tool could not get the requirements for '%s': %s"
msgstr "No s'han obtingut els requeriments per a «%s»: %s"
#. TRANSLATORS: There was an error getting the dependencies for the package. The detailed error follows
-#: ../client/pk-console.c:948 ../client/pk-console.c:956
-#, fuzzy, c-format
+#: ../client/pk-console.c:949 ../client/pk-console.c:957
+#, c-format
msgid "This tool could not get the dependencies for '%s': %s"
msgstr "No s'han pogut obtenir les dependències per a «%s»: %s"
#. TRANSLATORS: There was an error getting the details about the package. The detailed error follows
-#: ../client/pk-console.c:978 ../client/pk-console.c:986
+#: ../client/pk-console.c:979 ../client/pk-console.c:987
#, c-format
msgid "This tool could not get package details for '%s': %s"
msgstr "No s'han pogut obtenir els detalls del paquet de «%s»: %s"
#. TRANSLATORS: The package name was not found in any software sources. The detailed error follows
-#: ../client/pk-console.c:1008
+#: ../client/pk-console.c:1009
#, c-format
msgid "This tool could not find the files for '%s': %s"
msgstr "No s'han pogut trobar els fitxers per a «%s»: %s"
#. TRANSLATORS: There was an error getting the list of files for the package. The detailed error follows
-#: ../client/pk-console.c:1016
+#: ../client/pk-console.c:1017
#, c-format
msgid "This tool could not get the file list for '%s': %s"
msgstr "No s'ha pogut obtenir la llista de fitxers per a «%s»: %s"
#. TRANSLATORS: The package name was not found in any software sources. The detailed error follows
-#: ../client/pk-console.c:1038
+#: ../client/pk-console.c:1039
#, c-format
msgid "This tool could not find the update details for '%s': %s"
msgstr "No s'han trobat els detalls per a actualitzar «%s»: %s"
#. TRANSLATORS: There was an error getting the details about the update for the package. The detailed error follows
-#: ../client/pk-console.c:1046
+#: ../client/pk-console.c:1047
#, c-format
msgid "This tool could not get the update details for '%s': %s"
msgstr "No s'han obtingut els detalls per a actualitzar «%s»: %s"
#. TRANSLATORS: This was an unhandled error, and we don't have _any_ context
-#: ../client/pk-console.c:1092
+#: ../client/pk-console.c:1093
msgid "Error:"
msgstr "Error:"
#. TRANSLATORS: This a list of details about the package
-#: ../client/pk-console.c:1106
+#: ../client/pk-console.c:1107
msgid "Package description"
msgstr "Descripció del paquet"
#. TRANSLATORS: This a list files contained in the package
-#: ../client/pk-console.c:1139
+#: ../client/pk-console.c:1140
msgid "Package files"
msgstr "Fitxers del paquet"
#. TRANSLATORS: This where the package has no files
-#: ../client/pk-console.c:1148
+#: ../client/pk-console.c:1149
msgid "No files"
msgstr "No hi ha fitxers"
#. TRANSLATORS: This a request for a GPG key signature from the backend, which the client will prompt for later
-#: ../client/pk-console.c:1171
+#: ../client/pk-console.c:1172
msgid "Repository signature required"
msgstr "Es necessita la signatura del repositori"
#. TRANSLATORS: This a prompt asking the user to import the security key
-#: ../client/pk-console.c:1181
+#: ../client/pk-console.c:1182
msgid "Do you accept this signature?"
-msgstr ""
+msgstr "Voleu acceptar aquesta signatura?"
#. TRANSLATORS: This is where the user declined the security key
-#: ../client/pk-console.c:1185
-#, fuzzy
+#: ../client/pk-console.c:1186
+#,
msgid "The signature was not accepted."
msgstr "No s'ha sobreescrit el paquet."
#. TRANSLATORS: This a request for a EULA
-#: ../client/pk-console.c:1219
+#: ../client/pk-console.c:1220
msgid "End user license agreement required"
-msgstr ""
+msgstr "Cal l'acord de llicència d'usuari final"
#. TRANSLATORS: This a prompt asking the user to agree to the license
-#: ../client/pk-console.c:1226
-#, fuzzy
+#: ../client/pk-console.c:1227
msgid "Do you agree to this license?"
-msgstr "La llicència no ha estat acceptada"
+msgstr "Esteu d'acord amb aquesta llicència?"
#. TRANSLATORS: This is where the user declined the license
-#: ../client/pk-console.c:1230
+#: ../client/pk-console.c:1231
msgid "The license was refused."
-msgstr ""
+msgstr "S'ha rebutjat la llicència."
#. TRANSLATORS: This is when the daemon crashed, and we are up shit creek without a paddle
-#: ../client/pk-console.c:1259
+#: ../client/pk-console.c:1260
msgid "The daemon crashed mid-transaction!"
msgstr "El servei ha fallat a meitat de la transacció!"
#. TRANSLATORS: This is the header to the --help menu
-#: ../client/pk-console.c:1312
+#: ../client/pk-console.c:1313
msgid "PackageKit Console Interface"
msgstr "InterfÃcie de consola de PackageKit"
-#: ../client/pk-console.c:1312
+#: ../client/pk-console.c:1313
msgid "Subcommands:"
msgstr "Subordres:"
-#: ../client/pk-console.c:1403 ../client/pk-generate-pack.c:138
+#: ../client/pk-console.c:1404 ../client/pk-generate-pack.c:182
#: ../client/pk-monitor.c:115 ../src/pk-main.c:196
msgid "Show extra debugging information"
msgstr "Mostra la informació extra de la depuració"
-#: ../client/pk-console.c:1405 ../client/pk-monitor.c:117
+#: ../client/pk-console.c:1406 ../client/pk-monitor.c:117
msgid "Show the program version and exit"
msgstr "Mostra la versió del programa i surt"
-#: ../client/pk-console.c:1407
+#: ../client/pk-console.c:1408
msgid "Set the filter, e.g. installed"
msgstr "Defineix el filtre, p.ex. instal·lat"
-#: ../client/pk-console.c:1409
+#: ../client/pk-console.c:1410
msgid "Exit without waiting for actions to complete"
msgstr "Surt sense esperar que es completin les accions"
#. TRANSLATORS: This is when we could not connect to the system bus, and is fatal
-#: ../client/pk-console.c:1431
+#: ../client/pk-console.c:1432
msgid "This tool could not connect to system DBUS."
msgstr "No s'ha pogut connectar al sistema DBUS."
-#: ../client/pk-console.c:1526
+#: ../client/pk-console.c:1527
msgid "You need to specify a search type, e.g. name"
msgstr "Cal que especifiqueu un tipus de cerca, p.e. per nom"
-#: ../client/pk-console.c:1531 ../client/pk-console.c:1538
-#: ../client/pk-console.c:1545 ../client/pk-console.c:1552
-#: ../client/pk-console.c:1663 ../client/pk-console.c:1673
-#: ../client/pk-console.c:1680 ../client/pk-console.c:1687
+#: ../client/pk-console.c:1532 ../client/pk-console.c:1539
+#: ../client/pk-console.c:1546 ../client/pk-console.c:1553
+#: ../client/pk-console.c:1664 ../client/pk-console.c:1674
+#: ../client/pk-console.c:1681 ../client/pk-console.c:1688
msgid "You need to specify a search term"
msgstr "Cal que especifiqueu un terme per a la cerca"
-#: ../client/pk-console.c:1557
+#: ../client/pk-console.c:1558
msgid "Invalid search type"
msgstr "El tipus de cerca no és và lid"
-#: ../client/pk-console.c:1562
+#: ../client/pk-console.c:1563
msgid "You need to specify a package or file to install"
msgstr "Cal que especifiqueu un paquet o un fitxer a instal·lar"
-#: ../client/pk-console.c:1569
+#: ../client/pk-console.c:1570
msgid "You need to specify a type, key_id and package_id"
msgstr ""
"Cal que especifiqueu un tipus, un identificador de clau i un identificador "
"de paquet"
-#: ../client/pk-console.c:1576
+#: ../client/pk-console.c:1577
msgid "You need to specify a package to remove"
msgstr "Cal que especifiqueu un paquet a eliminar"
-#: ../client/pk-console.c:1582
+#: ../client/pk-console.c:1583
msgid ""
"You need to specify the destination directory and then the packages to "
"download"
msgstr "Cal que especifiqueu el directori destà i els paquets a baixar"
-#: ../client/pk-console.c:1587
+#: ../client/pk-console.c:1588
msgid "Directory not found"
msgstr "No s'ha trobat el directori"
-#: ../client/pk-console.c:1593
-#, fuzzy
+#: ../client/pk-console.c:1594
msgid "You need to specify a licence identifier (eula-id)"
-msgstr "Cal que especifiqueu un identificador de EULA"
+msgstr "Cal que especifiqueu un identificador de llicència (eula-id)"
-#: ../client/pk-console.c:1609
+#: ../client/pk-console.c:1610
msgid "You need to specify a package name to resolve"
msgstr "Cal que especifiqueu un nom de paquet a resoldre"
-#: ../client/pk-console.c:1618 ../client/pk-console.c:1625
-#, fuzzy
+#: ../client/pk-console.c:1619 ../client/pk-console.c:1626
msgid "You need to specify a repository name"
msgstr "Cal que especifiqueu un nom de repositori"
-#: ../client/pk-console.c:1632
+#: ../client/pk-console.c:1633
msgid "You need to specify a repo name/parameter and value"
msgstr "Cal que especifiqueu un nom / parà metre de repositori i un valor"
-#: ../client/pk-console.c:1645
-#, fuzzy
+#: ../client/pk-console.c:1646
msgid "You need to specify an action, e.g. 'update-system'"
-msgstr "Cal que especifiqueu un tipus de cerca, p.e. per nom"
+msgstr "Cal que especifiqueu una acció, p.e. 'update-system'"
-#: ../client/pk-console.c:1650
+#: ../client/pk-console.c:1651
msgid "You need to specify a correct role"
msgstr "Cal que especifiqueu un rol correcte"
-#: ../client/pk-console.c:1655
+#: ../client/pk-console.c:1656
msgid "Failed to get last time"
msgstr "S'ha produït un error en obtenir l'última hora"
-#: ../client/pk-console.c:1694
+#: ../client/pk-console.c:1695
msgid "You need to specify a package to find the details for"
msgstr "Cal que especifiqueu un paquet per cercar-ne els detalls"
-#: ../client/pk-console.c:1701
+#: ../client/pk-console.c:1702
msgid "You need to specify a package to find the files for"
msgstr "Cal que especifiqueu un paquet per cercar-ne fitxers"
#. TRANSLATORS: The user tried to use an unsupported option on the command line
-#: ../client/pk-console.c:1754
-#, fuzzy, c-format
+#: ../client/pk-console.c:1755
+#, c-format
msgid "Option '%s' is not supported"
msgstr "L'opció '%s' no està disponible"
#. TRANSLATORS: User does not have permission to do this
-#: ../client/pk-console.c:1767
+#: ../client/pk-console.c:1768
msgid "You don't have the necessary privileges for this operation"
msgstr "No teniu suficients privilegis per a aquesta operació"
#. TRANSLATORS: Generic failure of what they asked to do
-#: ../client/pk-console.c:1770
+#: ../client/pk-console.c:1771
msgid "Command failed"
msgstr "L'ordre ha fallat"
#. TRANSLATORS: This is the state of the transaction
-#: ../client/pk-generate-pack.c:96
+#: ../client/pk-generate-pack.c:98
msgid "Downloading"
msgstr "Baixant"
-#: ../client/pk-generate-pack.c:140
-#, fuzzy
+#. TRANSLATORS: This is when the main packages are being downloaded
+#: ../client/pk-generate-pack.c:118
+msgid "Downloading packages"
+msgstr "Baixant paquets"
+
+#. TRANSLATORS: This is when the dependency packages are being downloaded
+#: ../client/pk-generate-pack.c:123
+msgid "Downloading dependencies"
+msgstr "Baixant dependències"
+
+#: ../client/pk-generate-pack.c:184
msgid "Set the file name of dependencies to be excluded"
-msgstr "Establiu el nom del fitxer amb la llista de dependències a excloure"
+msgstr "Establiu el nom del fitxer de dependències a excloure"
-#: ../client/pk-generate-pack.c:142
-#, fuzzy
+#: ../client/pk-generate-pack.c:186
msgid "The output directory (the current directory is used if ommitted)"
msgstr ""
-"El directori on deixar el fitxer de paquet, o el directori actual si s'omet"
+"El directori de sortida (o el directori actual si s'omet)"
-#: ../client/pk-generate-pack.c:144
-#, fuzzy
+#: ../client/pk-generate-pack.c:188
msgid "The package to be put into the service pack"
-msgstr "Paquet que es ficarà en els paquets de servei"
+msgstr "Paquet que s'inclourà en els paquets de servei"
-#: ../client/pk-generate-pack.c:146
-#, fuzzy
+#: ../client/pk-generate-pack.c:190
msgid "Put all updates available in the service pack"
-msgstr "Ficat totes les actualitzacions disponibles en els paquets de servei"
+msgstr "S'han ficat totes les actualitzacions disponibles en el paquet de servei"
#. TRANSLATORS: This is when the user fails to supply the correct arguments
-#: ../client/pk-generate-pack.c:166
+#: ../client/pk-generate-pack.c:213
msgid "Neither --package or --updates option selected."
msgstr "No s'ha seleccionat --package o --updates."
#. TRANSLATORS: This is when the user fails to supply just one argument
-#: ../client/pk-generate-pack.c:174
+#: ../client/pk-generate-pack.c:221
msgid "Both options selected."
msgstr "S'han seleccionat ambdues."
#. TRANSLATORS: This is when file already exists
-#: ../client/pk-generate-pack.c:207
+#: ../client/pk-generate-pack.c:254
msgid "A pack with the same name already exists, do you want to overwrite it?"
msgstr "Existeix un grup de paquets amb el mateix nom, voleu sobreescriure'l?"
#. TRANSLATORS: This is when the pack was not overwritten
-#: ../client/pk-generate-pack.c:210
+#: ../client/pk-generate-pack.c:257
msgid "The pack was not overwritten."
msgstr "No s'ha sobreescrit el paquet."
#. TRANSLATORS: This is when the temporary directory cannot be created, the directory name follows
-#: ../client/pk-generate-pack.c:222
-#, fuzzy
+#: ../client/pk-generate-pack.c:269
msgid "Failed to create directory:"
-msgstr "S'ha produït un error en crear el directori."
+msgstr "S'ha produït un error en crear el directori:"
#. TRANSLATORS: This is when the list of packages from the remote computer cannot be opened
-#: ../client/pk-generate-pack.c:231
+#: ../client/pk-generate-pack.c:278
msgid "Failed to open package list."
msgstr "S'ha produït un error en obrir la llista de paquets."
#. TRANSLATORS: The package name is being matched up to available packages
-#: ../client/pk-generate-pack.c:241
+#: ../client/pk-generate-pack.c:288
msgid "Finding package name."
msgstr "S'està cercant el nom del paquet."
#. TRANSLATORS: This is when the package cannot be found in any software source. The detailed error follows
-#: ../client/pk-generate-pack.c:245
+#: ../client/pk-generate-pack.c:292
#, c-format
msgid "Failed to find package '%s': %s"
msgstr "No s'ha trobat el paquet «%s»: %s"
#. TRANSLATORS: This is telling the user we are in the process of making the pack
-#: ../client/pk-generate-pack.c:260
+#: ../client/pk-generate-pack.c:308
msgid "Creating service pack..."
msgstr "S'està creant els paquets de servei..."
#. TRANSLATORS: we succeeded in making the file
-#: ../client/pk-generate-pack.c:267
+#: ../client/pk-generate-pack.c:315
#, c-format
msgid "Service pack created '%s'"
msgstr "Paquets de servei creats a «%s»"
#. TRANSLATORS: we failed to make te file
-#: ../client/pk-generate-pack.c:271
+#: ../client/pk-generate-pack.c:319
#, c-format
msgid "Failed to create '%s': %s"
msgstr "No s'ha pogut crear «%s»: %s"
@@ -448,7 +447,6 @@ msgstr "Monitorització de Packagekit"
#. TRANSLATORS: The package was not found in any software sources
#: ../client/pk-tools-common.c:108
-#, c-format
msgid "The package could not be found"
msgstr "No s'han trobat el paquet"
@@ -495,13 +493,13 @@ msgstr "Executa ara"
#. TRANSLATORS: update to a new version of the package
#: ../contrib/packagekit-plugin/src/contents.cpp:330
-#, fuzzy, c-format
+#, c-format
msgid "Update to version %s"
msgstr "Actualitza a la versió %s"
#. TRANSLATORS: To install a package
#: ../contrib/packagekit-plugin/src/contents.cpp:336
-#, fuzzy, c-format
+#, c-format
msgid "Install %s now"
msgstr "Instal·la %s ara"
@@ -532,90 +530,6 @@ msgstr "Grup de paquets de servei del PackageKit"
msgid "PackageKit Package List"
msgstr "Llista de paquets del Packagekit"
-#: ../policy/org.freedesktop.packagekit.policy.in.h:1
-msgid "Accept EULA"
-msgstr ""
-
-#: ../policy/org.freedesktop.packagekit.policy.in.h:2
-msgid "Authentication is required to accept a EULA"
-msgstr ""
-
-#: ../policy/org.freedesktop.packagekit.policy.in.h:3
-msgid "Authentication is required to change software source parameters"
-msgstr ""
-
-#: ../policy/org.freedesktop.packagekit.policy.in.h:4
-msgid ""
-"Authentication is required to consider a key used for signing packages as "
-"trusted"
-msgstr ""
-
-#: ../policy/org.freedesktop.packagekit.policy.in.h:5
-msgid "Authentication is required to install a signed package"
-msgstr ""
-
-#: ../policy/org.freedesktop.packagekit.policy.in.h:6
-msgid "Authentication is required to install an untrusted package"
-msgstr ""
-
-#: ../policy/org.freedesktop.packagekit.policy.in.h:7
-msgid "Authentication is required to refresh the system sources"
-msgstr ""
-
-#: ../policy/org.freedesktop.packagekit.policy.in.h:8
-msgid "Authentication is required to remove packages"
-msgstr ""
-
-#: ../policy/org.freedesktop.packagekit.policy.in.h:9
-msgid "Authentication is required to rollback a transaction"
-msgstr ""
-
-#: ../policy/org.freedesktop.packagekit.policy.in.h:10
-msgid ""
-"Authentication is required to set the network proxy used for downloading "
-"packages"
-msgstr ""
-
-#: ../policy/org.freedesktop.packagekit.policy.in.h:11
-msgid "Authentication is required to update packages"
-msgstr ""
-
-#: ../policy/org.freedesktop.packagekit.policy.in.h:12
-msgid "Change software source parameters"
-msgstr ""
-
-#: ../policy/org.freedesktop.packagekit.policy.in.h:13
-msgid "Install local file"
-msgstr ""
-
-#: ../policy/org.freedesktop.packagekit.policy.in.h:14
-msgid "Install untrusted local file"
-msgstr ""
-
-#: ../policy/org.freedesktop.packagekit.policy.in.h:15
-msgid "Refresh system sources"
-msgstr ""
-
-#: ../policy/org.freedesktop.packagekit.policy.in.h:16
-msgid "Remove package"
-msgstr ""
-
-#: ../policy/org.freedesktop.packagekit.policy.in.h:17
-msgid "Rollback to a previous transaction"
-msgstr ""
-
-#: ../policy/org.freedesktop.packagekit.policy.in.h:18
-msgid "Set network proxy"
-msgstr ""
-
-#: ../policy/org.freedesktop.packagekit.policy.in.h:19
-msgid "Trust a key used for signing packages"
-msgstr ""
-
-#: ../policy/org.freedesktop.packagekit.policy.in.h:20
-msgid "Update packages"
-msgstr ""
-
#: ../src/pk-main.c:85
msgid "Startup failed due to security policies on this machine."
msgstr ""
@@ -632,13 +546,12 @@ msgstr ""
"superusuari root)"
#: ../src/pk-main.c:88
-#, fuzzy
msgid ""
"The org.freedesktop.PackageKit.conf file is not installed in the system "
"directory:"
msgstr ""
"El fitxer org.freedesktop.PackageKit.conf no està instal·lat al directori "
-"del sistema /etc/dbus-1/system.d"
+"del sistema:"
#: ../src/pk-main.c:192
msgid "Packaging backend to use, e.g. dummy"
commit 00b8319064648168e026a08fbb2ec9ef938e0892
Author: Ville-Pekka Vainio <vpivaini at cs.helsinki.fi>
Date: Sat Nov 1 12:20:12 2008 +0000
Updated Finnish translation
Transmitted-via: Transifex (translate.fedoraproject.org)
diff --git a/po/fi.po b/po/fi.po
index 7097fa3..a27290a 100644
--- a/po/fi.po
+++ b/po/fi.po
@@ -7,8 +7,8 @@ msgid ""
msgstr ""
"Project-Id-Version: packagekit\n"
"Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2008-10-22 11:10+0100\n"
-"PO-Revision-Date: 2008-10-21 18:55+0300\n"
+"POT-Creation-Date: 2008-10-27 02:03+0000\n"
+"PO-Revision-Date: 2008-11-01 14:18+0200\n"
"Last-Translator: Ville-Pekka Vainio <vpivaini at cs.helsinki.fi>\n"
"Language-Team: Finnish <laatu at lokalisointi.org>\n"
"MIME-Version: 1.0\n"
@@ -33,20 +33,20 @@ msgid "Please restart the application as it is being used."
msgstr "Ohjelmaa käytetään tällä hetkellä, käynnistä se uudelleen."
#. TRANSLATORS: The package is already installed on the system
-#: ../client/pk-console.c:579
+#: ../client/pk-console.c:580
#, c-format
msgid "The package '%s' is already installed"
msgstr "Paketti â%sâ on jo asennettu"
#. TRANSLATORS: The package name was not found in any software sources. The detailed error follows
-#: ../client/pk-console.c:587
+#: ../client/pk-console.c:588
#, c-format
msgid "The package '%s' could not be installed: %s"
msgstr "Pakettia â%sâ ei voitu asentaa: %s"
#. TRANSLATORS: There was a programming error that shouldn't happen. The detailed error follows
-#: ../client/pk-console.c:612 ../client/pk-console.c:639
-#: ../client/pk-console.c:735 ../client/pk-console.c:852
+#: ../client/pk-console.c:613 ../client/pk-console.c:640
+#: ../client/pk-console.c:736 ../client/pk-console.c:853
#: ../client/pk-tools-common.c:55 ../client/pk-tools-common.c:74
#: ../client/pk-tools-common.c:81
#, c-format
@@ -54,366 +54,375 @@ msgid "Internal error: %s"
msgstr "Sisäinen virhe: %s"
#. TRANSLATORS: There was an error installing the packages. The detailed error follows
-#: ../client/pk-console.c:620
+#: ../client/pk-console.c:621
#, c-format
msgid "This tool could not install the packages: %s"
msgstr "Tämä työkalu ei voinut asentaa paketteja: %s"
#. TRANSLATORS: There was an error installing the files. The detailed error follows
-#: ../client/pk-console.c:647
+#: ../client/pk-console.c:648
#, c-format
msgid "This tool could not install the files: %s"
msgstr "Tämä työkalu ei voinut asentaa tiedostoja: %s"
#. TRANSLATORS: The package name was not found in the installed list. The detailed error follows
-#: ../client/pk-console.c:703
+#: ../client/pk-console.c:704
#, c-format
msgid "This tool could not remove '%s': %s"
msgstr "Tämä työkalu ei voinut poistaa pakettia â%sâ: %s"
#. TRANSLATORS: There was an error removing the packages. The detailed error follows
-#: ../client/pk-console.c:726 ../client/pk-console.c:797
+#: ../client/pk-console.c:727 ../client/pk-console.c:798
#, c-format
msgid "This tool could not remove the packages: %s"
msgstr "Tämä työkalu ei voinut poistaa paketteja: %s"
#. TRANSLATORS: There was an error removing the packages. The detailed error follows
-#: ../client/pk-console.c:764
+#: ../client/pk-console.c:765
#, c-format
msgid "This tool could not remove the packages: '%s'"
msgstr "Tämä työkalu ei voinut poistaa paketteja: â%sâ"
#. TRANSLATORS: When removing, we might have to remove other dependencies
-#: ../client/pk-console.c:776
+#: ../client/pk-console.c:777
msgid "The following packages have to be removed:"
msgstr "Seuraavat paketit on poistettava:"
#. TRANSLATORS: We are checking if it's okay to remove a list of packages
-#: ../client/pk-console.c:783
+#: ../client/pk-console.c:784
msgid "Proceed removing additional packages?"
msgstr "Poistetaanko lisäpaketteja?"
#. TRANSLATORS: We did not remove any packages
-#: ../client/pk-console.c:788
+#: ../client/pk-console.c:789
msgid "The package removal was canceled!"
msgstr "Pakettien poisto peruutettiin!"
#. TRANSLATORS: The package name was not found in any software sources
-#: ../client/pk-console.c:829
+#: ../client/pk-console.c:830
#, c-format
msgid "This tool could not download the package '%s' as it could not be found"
msgstr "Ladattavaksi pyydettyä pakettia â%sâ ei löytynyt"
#. TRANSLATORS: Could not download the packages for some reason. The detailed error follows
-#: ../client/pk-console.c:860
+#: ../client/pk-console.c:861
#, c-format
msgid "This tool could not download the packages: %s"
msgstr "Tämä työkalu ei voinut ladata paketteja: %s"
#. TRANSLATORS: There was an error getting the list of files for the package. The detailed error follows
-#: ../client/pk-console.c:887 ../client/pk-console.c:896
+#: ../client/pk-console.c:888 ../client/pk-console.c:897
#, c-format
msgid "This tool could not update '%s': %s"
msgstr "Tämä työkalu ei voinut päivittää pakettia â%sâ: %s"
# TODO: tarkista
#. TRANSLATORS: There was an error getting the list of files for the package. The detailed error follows
-#: ../client/pk-console.c:918 ../client/pk-console.c:926
+#: ../client/pk-console.c:919 ../client/pk-console.c:927
#, c-format
msgid "This tool could not get the requirements for '%s': %s"
msgstr "Tämä työkalu ei voinut hakea vaatijoita paketille â%sâ: %s"
# TODO: tarkista
#. TRANSLATORS: There was an error getting the dependencies for the package. The detailed error follows
-#: ../client/pk-console.c:948 ../client/pk-console.c:956
+#: ../client/pk-console.c:949 ../client/pk-console.c:957
#, c-format
msgid "This tool could not get the dependencies for '%s': %s"
msgstr "Tämä työkalu ei voinut hakea riippuvuuksia paketille â%sâ: %s"
#. TRANSLATORS: There was an error getting the details about the package. The detailed error follows
-#: ../client/pk-console.c:978 ../client/pk-console.c:986
+#: ../client/pk-console.c:979 ../client/pk-console.c:987
#, c-format
msgid "This tool could not get package details for '%s': %s"
msgstr "Tämä työkalu ei voinut hakea tietoja paketista â%sâ: %s"
#. TRANSLATORS: The package name was not found in any software sources. The detailed error follows
-#: ../client/pk-console.c:1008
+#: ../client/pk-console.c:1009
#, c-format
msgid "This tool could not find the files for '%s': %s"
msgstr "Tämä työkalu ei löytänyt paketin â%sâ tiedostoja: %s"
#. TRANSLATORS: There was an error getting the list of files for the package. The detailed error follows
-#: ../client/pk-console.c:1016
+#: ../client/pk-console.c:1017
#, c-format
msgid "This tool could not get the file list for '%s': %s"
msgstr "Tämä työkalu ei voinut hakea paketin â%sâ tiedostoluetteloa: %s"
#. TRANSLATORS: The package name was not found in any software sources. The detailed error follows
-#: ../client/pk-console.c:1038
+#: ../client/pk-console.c:1039
#, c-format
msgid "This tool could not find the update details for '%s': %s"
msgstr "Tämä työkalu ei löytänyt paketin â%sâ päivitystietoja: %s"
#. TRANSLATORS: There was an error getting the details about the update for the package. The detailed error follows
-#: ../client/pk-console.c:1046
+#: ../client/pk-console.c:1047
#, c-format
msgid "This tool could not get the update details for '%s': %s"
msgstr "Tämä työkalu ei voinut hakea paketin â%sâ päivitystietoja: %s"
#. TRANSLATORS: This was an unhandled error, and we don't have _any_ context
-#: ../client/pk-console.c:1092
+#: ../client/pk-console.c:1093
msgid "Error:"
msgstr "Virhe:"
#. TRANSLATORS: This a list of details about the package
-#: ../client/pk-console.c:1106
+#: ../client/pk-console.c:1107
msgid "Package description"
msgstr "Paketin kuvaus"
#. TRANSLATORS: This a list files contained in the package
-#: ../client/pk-console.c:1139
+#: ../client/pk-console.c:1140
msgid "Package files"
msgstr "Paketin tiedostot"
#. TRANSLATORS: This where the package has no files
-#: ../client/pk-console.c:1148
+#: ../client/pk-console.c:1149
msgid "No files"
msgstr "Ei tiedostoja"
#. TRANSLATORS: This a request for a GPG key signature from the backend, which the client will prompt for later
-#: ../client/pk-console.c:1171
+#: ../client/pk-console.c:1172
msgid "Repository signature required"
msgstr "Asennuslähteen allekirjoitus vaaditaan"
#. TRANSLATORS: This a prompt asking the user to import the security key
-#: ../client/pk-console.c:1181
-#, fuzzy
+#: ../client/pk-console.c:1182
msgid "Do you accept this signature?"
msgstr "Hyväksytkö tämän allekirjoituksen?"
#. TRANSLATORS: This is where the user declined the security key
-#: ../client/pk-console.c:1185
+#: ../client/pk-console.c:1186
msgid "The signature was not accepted."
msgstr "Allekirjoitusta ei hyväksytty."
#. TRANSLATORS: This a request for a EULA
-#: ../client/pk-console.c:1219
+#: ../client/pk-console.c:1220
msgid "End user license agreement required"
msgstr "Käyttöoikeussopimus vaaditaan"
#. TRANSLATORS: This a prompt asking the user to agree to the license
-#: ../client/pk-console.c:1226
+#: ../client/pk-console.c:1227
msgid "Do you agree to this license?"
msgstr "Hyväksytkö tämän käyttöoikeussopimuksen?"
#. TRANSLATORS: This is where the user declined the license
-#: ../client/pk-console.c:1230
+#: ../client/pk-console.c:1231
msgid "The license was refused."
msgstr "Käyttöoikeussopimusta ei hyväksytty"
#. TRANSLATORS: This is when the daemon crashed, and we are up shit creek without a paddle
-#: ../client/pk-console.c:1259
+#: ../client/pk-console.c:1260
msgid "The daemon crashed mid-transaction!"
msgstr "Taustaprosessi kaatui kesken toimenpiteen"
#. TRANSLATORS: This is the header to the --help menu
-#: ../client/pk-console.c:1312
+#: ../client/pk-console.c:1313
msgid "PackageKit Console Interface"
msgstr "PackageKitin konsolikäyttöliittymä"
-#: ../client/pk-console.c:1312
+#: ../client/pk-console.c:1313
msgid "Subcommands:"
msgstr "Alikomennot:"
-#: ../client/pk-console.c:1403 ../client/pk-generate-pack.c:138
+#: ../client/pk-console.c:1404 ../client/pk-generate-pack.c:182
#: ../client/pk-monitor.c:115 ../src/pk-main.c:196
msgid "Show extra debugging information"
msgstr "Näytä ylimääräisiä virheenjäljitystietoja"
-#: ../client/pk-console.c:1405 ../client/pk-monitor.c:117
+#: ../client/pk-console.c:1406 ../client/pk-monitor.c:117
msgid "Show the program version and exit"
msgstr "Näytä ohjelman versio ja lopeta"
-#: ../client/pk-console.c:1407
+#: ../client/pk-console.c:1408
msgid "Set the filter, e.g. installed"
msgstr "Aseta suodin, esim. asennettu"
-#: ../client/pk-console.c:1409
+#: ../client/pk-console.c:1410
msgid "Exit without waiting for actions to complete"
msgstr "Lopeta odottamatta toimintojen valmistumista"
#. TRANSLATORS: This is when we could not connect to the system bus, and is fatal
-#: ../client/pk-console.c:1431
+#: ../client/pk-console.c:1432
msgid "This tool could not connect to system DBUS."
msgstr "Tänä työkalu ei voinut yhdistää järjestelmän DBUSiin."
-#: ../client/pk-console.c:1526
+#: ../client/pk-console.c:1527
msgid "You need to specify a search type, e.g. name"
msgstr "Haun tyyppi on annettava, esim. nimi"
-#: ../client/pk-console.c:1531 ../client/pk-console.c:1538
-#: ../client/pk-console.c:1545 ../client/pk-console.c:1552
-#: ../client/pk-console.c:1663 ../client/pk-console.c:1673
-#: ../client/pk-console.c:1680 ../client/pk-console.c:1687
+#: ../client/pk-console.c:1532 ../client/pk-console.c:1539
+#: ../client/pk-console.c:1546 ../client/pk-console.c:1553
+#: ../client/pk-console.c:1664 ../client/pk-console.c:1674
+#: ../client/pk-console.c:1681 ../client/pk-console.c:1688
msgid "You need to specify a search term"
msgstr "Hakutermi on annettava"
-#: ../client/pk-console.c:1557
+#: ../client/pk-console.c:1558
msgid "Invalid search type"
msgstr "Virheellinen haun tyyppi"
-#: ../client/pk-console.c:1562
+#: ../client/pk-console.c:1563
msgid "You need to specify a package or file to install"
msgstr "Asennettava paketti tai tiedosto on annettava"
-#: ../client/pk-console.c:1569
+#: ../client/pk-console.c:1570
msgid "You need to specify a type, key_id and package_id"
msgstr "Tyyppi, key_id ja package_id on annettava"
-#: ../client/pk-console.c:1576
+#: ../client/pk-console.c:1577
msgid "You need to specify a package to remove"
msgstr "Poistettava paketti on annettava"
-#: ../client/pk-console.c:1582
+#: ../client/pk-console.c:1583
msgid ""
"You need to specify the destination directory and then the packages to "
"download"
msgstr "Kohdehakemisto ja ladattavat paketit on annettava"
-#: ../client/pk-console.c:1587
+#: ../client/pk-console.c:1588
msgid "Directory not found"
msgstr "Hakemistoa ei löytynyt"
-#: ../client/pk-console.c:1593
+#: ../client/pk-console.c:1594
msgid "You need to specify a licence identifier (eula-id)"
msgstr "Lisenssin tunniste (eula-id) on annettava"
-#: ../client/pk-console.c:1609
+#: ../client/pk-console.c:1610
msgid "You need to specify a package name to resolve"
msgstr "Ratkaistavan paketin nimi on annettava"
-#: ../client/pk-console.c:1618 ../client/pk-console.c:1625
+#: ../client/pk-console.c:1619 ../client/pk-console.c:1626
msgid "You need to specify a repository name"
msgstr "Asennuslähteen nimi on annettava"
-#: ../client/pk-console.c:1632
+#: ../client/pk-console.c:1633
msgid "You need to specify a repo name/parameter and value"
msgstr "Asennuslähteen nimi/parametri ja arvo on annettava"
-#: ../client/pk-console.c:1645
+#: ../client/pk-console.c:1646
msgid "You need to specify an action, e.g. 'update-system'"
msgstr "Toiminto on annettava, esim. âupdate-systemâ"
-#: ../client/pk-console.c:1650
+#: ../client/pk-console.c:1651
msgid "You need to specify a correct role"
msgstr "Sopiva rooli on annettava"
-#: ../client/pk-console.c:1655
+#: ../client/pk-console.c:1656
msgid "Failed to get last time"
msgstr "Edellistä aikaa ei saatu"
-#: ../client/pk-console.c:1694
+#: ../client/pk-console.c:1695
msgid "You need to specify a package to find the details for"
msgstr "On annettava paketti, jonka tietoja etsitään"
-#: ../client/pk-console.c:1701
+#: ../client/pk-console.c:1702
msgid "You need to specify a package to find the files for"
msgstr "On annettava paketti, jonka tiedostoja etsitään"
#. TRANSLATORS: The user tried to use an unsupported option on the command line
-#: ../client/pk-console.c:1754
+#: ../client/pk-console.c:1755
#, c-format
msgid "Option '%s' is not supported"
msgstr "Valitsinta â%sâ ei tueta"
#. TRANSLATORS: User does not have permission to do this
-#: ../client/pk-console.c:1767
+#: ../client/pk-console.c:1768
msgid "You don't have the necessary privileges for this operation"
msgstr "Sinulla ei ole tähän toimintoon tarvittavia oikeuksia"
#. TRANSLATORS: Generic failure of what they asked to do
-#: ../client/pk-console.c:1770
+#: ../client/pk-console.c:1771
msgid "Command failed"
msgstr "Komento epäonnistui"
#. TRANSLATORS: This is the state of the transaction
-#: ../client/pk-generate-pack.c:96
+#: ../client/pk-generate-pack.c:98
msgid "Downloading"
msgstr "Ladataan"
-#: ../client/pk-generate-pack.c:140
+#. TRANSLATORS: This is when the main packages are being downloaded
+#: ../client/pk-generate-pack.c:118
+msgid "Downloading packages"
+msgstr "Ladataan paketteja"
+
+#. TRANSLATORS: This is when the dependency packages are being downloaded
+#: ../client/pk-generate-pack.c:123
+msgid "Downloading dependencies"
+msgstr "Ladataan riippuvuuksia"
+
+#: ../client/pk-generate-pack.c:184
msgid "Set the file name of dependencies to be excluded"
msgstr ""
"Aseta pois jätettävien riippuvuuksien luettelon sisältävän tiedoston nimi"
-#: ../client/pk-generate-pack.c:142
+#: ../client/pk-generate-pack.c:186
msgid "The output directory (the current directory is used if ommitted)"
msgstr ""
"Hakemisto johon huoltopakkaus tallennetaan. Jos jätetään tyhjäksi, valitaan "
"automaattisesti nykyinen hakemisto."
-#: ../client/pk-generate-pack.c:144
+#: ../client/pk-generate-pack.c:188
msgid "The package to be put into the service pack"
msgstr "Paketti joka laitetaan huoltopakkaukseen"
-#: ../client/pk-generate-pack.c:146
+#: ../client/pk-generate-pack.c:190
msgid "Put all updates available in the service pack"
msgstr "Laita kaikki saatavilla olevat päivitykset huoltopakkaukseen"
#. TRANSLATORS: This is when the user fails to supply the correct arguments
-#: ../client/pk-generate-pack.c:166
+#: ../client/pk-generate-pack.c:213
msgid "Neither --package or --updates option selected."
msgstr "Kumpaakaan valitsimista --package tai --updates ei ole käytetty."
#. TRANSLATORS: This is when the user fails to supply just one argument
-#: ../client/pk-generate-pack.c:174
+#: ../client/pk-generate-pack.c:221
msgid "Both options selected."
msgstr "Molempia valitsimia on käytetty."
#. TRANSLATORS: This is when file already exists
-#: ../client/pk-generate-pack.c:207
+#: ../client/pk-generate-pack.c:254
msgid "A pack with the same name already exists, do you want to overwrite it?"
msgstr "Samalla nimellä on jo olemassa pakkaus, haluatko korvata sen?"
#. TRANSLATORS: This is when the pack was not overwritten
-#: ../client/pk-generate-pack.c:210
+#: ../client/pk-generate-pack.c:257
msgid "The pack was not overwritten."
msgstr "Pakkausta ei korvattu."
#. TRANSLATORS: This is when the temporary directory cannot be created, the directory name follows
-#: ../client/pk-generate-pack.c:222
+#: ../client/pk-generate-pack.c:269
msgid "Failed to create directory:"
msgstr "Hakemiston luominen epäonnistui:"
#. TRANSLATORS: This is when the list of packages from the remote computer cannot be opened
-#: ../client/pk-generate-pack.c:231
+#: ../client/pk-generate-pack.c:278
msgid "Failed to open package list."
msgstr "Pakettiluettelon luominen epäonnistui."
#. TRANSLATORS: The package name is being matched up to available packages
-#: ../client/pk-generate-pack.c:241
+#: ../client/pk-generate-pack.c:288
msgid "Finding package name."
msgstr "Etsitään paketin nimeä."
#. TRANSLATORS: This is when the package cannot be found in any software source. The detailed error follows
-#: ../client/pk-generate-pack.c:245
+#: ../client/pk-generate-pack.c:292
#, c-format
msgid "Failed to find package '%s': %s"
msgstr "Pakettia â%sâ ei löytynyt: %s"
#. TRANSLATORS: This is telling the user we are in the process of making the pack
-#: ../client/pk-generate-pack.c:260
+#: ../client/pk-generate-pack.c:308
msgid "Creating service pack..."
msgstr "Luodaan huoltopakkausta..."
#. TRANSLATORS: we succeeded in making the file
-#: ../client/pk-generate-pack.c:267
+#: ../client/pk-generate-pack.c:315
#, c-format
msgid "Service pack created '%s'"
msgstr "Huoltopakkaus â%sâ on luotu"
#. TRANSLATORS: we failed to make te file
-#: ../client/pk-generate-pack.c:271
+#: ../client/pk-generate-pack.c:319
#, c-format
msgid "Failed to create '%s': %s"
msgstr "Huoltopakkauksen â%sâ luominen epäonnistui: %s"
@@ -424,7 +433,6 @@ msgstr "PackageKit-tarkkailija"
#. TRANSLATORS: The package was not found in any software sources
#: ../client/pk-tools-common.c:108
-#, c-format
msgid "The package could not be found"
msgstr "Pakettia ei löytynyt"
@@ -508,90 +516,6 @@ msgstr "PackageKit-huoltopakkaus"
msgid "PackageKit Package List"
msgstr "PackageKit-pakettiluettelo"
-#: ../policy/org.freedesktop.packagekit.policy.in.h:1
-msgid "Accept EULA"
-msgstr ""
-
-#: ../policy/org.freedesktop.packagekit.policy.in.h:2
-msgid "Authentication is required to accept a EULA"
-msgstr ""
-
-#: ../policy/org.freedesktop.packagekit.policy.in.h:3
-msgid "Authentication is required to change software source parameters"
-msgstr ""
-
-#: ../policy/org.freedesktop.packagekit.policy.in.h:4
-msgid ""
-"Authentication is required to consider a key used for signing packages as "
-"trusted"
-msgstr ""
-
-#: ../policy/org.freedesktop.packagekit.policy.in.h:5
-msgid "Authentication is required to install a signed package"
-msgstr ""
-
-#: ../policy/org.freedesktop.packagekit.policy.in.h:6
-msgid "Authentication is required to install an untrusted package"
-msgstr ""
-
-#: ../policy/org.freedesktop.packagekit.policy.in.h:7
-msgid "Authentication is required to refresh the system sources"
-msgstr ""
-
-#: ../policy/org.freedesktop.packagekit.policy.in.h:8
-msgid "Authentication is required to remove packages"
-msgstr ""
-
-#: ../policy/org.freedesktop.packagekit.policy.in.h:9
-msgid "Authentication is required to rollback a transaction"
-msgstr ""
-
-#: ../policy/org.freedesktop.packagekit.policy.in.h:10
-msgid ""
-"Authentication is required to set the network proxy used for downloading "
-"packages"
-msgstr ""
-
-#: ../policy/org.freedesktop.packagekit.policy.in.h:11
-msgid "Authentication is required to update packages"
-msgstr ""
-
-#: ../policy/org.freedesktop.packagekit.policy.in.h:12
-msgid "Change software source parameters"
-msgstr ""
-
-#: ../policy/org.freedesktop.packagekit.policy.in.h:13
-msgid "Install local file"
-msgstr ""
-
-#: ../policy/org.freedesktop.packagekit.policy.in.h:14
-msgid "Install untrusted local file"
-msgstr ""
-
-#: ../policy/org.freedesktop.packagekit.policy.in.h:15
-msgid "Refresh system sources"
-msgstr ""
-
-#: ../policy/org.freedesktop.packagekit.policy.in.h:16
-msgid "Remove package"
-msgstr ""
-
-#: ../policy/org.freedesktop.packagekit.policy.in.h:17
-msgid "Rollback to a previous transaction"
-msgstr ""
-
-#: ../policy/org.freedesktop.packagekit.policy.in.h:18
-msgid "Set network proxy"
-msgstr ""
-
-#: ../policy/org.freedesktop.packagekit.policy.in.h:19
-msgid "Trust a key used for signing packages"
-msgstr ""
-
-#: ../policy/org.freedesktop.packagekit.policy.in.h:20
-msgid "Update packages"
-msgstr ""
-
#: ../src/pk-main.c:85
msgid "Startup failed due to security policies on this machine."
msgstr "Käynnistys epäonnistui tämän koneen turvakäytäntöjen vuoksi"
commit 0e09f77de93a2b9fc345b12d0d82ce0deedea145
Author: Richard Hughes <richard at hughsie.com>
Date: Fri Oct 31 17:37:57 2008 +0000
bugfix: move the groups sqlite cache into a PackageKit directory, rather than a yum owned directory. Fixes rh#469324
diff --git a/backends/yum/yumComps.py b/backends/yum/yumComps.py
index a99254a..82bbf6a 100755
--- a/backends/yum/yumComps.py
+++ b/backends/yum/yumComps.py
@@ -194,7 +194,7 @@ class yumComps:
self.cursor = None
self.connection = None
if not db:
- db = '/var/cache/yum/packagekit-groups.sqlite'
+ db = '/var/cache/PackageKit/groups.sqlite'
self.db = db
def connect(self):
diff --git a/contrib/PackageKit.spec.in b/contrib/PackageKit.spec.in
index 157cbf6..c0e9cb5 100644
--- a/contrib/PackageKit.spec.in
+++ b/contrib/PackageKit.spec.in
@@ -207,6 +207,7 @@ rm -f $RPM_BUILD_ROOT%{_libdir}/packagekit-backend/*.a
rm -f $RPM_BUILD_ROOT%{_libdir}/mozilla/plugins/packagekit-plugin.a
rm -f $RPM_BUILD_ROOT%{_libdir}/mozilla/plugins/packagekit-plugin.la
chmod 755 $RPM_BUILD_ROOT%{_libexecdir}/PackageKitDbusTest.py
+touch $RPM_BUILD_ROOT%{_localstatedir}/cache/PackageKit/groups.sqlite
# create a link that GStreamer will recognise
pushd ${RPM_BUILD_ROOT}%{_libexecdir} > /dev/null
@@ -249,6 +250,7 @@ update-mime-database %{_datadir}/mime &> /dev/null || :
%dir %{_localstatedir}/run/PackageKit
%dir %{_localstatedir}/run/PackageKit/udev
%dir %{_localstatedir}/cache/PackageKit
+%ghost %verify(not md5 size mtime) %{_localstatedir}/cache/PackageKit/groups.sqlite
%dir %{_localstatedir}/cache/PackageKit/downloads
%{python_sitelib}/packagekit/*py*
%dir %{_sysconfdir}/bash_completion.d
commit 53fd3c51b91dca97558dd72551a64e448a06af84
Merge: 32f39d6... e945af5...
Author: Richard Hughes <richard at hughsie.com>
Date: Fri Oct 31 09:26:00 2008 +0000
Merge branch 'master' of git+ssh://hughsie@git.packagekit.org/srv/git/PackageKit
commit 32f39d67971f1bd6dbf4b559a8f95e8712edccf8
Author: Richard Hughes <richard at hughsie.com>
Date: Thu Oct 30 16:22:47 2008 +0000
bugfix: yum: fix getting distibution upgrade information when we have multiple repos providing preupgrade. Fixes rh#469172
diff --git a/backends/yum/yumBackend.py b/backends/yum/yumBackend.py
index 9a75200..85cf4da 100755
--- a/backends/yum/yumBackend.py
+++ b/backends/yum/yumBackend.py
@@ -1657,15 +1657,17 @@ class PackageKitYumBackend(PackageKitBaseBackend, PackagekitPackage):
pkgs = self.yumbase.rpmdb.searchNevra(name='preupgrade')
if len(pkgs) == 0:
#install preupgrade
- pkgs = self.yumbase.pkgSack.searchNevra(name='preupgrade')
+ pkgs = self.yumbase.pkgSack.returnNewestByName(name='preupgrade')
if len(pkgs) == 0:
self.error(ERROR_PACKAGE_NOT_FOUND, "Could not find upgrade preupgrade package in any enabled repos")
- elif len(pkgs) == 1:
- txmbr = self.yumbase.install(po=pkgs[0])
- if txmbr:
- self._runYumTransaction()
+ # we can have more than one result if the package is in multiple repos, for example
+ # a machine with i386 _and_ x86_64 configured.
+ # in this case, just pick the first entry as they are both noarch
+ txmbr = self.yumbase.install(po=pkgs[0])
+ if txmbr:
+ self._runYumTransaction()
else:
- self.error(ERROR_INTERNAL_ERROR, "not one update possibility")
+ self.error(ERROR_INTERNAL_ERROR, "could not install preupgrade as no transaction")
elif len(pkgs) == 1:
# check if there are any updates to the preupgrade package
po = pkgs[0]
commit e945af558ba8efa683a0106d0a80f47d4c5d2b06
Author: çé²(Gan Lu) <rhythm.gan at gmail.com>
Date: Thu Oct 30 15:43:43 2008 +0000
Update zh_CN.po.
Transmitted-via: Transifex (translate.fedoraproject.org)
diff --git a/po/zh_CN.po b/po/zh_CN.po
index d3aeb66..2aa9bf5 100644
--- a/po/zh_CN.po
+++ b/po/zh_CN.po
@@ -8,8 +8,8 @@ msgid ""
msgstr ""
"Project-Id-Version: \n"
"Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2008-10-22 11:10+0100\n"
-"PO-Revision-Date: 2008-10-21 17:37+0700\n"
+"POT-Creation-Date: 2008-10-27 02:03+0000\n"
+"PO-Revision-Date: 2008-10-30 23:41+0700\n"
"Last-Translator: çé²(Gan Lu) <rhythm.gan at gmail.com>\n"
"Language-Team: \n"
"MIME-Version: 1.0\n"
@@ -34,382 +34,405 @@ msgid "Please restart the application as it is being used."
msgstr "请éæ°å¯å¨æ£å¨ä½¿ç¨ä¸çç¨åºã"
#. TRANSLATORS: The package is already installed on the system
-#: ../client/pk-console.c:579
+#: ../client/pk-console.c:580
#, c-format
msgid "The package '%s' is already installed"
msgstr "该软件å
'%s' å·²ç»å®è£
"
#. TRANSLATORS: The package name was not found in any software sources. The detailed error follows
-#: ../client/pk-console.c:587
+#: ../client/pk-console.c:588
#, c-format
msgid "The package '%s' could not be installed: %s"
msgstr "该软件å
'%s' æ æ³å®è£
ï¼%s"
#. TRANSLATORS: There was a programming error that shouldn't happen. The detailed error follows
-#: ../client/pk-console.c:612 ../client/pk-console.c:639
-#: ../client/pk-console.c:735 ../client/pk-console.c:852
-#: ../client/pk-tools-common.c:55 ../client/pk-tools-common.c:74
+#: ../client/pk-console.c:613
+#: ../client/pk-console.c:640
+#: ../client/pk-console.c:736
+#: ../client/pk-console.c:853
+#: ../client/pk-tools-common.c:55
+#: ../client/pk-tools-common.c:74
#: ../client/pk-tools-common.c:81
#, c-format
msgid "Internal error: %s"
msgstr "å
é¨é误ï¼%s"
#. TRANSLATORS: There was an error installing the packages. The detailed error follows
-#: ../client/pk-console.c:620
+#: ../client/pk-console.c:621
#, c-format
msgid "This tool could not install the packages: %s"
msgstr "该工å
·æ æ³å®è£
æ¬è½¯ä»¶å
ï¼%s"
#. TRANSLATORS: There was an error installing the files. The detailed error follows
-#: ../client/pk-console.c:647
+#: ../client/pk-console.c:648
#, c-format
msgid "This tool could not install the files: %s"
msgstr "æ¬å·¥å
·æ æ³å®è£
æ件ï¼%s"
#. TRANSLATORS: The package name was not found in the installed list. The detailed error follows
-#: ../client/pk-console.c:703
+#: ../client/pk-console.c:704
#, c-format
msgid "This tool could not remove '%s': %s"
msgstr "该工å
·æ æ³å é¤ï¼ '%s': %s"
#. TRANSLATORS: There was an error removing the packages. The detailed error follows
-#: ../client/pk-console.c:726 ../client/pk-console.c:797
+#: ../client/pk-console.c:727
+#: ../client/pk-console.c:798
#, c-format
msgid "This tool could not remove the packages: %s"
msgstr "该工å
·æ æ³å é¤æ¬è½¯ä»¶å
ï¼%s"
#. TRANSLATORS: There was an error removing the packages. The detailed error follows
-#: ../client/pk-console.c:764
+#: ../client/pk-console.c:765
#, c-format
msgid "This tool could not remove the packages: '%s'"
msgstr "该工å
·æ æ³å é¤æ¬è½¯ä»¶å
ï¼ '%s'"
#. TRANSLATORS: When removing, we might have to remove other dependencies
-#: ../client/pk-console.c:776
+#: ../client/pk-console.c:777
msgid "The following packages have to be removed:"
msgstr "ä¸å软件å
å¿
须被å é¤ï¼"
#. TRANSLATORS: We are checking if it's okay to remove a list of packages
-#: ../client/pk-console.c:783
+#: ../client/pk-console.c:784
msgid "Proceed removing additional packages?"
msgstr "å¼å§è¿è¡å é¤é¢å¤ç软件å
åï¼"
#. TRANSLATORS: We did not remove any packages
-#: ../client/pk-console.c:788
+#: ../client/pk-console.c:789
msgid "The package removal was canceled!"
msgstr "å·²åæ¶å é¤æ¬è½¯ä»¶å
ï¼"
#. TRANSLATORS: The package name was not found in any software sources
-#: ../client/pk-console.c:829
+#: ../client/pk-console.c:830
#, c-format
msgid "This tool could not download the package '%s' as it could not be found"
msgstr "æ¬å·¥å
·æ æ³ä¸è½½è½¯ä»¶å
'%s' (æ æ³æ¾å°)"
#. TRANSLATORS: Could not download the packages for some reason. The detailed error follows
-#: ../client/pk-console.c:860
+#: ../client/pk-console.c:861
#, c-format
msgid "This tool could not download the packages: %s"
msgstr "æ¬å·¥å
·æ æ³ä¸è½½è¯¥è½¯ä»¶å
ï¼%s"
#. TRANSLATORS: There was an error getting the list of files for the package. The detailed error follows
-#: ../client/pk-console.c:887 ../client/pk-console.c:896
+#: ../client/pk-console.c:888
+#: ../client/pk-console.c:897
#, c-format
msgid "This tool could not update '%s': %s"
msgstr "该工å
·æ æ³æ´æ° '%s': %s"
#. TRANSLATORS: There was an error getting the list of files for the package. The detailed error follows
-#: ../client/pk-console.c:918 ../client/pk-console.c:926
+#: ../client/pk-console.c:919
+#: ../client/pk-console.c:927
#, c-format
msgid "This tool could not get the requirements for '%s': %s"
msgstr "æ¬å·¥å
·æ æ³å¾å° '%s': %s çéæ±"
#. TRANSLATORS: There was an error getting the dependencies for the package. The detailed error follows
-#: ../client/pk-console.c:948 ../client/pk-console.c:956
+#: ../client/pk-console.c:949
+#: ../client/pk-console.c:957
#, c-format
msgid "This tool could not get the dependencies for '%s': %s"
msgstr "æ¬å·¥å
·æ æ³å¾å° '%s' çä¾èµå
³ç³»: %s"
#. TRANSLATORS: There was an error getting the details about the package. The detailed error follows
-#: ../client/pk-console.c:978 ../client/pk-console.c:986
+#: ../client/pk-console.c:979
+#: ../client/pk-console.c:987
#, c-format
msgid "This tool could not get package details for '%s': %s"
msgstr "该工å
·æ æ³å¾å° '%s' ç软件å
详æ
ï¼%s"
#. TRANSLATORS: The package name was not found in any software sources. The detailed error follows
-#: ../client/pk-console.c:1008
+#: ../client/pk-console.c:1009
#, c-format
msgid "This tool could not find the files for '%s': %s"
msgstr "该工å
·æ æ³æ¾å° '%s' çæ件ï¼%s"
#. TRANSLATORS: There was an error getting the list of files for the package. The detailed error follows
-#: ../client/pk-console.c:1016
+#: ../client/pk-console.c:1017
#, c-format
msgid "This tool could not get the file list for '%s': %s"
msgstr "该工å
·æ æ³å¾å° '%s' çæ件æ¸
åï¼%s"
#. TRANSLATORS: The package name was not found in any software sources. The detailed error follows
-#: ../client/pk-console.c:1038
+#: ../client/pk-console.c:1039
#, c-format
msgid "This tool could not find the update details for '%s': %s"
msgstr "该工å
·æ æ³æ¾å° '%s' çæ´æ°è¯¦æ
ï¼%s"
#. TRANSLATORS: There was an error getting the details about the update for the package. The detailed error follows
-#: ../client/pk-console.c:1046
+#: ../client/pk-console.c:1047
#, c-format
msgid "This tool could not get the update details for '%s': %s"
msgstr "该工å
·æ æ³ä¸º '%s': %s å¾å°æ´æ°è¯¦æ
"
#. TRANSLATORS: This was an unhandled error, and we don't have _any_ context
-#: ../client/pk-console.c:1092
+#: ../client/pk-console.c:1093
msgid "Error:"
msgstr "é误ï¼"
#. TRANSLATORS: This a list of details about the package
-#: ../client/pk-console.c:1106
+#: ../client/pk-console.c:1107
msgid "Package description"
msgstr "软件å
æè¿°"
#. TRANSLATORS: This a list files contained in the package
-#: ../client/pk-console.c:1139
+#: ../client/pk-console.c:1140
msgid "Package files"
msgstr "软件å
æ件"
#. TRANSLATORS: This where the package has no files
-#: ../client/pk-console.c:1148
+#: ../client/pk-console.c:1149
msgid "No files"
msgstr "没ææ件"
#. TRANSLATORS: This a request for a GPG key signature from the backend, which the client will prompt for later
-#: ../client/pk-console.c:1171
+#: ../client/pk-console.c:1172
msgid "Repository signature required"
msgstr "è¦æ±è½¯ä»¶åºç¾å"
#. TRANSLATORS: This a prompt asking the user to import the security key
-#: ../client/pk-console.c:1181
-#, fuzzy
+#: ../client/pk-console.c:1182
msgid "Do you accept this signature?"
msgstr "ä½ æ¥å该ç¾ååï¼"
#. TRANSLATORS: This is where the user declined the security key
-#: ../client/pk-console.c:1185
+#: ../client/pk-console.c:1186
msgid "The signature was not accepted."
msgstr "没ææ¥åç¾åã"
#. TRANSLATORS: This a request for a EULA
-#: ../client/pk-console.c:1219
+#: ../client/pk-console.c:1220
msgid "End user license agreement required"
msgstr "éè¦æç»ç¨æ·è®¸å¯åè®®"
#. TRANSLATORS: This a prompt asking the user to agree to the license
-#: ../client/pk-console.c:1226
+#: ../client/pk-console.c:1227
msgid "Do you agree to this license?"
msgstr "ä½ åææ¬è®¸å¯åï¼"
#. TRANSLATORS: This is where the user declined the license
-#: ../client/pk-console.c:1230
+#: ../client/pk-console.c:1231
msgid "The license was refused."
msgstr "æç»è¯¥è®¸å¯ã"
#. TRANSLATORS: This is when the daemon crashed, and we are up shit creek without a paddle
-#: ../client/pk-console.c:1259
+#: ../client/pk-console.c:1260
msgid "The daemon crashed mid-transaction!"
msgstr "åå°ç¨åºå¨äºå¡å¤çä¸æå´©æºï¼"
#. TRANSLATORS: This is the header to the --help menu
-#: ../client/pk-console.c:1312
+#: ../client/pk-console.c:1313
msgid "PackageKit Console Interface"
msgstr "PackageKit ç»ç«¯çé¢"
-#: ../client/pk-console.c:1312
+#: ../client/pk-console.c:1313
msgid "Subcommands:"
msgstr "åå½ä»¤ï¼"
-#: ../client/pk-console.c:1403 ../client/pk-generate-pack.c:138
-#: ../client/pk-monitor.c:115 ../src/pk-main.c:196
+#: ../client/pk-console.c:1404
+#: ../client/pk-generate-pack.c:182
+#: ../client/pk-monitor.c:115
+#: ../src/pk-main.c:196
msgid "Show extra debugging information"
msgstr "æ¾ç¤ºé¢å¤çè°è¯ä¿¡æ¯"
-#: ../client/pk-console.c:1405 ../client/pk-monitor.c:117
+#: ../client/pk-console.c:1406
+#: ../client/pk-monitor.c:117
msgid "Show the program version and exit"
msgstr "æ¾ç¤ºæ¬ç¨åºçæ¬å¹¶éåº"
-#: ../client/pk-console.c:1407
+#: ../client/pk-console.c:1408
msgid "Set the filter, e.g. installed"
msgstr "设置è¿æ»¤å¨ï¼ä¾å¦å·²å®è£
ç"
-#: ../client/pk-console.c:1409
+#: ../client/pk-console.c:1410
msgid "Exit without waiting for actions to complete"
msgstr "ä¸çæä½å®æå³éåº"
#. TRANSLATORS: This is when we could not connect to the system bus, and is fatal
-#: ../client/pk-console.c:1431
+#: ../client/pk-console.c:1432
msgid "This tool could not connect to system DBUS."
msgstr "该工å
·æ æ³è¿æ¥å°ç³»ç» DBUSã"
-#: ../client/pk-console.c:1526
+#: ../client/pk-console.c:1527
msgid "You need to specify a search type, e.g. name"
msgstr "ä½ éè¦æå®æ个æ索类åï¼ä¾å¦åå"
-#: ../client/pk-console.c:1531 ../client/pk-console.c:1538
-#: ../client/pk-console.c:1545 ../client/pk-console.c:1552
-#: ../client/pk-console.c:1663 ../client/pk-console.c:1673
-#: ../client/pk-console.c:1680 ../client/pk-console.c:1687
+#: ../client/pk-console.c:1532
+#: ../client/pk-console.c:1539
+#: ../client/pk-console.c:1546
+#: ../client/pk-console.c:1553
+#: ../client/pk-console.c:1664
+#: ../client/pk-console.c:1674
+#: ../client/pk-console.c:1681
+#: ../client/pk-console.c:1688
msgid "You need to specify a search term"
msgstr "ä½ éè¦æå®æ个æç´¢æ¯è¯"
-#: ../client/pk-console.c:1557
+#: ../client/pk-console.c:1558
msgid "Invalid search type"
msgstr "æ æçæ索类å"
-#: ../client/pk-console.c:1562
+#: ../client/pk-console.c:1563
msgid "You need to specify a package or file to install"
msgstr "ä½ éè¦æå®æ个软件å
ææ件æ¥å®è£
"
-#: ../client/pk-console.c:1569
+#: ../client/pk-console.c:1570
msgid "You need to specify a type, key_id and package_id"
msgstr "ä½ éè¦æå®æ个类åï¼è¯ä¹¦IDæè
软件å
ID"
-#: ../client/pk-console.c:1576
+#: ../client/pk-console.c:1577
msgid "You need to specify a package to remove"
msgstr "ä½ éè¦æå®æ个软件å
æ¥å é¤"
-#: ../client/pk-console.c:1582
-msgid ""
-"You need to specify the destination directory and then the packages to "
-"download"
+#: ../client/pk-console.c:1583
+msgid "You need to specify the destination directory and then the packages to download"
msgstr "ä½ éè¦æå®ç®çå°ç®å½ä»¥å软件å
æ¥ä¸è½½"
-#: ../client/pk-console.c:1587
+#: ../client/pk-console.c:1588
msgid "Directory not found"
msgstr "ç®å½æ²¡ææ¾å°"
-#: ../client/pk-console.c:1593
+#: ../client/pk-console.c:1594
msgid "You need to specify a licence identifier (eula-id)"
msgstr "ä½ éè¦æå®æ个许å¯é´å« (eula-id)"
-#: ../client/pk-console.c:1609
+#: ../client/pk-console.c:1610
msgid "You need to specify a package name to resolve"
msgstr "ä½ éè¦æå®æ个软件å
ååæ¥è§£å³ä¾èµå
³ç³»"
-#: ../client/pk-console.c:1618 ../client/pk-console.c:1625
+#: ../client/pk-console.c:1619
+#: ../client/pk-console.c:1626
msgid "You need to specify a repository name"
msgstr "ä½ éè¦æå®æ个软件åºåå"
-#: ../client/pk-console.c:1632
+#: ../client/pk-console.c:1633
msgid "You need to specify a repo name/parameter and value"
msgstr "ä½ éè¦æå®æ个软件åºåå/åæ°æå¼"
-#: ../client/pk-console.c:1645
+#: ../client/pk-console.c:1646
msgid "You need to specify an action, e.g. 'update-system'"
msgstr "ä½ éè¦æå®æ个è¡å¨ï¼ä¾å¦âæ´æ°ç³»ç»â"
-#: ../client/pk-console.c:1650
+#: ../client/pk-console.c:1651
msgid "You need to specify a correct role"
msgstr "ä½ éè¦æå®æ个æ£ç¡®çè§è²"
-#: ../client/pk-console.c:1655
+#: ../client/pk-console.c:1656
msgid "Failed to get last time"
msgstr "æ æ³å¾å°æåä¸æ¬¡æ¶é´"
-#: ../client/pk-console.c:1694
+#: ../client/pk-console.c:1695
msgid "You need to specify a package to find the details for"
msgstr "ä½ éè¦æå®æ个软件å
å·²æ¾å°ç¸å
³è¯¦æ
"
-#: ../client/pk-console.c:1701
+#: ../client/pk-console.c:1702
msgid "You need to specify a package to find the files for"
msgstr "ä½ éè¦æå®æ个软件å
å·²æ¾å°ç¸å
³æ件"
#. TRANSLATORS: The user tried to use an unsupported option on the command line
-#: ../client/pk-console.c:1754
+#: ../client/pk-console.c:1755
#, c-format
msgid "Option '%s' is not supported"
msgstr "ä¸æ¯æ '%s' é项"
#. TRANSLATORS: User does not have permission to do this
-#: ../client/pk-console.c:1767
+#: ../client/pk-console.c:1768
msgid "You don't have the necessary privileges for this operation"
msgstr "ä½ æ²¡ææ¬æ¬¡æä½éè¦çå¿
è¦æé"
#. TRANSLATORS: Generic failure of what they asked to do
-#: ../client/pk-console.c:1770
+#: ../client/pk-console.c:1771
msgid "Command failed"
msgstr "å½ä»¤å¤±è´¥"
#. TRANSLATORS: This is the state of the transaction
-#: ../client/pk-generate-pack.c:96
+#: ../client/pk-generate-pack.c:98
msgid "Downloading"
msgstr "æ£å¨ä¸è½½"
-#: ../client/pk-generate-pack.c:140
+#. TRANSLATORS: This is when the main packages are being downloaded
+#: ../client/pk-generate-pack.c:118
+msgid "Downloading packages"
+msgstr "æ£å¨ä¸è½½è½¯ä»¶å
"
+
+#. TRANSLATORS: This is when the dependency packages are being downloaded
+#: ../client/pk-generate-pack.c:123
+msgid "Downloading dependencies"
+msgstr "æ£å¨ä¸è½½ä¾èµå
³ç³»"
+
+#: ../client/pk-generate-pack.c:184
msgid "Set the file name of dependencies to be excluded"
msgstr "设置å°è¢«é¤å¤çä¾èµå
³ç³»çæ件å"
-#: ../client/pk-generate-pack.c:142
+#: ../client/pk-generate-pack.c:186
msgid "The output directory (the current directory is used if ommitted)"
msgstr "è¾åºç®å½(使ç¨å½åç®å½å¦å¿è®°æå®)"
-#: ../client/pk-generate-pack.c:144
+#: ../client/pk-generate-pack.c:188
msgid "The package to be put into the service pack"
msgstr "å°æ¾å
¥æå¡å
ç软件å
"
-#: ../client/pk-generate-pack.c:146
+#: ../client/pk-generate-pack.c:190
msgid "Put all updates available in the service pack"
msgstr "å°ææå¯è·å¾çæ´æ°æ¾å
¥æå¡å
"
#. TRANSLATORS: This is when the user fails to supply the correct arguments
-#: ../client/pk-generate-pack.c:166
+#: ../client/pk-generate-pack.c:213
msgid "Neither --package or --updates option selected."
msgstr "è¦ä¹æ¯éå®äº --package é项ï¼è¦ä¹æ¯éå®äº --updates é项"
#. TRANSLATORS: This is when the user fails to supply just one argument
-#: ../client/pk-generate-pack.c:174
+#: ../client/pk-generate-pack.c:221
msgid "Both options selected."
msgstr "éå®äºä¸¤ä¸ªé项"
#. TRANSLATORS: This is when file already exists
-#: ../client/pk-generate-pack.c:207
+#: ../client/pk-generate-pack.c:254
msgid "A pack with the same name already exists, do you want to overwrite it?"
msgstr "å·²ç»æåå软件å
åå¨ï¼ä½ æ³è¦è¦çå®åï¼"
#. TRANSLATORS: This is when the pack was not overwritten
-#: ../client/pk-generate-pack.c:210
+#: ../client/pk-generate-pack.c:257
msgid "The pack was not overwritten."
msgstr "该软件å
没æ被è¦ç"
#. TRANSLATORS: This is when the temporary directory cannot be created, the directory name follows
-#: ../client/pk-generate-pack.c:222
+#: ../client/pk-generate-pack.c:269
msgid "Failed to create directory:"
msgstr "æ æ³å建ç®å½"
#. TRANSLATORS: This is when the list of packages from the remote computer cannot be opened
-#: ../client/pk-generate-pack.c:231
+#: ../client/pk-generate-pack.c:278
msgid "Failed to open package list."
msgstr "æ æ³æå¼è½¯ä»¶å
æ¸
å"
#. TRANSLATORS: The package name is being matched up to available packages
-#: ../client/pk-generate-pack.c:241
+#: ../client/pk-generate-pack.c:288
msgid "Finding package name."
msgstr "æ£å¨å¯»æ¾è½¯ä»¶å
å"
#. TRANSLATORS: This is when the package cannot be found in any software source. The detailed error follows
-#: ../client/pk-generate-pack.c:245
+#: ../client/pk-generate-pack.c:292
#, c-format
msgid "Failed to find package '%s': %s"
msgstr "æ æ³æ¾å°è½¯ä»¶å
'%s': %s"
#. TRANSLATORS: This is telling the user we are in the process of making the pack
-#: ../client/pk-generate-pack.c:260
+#: ../client/pk-generate-pack.c:308
msgid "Creating service pack..."
msgstr "æ£å¨å建æå¡å
..."
#. TRANSLATORS: we succeeded in making the file
-#: ../client/pk-generate-pack.c:267
+#: ../client/pk-generate-pack.c:315
#, c-format
msgid "Service pack created '%s'"
msgstr "æå¡å
å·²å建 '%s'"
#. TRANSLATORS: we failed to make te file
-#: ../client/pk-generate-pack.c:271
+#: ../client/pk-generate-pack.c:319
#, c-format
msgid "Failed to create '%s': %s"
msgstr "æ æ³å建 '%s': %s"
@@ -420,7 +443,6 @@ msgstr "PackageKit çè§å¨"
#. TRANSLATORS: The package was not found in any software sources
#: ../client/pk-tools-common.c:108
-#, c-format
msgid "The package could not be found"
msgstr "æ æ³æ¾å°è¯¥è½¯ä»¶å
"
@@ -504,90 +526,6 @@ msgstr "PackageKit æå¡å
"
msgid "PackageKit Package List"
msgstr "PackageKit 软件å
æ¸
å"
-#: ../policy/org.freedesktop.packagekit.policy.in.h:1
-msgid "Accept EULA"
-msgstr ""
-
-#: ../policy/org.freedesktop.packagekit.policy.in.h:2
-msgid "Authentication is required to accept a EULA"
-msgstr ""
-
-#: ../policy/org.freedesktop.packagekit.policy.in.h:3
-msgid "Authentication is required to change software source parameters"
-msgstr ""
-
-#: ../policy/org.freedesktop.packagekit.policy.in.h:4
-msgid ""
-"Authentication is required to consider a key used for signing packages as "
-"trusted"
-msgstr ""
-
-#: ../policy/org.freedesktop.packagekit.policy.in.h:5
-msgid "Authentication is required to install a signed package"
-msgstr ""
-
-#: ../policy/org.freedesktop.packagekit.policy.in.h:6
-msgid "Authentication is required to install an untrusted package"
-msgstr ""
-
-#: ../policy/org.freedesktop.packagekit.policy.in.h:7
-msgid "Authentication is required to refresh the system sources"
-msgstr ""
-
-#: ../policy/org.freedesktop.packagekit.policy.in.h:8
-msgid "Authentication is required to remove packages"
-msgstr ""
-
-#: ../policy/org.freedesktop.packagekit.policy.in.h:9
-msgid "Authentication is required to rollback a transaction"
-msgstr ""
-
-#: ../policy/org.freedesktop.packagekit.policy.in.h:10
-msgid ""
-"Authentication is required to set the network proxy used for downloading "
-"packages"
-msgstr ""
-
-#: ../policy/org.freedesktop.packagekit.policy.in.h:11
-msgid "Authentication is required to update packages"
-msgstr ""
-
-#: ../policy/org.freedesktop.packagekit.policy.in.h:12
-msgid "Change software source parameters"
-msgstr ""
-
-#: ../policy/org.freedesktop.packagekit.policy.in.h:13
-msgid "Install local file"
-msgstr ""
-
-#: ../policy/org.freedesktop.packagekit.policy.in.h:14
-msgid "Install untrusted local file"
-msgstr ""
-
-#: ../policy/org.freedesktop.packagekit.policy.in.h:15
-msgid "Refresh system sources"
-msgstr ""
-
-#: ../policy/org.freedesktop.packagekit.policy.in.h:16
-msgid "Remove package"
-msgstr ""
-
-#: ../policy/org.freedesktop.packagekit.policy.in.h:17
-msgid "Rollback to a previous transaction"
-msgstr ""
-
-#: ../policy/org.freedesktop.packagekit.policy.in.h:18
-msgid "Set network proxy"
-msgstr ""
-
-#: ../policy/org.freedesktop.packagekit.policy.in.h:19
-msgid "Trust a key used for signing packages"
-msgstr ""
-
-#: ../policy/org.freedesktop.packagekit.policy.in.h:20
-msgid "Update packages"
-msgstr ""
-
#: ../src/pk-main.c:85
msgid "Startup failed due to security policies on this machine."
msgstr "ç±äºæ¬æºçå®å
¨çç¥å¯¼è´å¯å¨å¤±è´¥"
@@ -601,9 +539,7 @@ msgid "The correct user is not launching the executable (usually root)"
msgstr "ç¨æ·æ£ç¡®ä½æ æ³å¯å¨å¯æ§è¡ç¨åº(é常ä½ä¸ºæ ¹ç¨æ·)"
#: ../src/pk-main.c:88
-msgid ""
-"The org.freedesktop.PackageKit.conf file is not installed in the system "
-"directory:"
+msgid "The org.freedesktop.PackageKit.conf file is not installed in the system directory:"
msgstr "org.freedesktop.PackageKit.conf 没æå®è£
å°ç³»ç»ç®å½ä¸ï¼"
#: ../src/pk-main.c:192
@@ -645,15 +581,12 @@ msgstr "åºç°é误å½å°è¯å¯å¨ %s\n"
#~ msgid "Okay to import key?"
#~ msgstr "å¯ä»¥å¯¼å
¥è¯ä¹¦åï¼"
-
#~ msgid "Did not import key"
#~ msgstr "ä¸å¯¼å
¥è¯ä¹¦"
-
#~ msgid "Eula required"
#~ msgstr "è¦æ±æç»ç¨æ·åè®®"
-
#~ msgid "Do you agree?"
#~ msgstr "ä½ åæåï¼"
-
#~ msgid "You need to specify a time term"
#~ msgstr "ä½ éè¦æå®æ个æ¶é´æé"
+
commit 032fb8e35a83dd03cdc904752a649511864b0c6d
Author: Richard Hughes <richard at hughsie.com>
Date: Thu Oct 30 15:18:49 2008 +0000
trivial: dummy: add a blocked package to test the UI's of KPK and GPK
diff --git a/backends/dummy/pk-backend-dummy.c b/backends/dummy/pk-backend-dummy.c
index 58a4533..f080fcc 100644
--- a/backends/dummy/pk-backend-dummy.c
+++ b/backends/dummy/pk-backend-dummy.c
@@ -289,6 +289,11 @@ backend_get_updates_timeout (gpointer data)
{
PkBackend *backend = (PkBackend *) data;
+ if (!_updated_powertop && !_updated_kernel && !_updated_gtkhtml) {
+ pk_backend_package (backend, PK_INFO_ENUM_BLOCKED,
+ "vino;2.24.2.fc9;i386;fedora",
+ "Remote desktop server for the desktop");
+ }
if (!_updated_powertop) {
pk_backend_package (backend, PK_INFO_ENUM_NORMAL,
"powertop;1.8-1.fc8;i386;fedora",
commit 50f7449150da3061f702f336d1d38f37f2fc1c06
Author: Richard Hughes <richard at hughsie.com>
Date: Thu Oct 30 15:14:07 2008 +0000
trivial: fedora spec file update
diff --git a/contrib/PackageKit.spec.in b/contrib/PackageKit.spec.in
index 44e43f3..157cbf6 100644
--- a/contrib/PackageKit.spec.in
+++ b/contrib/PackageKit.spec.in
@@ -353,6 +353,7 @@ update-mime-database %{_datadir}/mime &> /dev/null || :
%dir %{_includedir}/PackageKit/packagekit-qt
%{_includedir}/PackageKit/packagekit-qt/QPackageKit
%{_includedir}/PackageKit/packagekit-qt/*.h
+%{_datadir}/cmake/Modules/FindQPackageKit.cmake
%files backend-devel
%defattr(-,root,root,-)
commit 34b5b046c0d77d013a537ce18e9203f4c59a6f80
Author: Valeriy Lyasotskiy <onestep at ukr.net>
Date: Thu Oct 30 11:10:06 2008 +0200
alpm: change get_depends to handle filters properly
diff --git a/backends/alpm/pk-backend-alpm.c b/backends/alpm/pk-backend-alpm.c
index 9abdc9a..d1cf183 100644
--- a/backends/alpm/pk-backend-alpm.c
+++ b/backends/alpm/pk-backend-alpm.c
@@ -682,6 +682,26 @@ backend_cancel (PkBackend *backend)
pk_backend_set_status (backend, PK_STATUS_ENUM_CANCEL);
}
+int
+backend_pkg_cmp (pmpkg_t *pkg1, pmpkg_t *pkg2) {
+ int comparison;
+ /* check for no package */
+ if (pkg1 == NULL)
+ return -1;
+ if (pkg2 == NULL)
+ return 1;
+ /* compare package names */
+ comparison = strcmp (alpm_pkg_get_name (pkg1), alpm_pkg_get_name (pkg2));
+ if (comparison != 0)
+ return comparison;
+ /* compare package versions */
+ comparison = alpm_pkg_vercmp (alpm_pkg_get_version (pkg1), alpm_pkg_get_version (pkg2));
+ if (comparison != 0)
+ return comparison;
+ /* packages are equal */
+ return 0;
+}
+
/**
* backend_get_depends:
*/
@@ -715,11 +735,9 @@ backend_get_depends (PkBackend *backend, PkBitfield filters, gchar **package_ids
egg_debug ("alpm: searching for %s in %s", alpm_dep_get_name (dep), alpm_db_get_name (syncdb));
dep_pkg = alpm_db_get_pkg (syncdb, alpm_dep_get_name (dep));
- if (dep_pkg && alpm_depcmp (dep_pkg, dep)) {
+ if (dep_pkg && alpm_depcmp (dep_pkg, dep) && backend_pkg_cmp (dep_pkg, alpm_db_get_pkg (alpm_option_get_localdb (), alpm_dep_get_name (dep))) != 0) {
found = TRUE;
- gchar *dep_package_id_str = pkg_to_package_id_str (dep_pkg, alpm_db_get_name (syncdb));
- pk_backend_package (backend, PK_INFO_ENUM_AVAILABLE, dep_package_id_str, alpm_pkg_get_desc (dep_pkg));
- g_free (dep_package_id_str);
+ emit_package (backend, dep_pkg, alpm_db_get_name (syncdb), PK_INFO_ENUM_AVAILABLE);
}
}
}
@@ -731,9 +749,7 @@ backend_get_depends (PkBackend *backend, PkBitfield filters, gchar **package_ids
dep_pkg = alpm_db_get_pkg (alpm_option_get_localdb (), alpm_dep_get_name (dep));
if (dep_pkg && alpm_depcmp (dep_pkg, dep)) {
found = TRUE;
- gchar *dep_package_id_str = pkg_to_package_id_str (dep_pkg, ALPM_LOCAL_DB_ALIAS);
- pk_backend_package (backend, PK_INFO_ENUM_INSTALLED, dep_package_id_str, alpm_pkg_get_desc (dep_pkg));
- g_free (dep_package_id_str);
+ emit_package (backend, dep_pkg, ALPM_LOCAL_DB_ALIAS, PK_INFO_ENUM_INSTALLED);
}
}
@@ -832,26 +848,6 @@ backend_get_files (PkBackend *backend, gchar **package_ids)
pk_backend_finished (backend);
}
-int
-backend_pkg_cmp (pmpkg_t *pkg1, pmpkg_t *pkg2) {
- int comparison;
- /* check for no package */
- if (pkg1 == NULL)
- return -1;
- if (pkg2 == NULL)
- return 1;
- /* compare package names */
- comparison = strcmp (alpm_pkg_get_name (pkg1), alpm_pkg_get_name (pkg2));
- if (comparison != 0)
- return comparison;
- /* compare package versions */
- comparison = alpm_pkg_vercmp (alpm_pkg_get_version (pkg1), alpm_pkg_get_version (pkg2));
- if (comparison != 0)
- return comparison;
- /* packages are equal */
- return 0;
-}
-
void
backend_search (PkBackend *backend, pmdb_t *repo, const gchar *needle, PkAlpmSearchType search_type) {
/* package cache */
commit ceb052874a9dfda88f9316572956c7b33f6a6ab4
Author: Richard Hughes <richard at hughsie.com>
Date: Tue Oct 28 17:43:41 2008 +0000
plugin: trivial: convert 4-spaces to tab -- I can't stand it any longer...
diff --git a/contrib/packagekit-plugin/src/contents.cpp b/contrib/packagekit-plugin/src/contents.cpp
index 812bf37..8ddc6e3 100644
--- a/contrib/packagekit-plugin/src/contents.cpp
+++ b/contrib/packagekit-plugin/src/contents.cpp
@@ -61,182 +61,179 @@
//
static std::vector<std::string>
-splitString(const char *str)
+splitString(const gchar *str)
{
- std::vector<std::string> v;
+ std::vector<std::string> v;
- if (str) {
- char **split = g_strsplit(str, " ", -1);
- for (char **s = split; *s; s++) {
- char *stripped = strdup(*s);
- g_strstrip(stripped);
- v.push_back(stripped);
- g_free(stripped);
- }
+ if (str) {
+ char **split = g_strsplit(str, " ", -1);
+ for (char **s = split; *s; s++) {
+ char *stripped = strdup(*s);
+ g_strstrip(stripped);
+ v.push_back(stripped);
+ g_free(stripped);
+ }
- g_strfreev(split);
- }
+ g_strfreev(split);
+ }
- return v;
+ return v;
}
-PkpContents::PkpContents(const char *displayName,
- const char *packageNames,
- const char *desktopNames) :
- mPlugin(0),
- mStatus(IN_PROGRESS),
- mAppInfo(0),
- mDisplayName(displayName),
- mPackageNames(splitString(packageNames)),
- mDesktopNames(splitString(desktopNames)),
- mLayout(0),
- mInstallPackageProxy(0),
- mInstallPackageCall(0)
+PkpContents::PkpContents(const gchar *displayName, const gchar *packageNames, const gchar *desktopNames) :
+ mPlugin(0),
+ mStatus(IN_PROGRESS),
+ mAppInfo(0),
+ mDisplayName(displayName),
+ mPackageNames(splitString(packageNames)),
+ mDesktopNames(splitString(desktopNames)),
+ mLayout(0),
+ mInstallPackageProxy(0),
+ mInstallPackageCall(0)
{
- recheck();
+ recheck();
}
PkpContents::~PkpContents()
{
- clearLayout();
+ clearLayout();
- if (mAppInfo != 0) {
- g_object_unref(mAppInfo);
- mAppInfo = 0;
- }
+ if (mAppInfo != 0) {
+ g_object_unref(mAppInfo);
+ mAppInfo = 0;
+ }
- if (mInstallPackageCall != 0) {
- dbus_g_proxy_cancel_call(mInstallPackageProxy, mInstallPackageCall);
- g_object_unref(mInstallPackageProxy);
- mInstallPackageProxy = 0;
- mInstallPackageCall = 0;
- }
+ if (mInstallPackageCall != 0) {
+ dbus_g_proxy_cancel_call(mInstallPackageProxy, mInstallPackageCall);
+ g_object_unref(mInstallPackageProxy);
+ mInstallPackageProxy = 0;
+ mInstallPackageCall = 0;
+ }
- while (!mClients.empty())
- removeClient(mClients.front());
+ while (!mClients.empty())
+ removeClient(mClients.front());
}
void PkpContents::recheck()
{
- mStatus = IN_PROGRESS;
- mAvailableVersion = "";
- mAvailablePackageName = "";
-
- for (std::vector<std::string>::iterator i = mPackageNames.begin(); i != mPackageNames.end(); i++) {
- GError *error = NULL;
- PkClient *client = pk_client_new();
- gchar **package_ids;
- package_ids = pk_package_ids_from_id (i->c_str());
- if (!pk_client_resolve(client, PK_FILTER_ENUM_NONE, package_ids, &error)) {
- g_warning("%s", error->message);
- g_clear_error(&error);
- g_object_unref(client);
- } else {
- g_signal_connect(client, "package", G_CALLBACK(onClientPackage), this);
- g_signal_connect(client, "error-code", G_CALLBACK(onClientErrorCode), this);
- g_signal_connect(client, "finished", G_CALLBACK(onClientFinished), this);
- mClients.push_back(client);
- }
- g_strfreev (package_ids);
- }
-
- findAppInfo();
-
- if (mClients.empty() && getStatus() == IN_PROGRESS)
- setStatus(UNAVAILABLE);
+ mStatus = IN_PROGRESS;
+ mAvailableVersion = "";
+ mAvailablePackageName = "";
+
+ for (std::vector<std::string>::iterator i = mPackageNames.begin(); i != mPackageNames.end(); i++) {
+ GError *error = NULL;
+ PkClient *client = pk_client_new();
+ gchar **package_ids;
+ package_ids = pk_package_ids_from_id (i->c_str());
+ if (!pk_client_resolve(client, PK_FILTER_ENUM_NONE, package_ids, &error)) {
+ g_warning("%s", error->message);
+ g_clear_error(&error);
+ g_object_unref(client);
+ } else {
+ g_signal_connect(client, "package", G_CALLBACK(onClientPackage), this);
+ g_signal_connect(client, "error-code", G_CALLBACK(onClientErrorCode), this);
+ g_signal_connect(client, "finished", G_CALLBACK(onClientFinished), this);
+ mClients.push_back(client);
+ }
+ g_strfreev (package_ids);
+ }
+
+ findAppInfo();
+
+ if (mClients.empty() && getStatus() == IN_PROGRESS)
+ setStatus(UNAVAILABLE);
}
void PkpContents::removeClient(PkClient *client)
{
- for (std::vector<PkClient *>::iterator i = mClients.begin(); i != mClients.end(); i++) {
- if (*i == client) {
- mClients.erase(i);
- g_signal_handlers_disconnect_by_func(client, (void *)onClientPackage, this);
- g_signal_handlers_disconnect_by_func(client, (void *)onClientErrorCode, this);
- g_signal_handlers_disconnect_by_func(client, (void *)onClientFinished, this);
- g_object_unref(client);
- break;
- }
- }
+ for (std::vector<PkClient *>::iterator i = mClients.begin(); i != mClients.end(); i++) {
+ if (*i == client) {
+ mClients.erase(i);
+ g_signal_handlers_disconnect_by_func(client, (void *)onClientPackage, this);
+ g_signal_handlers_disconnect_by_func(client, (void *)onClientErrorCode, this);
+ g_signal_handlers_disconnect_by_func(client, (void *)onClientFinished, this);
+ g_object_unref(client);
+ break;
+ }
+ }
- if (mClients.empty()) {
- if (getStatus() == IN_PROGRESS)
- setStatus(UNAVAILABLE);
- }
+ if (mClients.empty()) {
+ if (getStatus() == IN_PROGRESS)
+ setStatus(UNAVAILABLE);
+ }
}
void
PkpContents::setStatus(PackageStatus status)
{
- if (mStatus != status) {
- mStatus = status;
- clearLayout();
- refresh();
- }
+ if (mStatus != status) {
+ mStatus = status;
+ clearLayout();
+ refresh();
+ }
}
void
-PkpContents::setAvailableVersion(const char *version)
+PkpContents::setAvailableVersion(const gchar *version)
{
- mAvailableVersion = version;
- clearLayout();
- refresh();
+ mAvailableVersion = version;
+ clearLayout();
+ refresh();
}
void
-PkpContents::setAvailablePackageName(const char *name)
+PkpContents::setAvailablePackageName(const gchar *name)
{
- mAvailablePackageName = name;
+ mAvailablePackageName = name;
}
void
-PkpContents::setInstalledVersion(const char *version)
+PkpContents::setInstalledVersion(const gchar *version)
{
- mInstalledVersion = version;
- clearLayout();
- refresh();
+ mInstalledVersion = version;
+ clearLayout();
+ refresh();
}
void
PkpContents::clearLayout()
{
- if (mLayout) {
- g_object_unref(mLayout);
- mLayout = 0;
- }
+ if (mLayout) {
+ g_object_unref(mLayout);
+ mLayout = 0;
+ }
}
static void
-append_markup(GString *str, const char *format, ...)
+append_markup(GString *str, const gchar *format, ...)
{
- va_list vap;
+ va_list vap;
- va_start(vap, format);
- char *tmp = g_markup_vprintf_escaped(format, vap);
- va_end(vap);
+ va_start(vap, format);
+ char *tmp = g_markup_vprintf_escaped(format, vap);
+ va_end(vap);
- g_string_append(str, tmp);
- g_free(tmp);
+ g_string_append(str, tmp);
+ g_free(tmp);
}
static guint32
rgba_from_gdk_color(GdkColor *color)
{
- return (((color->red >> 8) << 24) |
- ((color->green >> 8) << 16) |
- ((color->blue >> 8) << 8) |
- 0xff);
+ return (((color->red >> 8) << 24) |
+ ((color->green >> 8) << 16) |
+ ((color->blue >> 8) << 8) |
+ 0xff);
}
static void
-set_source_from_rgba(cairo_t *cr,
- guint32 rgba)
+set_source_from_rgba(cairo_t *cr, guint32 rgba)
{
- cairo_set_source_rgba(cr,
- ((rgba & 0xff000000) >> 24) / 255.,
- ((rgba & 0x00ff0000) >> 16) / 255.,
- ((rgba & 0x0000ff00) >> 8) / 255.,
- (rgba & 0x000000ff) / 255.);
+ cairo_set_source_rgba(cr,
+ ((rgba & 0xff000000) >> 24) / 255.,
+ ((rgba & 0x00ff0000) >> 16) / 255.,
+ ((rgba & 0x0000ff00) >> 8) / 255.,
+ (rgba & 0x000000ff) / 255.);
}
@@ -248,149 +245,145 @@ set_source_from_rgba(cairo_t *cr,
* the window.
*/
static void
-get_style(PangoFontDescription **font_desc,
- guint32 *foreground,
- guint32 *background,
- guint32 *link)
+get_style(PangoFontDescription **font_desc, guint32 *foreground, guint32 *background, guint32 *link)
{
- GtkWidget *window = gtk_window_new(GTK_WINDOW_TOPLEVEL);
+ GtkWidget *window = gtk_window_new(GTK_WINDOW_TOPLEVEL);
- gtk_widget_ensure_style(window);
+ gtk_widget_ensure_style(window);
- *foreground = rgba_from_gdk_color(&window->style->text[GTK_STATE_NORMAL]);
- *background = rgba_from_gdk_color(&window->style->base[GTK_STATE_NORMAL]);
+ *foreground = rgba_from_gdk_color(&window->style->text[GTK_STATE_NORMAL]);
+ *background = rgba_from_gdk_color(&window->style->base[GTK_STATE_NORMAL]);
- GdkColor link_color = { 0, 0, 0, 0xeeee };
- GdkColor *tmp = NULL;
+ GdkColor link_color = { 0, 0, 0, 0xeeee };
+ GdkColor *tmp = NULL;
- gtk_widget_style_get (GTK_WIDGET (window),
- "link-color", &tmp, NULL);
- if (tmp != NULL) {
- link_color = *tmp;
- gdk_color_free(tmp);
- }
+ gtk_widget_style_get (GTK_WIDGET (window),
+ "link-color", &tmp, NULL);
+ if (tmp != NULL) {
+ link_color = *tmp;
+ gdk_color_free(tmp);
+ }
- *link = rgba_from_gdk_color(&link_color);
+ *link = rgba_from_gdk_color(&link_color);
- *font_desc = pango_font_description_copy(window->style->font_desc);
+ *font_desc = pango_font_description_copy(window->style->font_desc);
- gtk_widget_destroy(window);
+ gtk_widget_destroy(window);
}
void
-PkpContents::ensureLayout(cairo_t *cr,
- PangoFontDescription *font_desc,
- guint32 link_color)
-{
- GString *markup = g_string_new(NULL);
-
- if (mLayout)
- return;
-
- mLayout = pango_cairo_create_layout(cr);
- pango_layout_set_font_description(mLayout, font_desc);
-
- /* WARNING: Any changes to what links are created here will require corresponding
- * changes to the buttonRelease() method
- */
- switch (mStatus) {
- case IN_PROGRESS:
- /* TRANSLATORS: when we are getting data from the daemon */
- append_markup(markup, _("Getting package information..."));
- break;
- case INSTALLED:
- if (mAppInfo != 0) {
- append_markup(markup, "\n<span color='#%06x' underline='single'>", link_color >> 8);
- /* TRANSLATORS: run an applicaiton */
- append_markup(markup, _("Run %s"), mDisplayName.c_str());
- append_markup(markup, "</span>");
- } else
- append_markup(markup, "<big>%s</big>", mDisplayName.c_str());
- if (!mInstalledVersion.empty())
- /* TRANSLATORS: show the installed version of a package */
- append_markup(markup, "\n<small>%s: %s</small>", _("Installed version"), mInstalledVersion.c_str());
- break;
- case UPGRADABLE:
- append_markup(markup, "<big>%s</big>", mDisplayName.c_str());
- if (mAppInfo != 0) {
- if (!mInstalledVersion.empty()) {
- append_markup(markup, "\n<span color='#%06x' underline='single'>", link_color >> 8);
- /* TRANSLATORS: run the application now */
- append_markup(markup, _("Run version %s now"), mInstalledVersion.c_str());
- append_markup(markup, "</span>");
- } else
- /* TRANSLATORS: run the application now */
- append_markup(markup,
- "\n<span color='#%06x' underline='single'>%s</span>",
- _("Run now"), link_color >> 8);
- }
-
- append_markup(markup, "\n<span color='#%06x' underline='single'>", link_color >> 8);
- /* TRANSLATORS: update to a new version of the package */
- append_markup(markup, _("Update to version %s"), mAvailableVersion.c_str());
- append_markup(markup, "</span>");
- break;
- case AVAILABLE:
- append_markup(markup, "\n<span color='#%06x' underline='single'>", link_color >> 8);
- /* TRANSLATORS: To install a package */
- append_markup(markup, _("Install %s now"), mDisplayName.c_str());
- append_markup(markup, "</span>");
- /* TRANSLATORS: the version of the package */
- append_markup(markup, "\n<small>%s: %s</small>", _("Version"), mAvailableVersion.c_str());
- break;
- case UNAVAILABLE:
- append_markup(markup, "<big>%s</big>", mDisplayName.c_str());
- /* TRANSLATORS: noting found, so can't install */
- append_markup(markup, "\n<small>%s</small>", _("No packages found for your system"));
- break;
- case INSTALLING:
- append_markup(markup, "<big>%s</big>", mDisplayName.c_str());
- /* TRANSLATORS: package is being installed */
- append_markup(markup, "\n<small>%s</small>", _("Installing..."));
- break;
- }
-
- pango_layout_set_markup(mLayout, markup->str, -1);
- g_string_free(markup, TRUE);
+PkpContents::ensureLayout(cairo_t *cr, PangoFontDescription *font_desc, guint32 link_color)
+{
+ GString *markup = g_string_new(NULL);
+
+ if (mLayout)
+ return;
+
+ mLayout = pango_cairo_create_layout(cr);
+ pango_layout_set_font_description(mLayout, font_desc);
+
+ /* WARNING: Any changes to what links are created here will require corresponding
+ * changes to the buttonRelease() method
+ */
+ switch (mStatus) {
+ case IN_PROGRESS:
+ /* TRANSLATORS: when we are getting data from the daemon */
+ append_markup(markup, _("Getting package information..."));
+ break;
+ case INSTALLED:
+ if (mAppInfo != 0) {
+ append_markup(markup, "\n<span color='#%06x' underline='single'>", link_color >> 8);
+ /* TRANSLATORS: run an applicaiton */
+ append_markup(markup, _("Run %s"), mDisplayName.c_str());
+ append_markup(markup, "</span>");
+ } else
+ append_markup(markup, "<big>%s</big>", mDisplayName.c_str());
+ if (!mInstalledVersion.empty())
+ /* TRANSLATORS: show the installed version of a package */
+ append_markup(markup, "\n<small>%s: %s</small>", _("Installed version"), mInstalledVersion.c_str());
+ break;
+ case UPGRADABLE:
+ append_markup(markup, "<big>%s</big>", mDisplayName.c_str());
+ if (mAppInfo != 0) {
+ if (!mInstalledVersion.empty()) {
+ append_markup(markup, "\n<span color='#%06x' underline='single'>", link_color >> 8);
+ /* TRANSLATORS: run the application now */
+ append_markup(markup, _("Run version %s now"), mInstalledVersion.c_str());
+ append_markup(markup, "</span>");
+ } else {
+ /* TRANSLATORS: run the application now */
+ append_markup(markup,
+ "\n<span color='#%06x' underline='single'>%s</span>",
+ _("Run now"), link_color >> 8);
+ }
+ }
+
+ append_markup(markup, "\n<span color='#%06x' underline='single'>", link_color >> 8);
+ /* TRANSLATORS: update to a new version of the package */
+ append_markup(markup, _("Update to version %s"), mAvailableVersion.c_str());
+ append_markup(markup, "</span>");
+ break;
+ case AVAILABLE:
+ append_markup(markup, "\n<span color='#%06x' underline='single'>", link_color >> 8);
+ /* TRANSLATORS: To install a package */
+ append_markup(markup, _("Install %s now"), mDisplayName.c_str());
+ append_markup(markup, "</span>");
+ /* TRANSLATORS: the version of the package */
+ append_markup(markup, "\n<small>%s: %s</small>", _("Version"), mAvailableVersion.c_str());
+ break;
+ case UNAVAILABLE:
+ append_markup(markup, "<big>%s</big>", mDisplayName.c_str());
+ /* TRANSLATORS: noting found, so can't install */
+ append_markup(markup, "\n<small>%s</small>", _("No packages found for your system"));
+ break;
+ case INSTALLING:
+ append_markup(markup, "<big>%s</big>", mDisplayName.c_str());
+ /* TRANSLATORS: package is being installed */
+ append_markup(markup, "\n<small>%s</small>", _("Installing..."));
+ break;
+ }
+
+ pango_layout_set_markup(mLayout, markup->str, -1);
+ g_string_free(markup, TRUE);
}
void
PkpContents::refresh()
{
- if (mPlugin != 0)
- mPlugin->refresh();
+ if (mPlugin != 0)
+ mPlugin->refresh();
}
void
PkpContents::setPlugin(PkpPluginInstance *plugin)
{
- mPlugin = plugin;
+ mPlugin = plugin;
}
void
PkpContents::draw(cairo_t *cr)
{
- guint32 foreground, background, link;
- PangoFontDescription *font_desc;
+ guint32 foreground, background, link;
+ PangoFontDescription *font_desc;
- get_style(&font_desc, &foreground, &background, &link);
+ get_style(&font_desc, &foreground, &background, &link);
- set_source_from_rgba(cr, background);
- cairo_rectangle(cr, mPlugin->getX(), mPlugin->getY(), mPlugin->getWidth(), mPlugin->getHeight());
- cairo_fill(cr);
+ set_source_from_rgba(cr, background);
+ cairo_rectangle(cr, mPlugin->getX(), mPlugin->getY(), mPlugin->getWidth(), mPlugin->getHeight());
+ cairo_fill(cr);
- cairo_set_source_rgb(cr, 0.5, 0.5, 0.5);
- cairo_rectangle(cr, mPlugin->getX() + 0.5, mPlugin->getY() + 0.5, mPlugin->getWidth() - 1, mPlugin->getHeight() - 1);
- cairo_set_line_width(cr, 1);
- cairo_stroke(cr);
+ cairo_set_source_rgb(cr, 0.5, 0.5, 0.5);
+ cairo_rectangle(cr, mPlugin->getX() + 0.5, mPlugin->getY() + 0.5, mPlugin->getWidth() - 1, mPlugin->getHeight() - 1);
+ cairo_set_line_width(cr, 1);
+ cairo_stroke(cr);
- ensureLayout(cr, font_desc, link);
- int width, height;
- pango_layout_get_pixel_size(mLayout, &width, &height);
+ ensureLayout(cr, font_desc, link);
+ int width, height;
+ pango_layout_get_pixel_size(mLayout, &width, &height);
- cairo_move_to(cr, mPlugin->getX() + MARGIN, mPlugin->getY() + MARGIN);
- set_source_from_rgba(cr, foreground);
- pango_cairo_show_layout(cr, mLayout);
+ cairo_move_to(cr, mPlugin->getX() + MARGIN, mPlugin->getY() + MARGIN);
+ set_source_from_rgba(cr, foreground);
+ pango_cairo_show_layout(cr, mLayout);
}
/* Cut and paste from pango-layout.c; determines if a layout iter is on
@@ -404,24 +397,24 @@ PkpContents::draw(cairo_t *cr)
static gboolean
line_is_terminated (PangoLayoutIter *iter)
{
- /* There is a real terminator at the end of each paragraph other
- * than the last.
- */
- PangoLayoutLine *line = pango_layout_iter_get_line(iter);
- GSList *lines = pango_layout_get_lines(pango_layout_iter_get_layout(iter));
- GSList *link = g_slist_find(lines, line);
- if (!link) {
- g_warning("Can't find line in layout line list\n");
- return FALSE;
- }
+ /* There is a real terminator at the end of each paragraph other
+ * than the last.
+ */
+ PangoLayoutLine *line = pango_layout_iter_get_line(iter);
+ GSList *lines = pango_layout_get_lines(pango_layout_iter_get_layout(iter));
+ GSList *link = g_slist_find(lines, line);
+ if (!link) {
+ g_warning("Can't find line in layout line list\n");
+ return FALSE;
+ }
- if (link->next) {
- PangoLayoutLine *next_line = (PangoLayoutLine *)link->next->data;
- if (next_line->is_paragraph_start)
- return TRUE;
- }
+ if (link->next) {
+ PangoLayoutLine *next_line = (PangoLayoutLine *)link->next->data;
+ if (next_line->is_paragraph_start)
+ return TRUE;
+ }
- return FALSE;
+ return FALSE;
}
/* This function takes an X,Y position and determines whether it is over one
@@ -436,67 +429,65 @@ line_is_terminated (PangoLayoutIter *iter)
int
PkpContents::getLinkIndex(int x, int y)
{
- /* Coordinates are relative to origin of plugin (different from drawing) */
-
- if (!mLayout)
- return -1;
-
- x -= MARGIN;
- y -= MARGIN;
-
- int index;
- int trailing;
- if (!pango_layout_xy_to_index(mLayout,
- x * PANGO_SCALE, y * PANGO_SCALE,
- &index, &trailing))
- return - 1;
-
- PangoLayoutIter *iter = pango_layout_get_iter(mLayout);
- int seen_links = 0;
- bool in_link = false;
- int result = -1;
-
- while (TRUE) {
- PangoLayoutRun *run = pango_layout_iter_get_run(iter);
- if (run) {
- PangoItem *item = run->item;
- PangoUnderline uline = PANGO_UNDERLINE_NONE;
-
- for (GSList *l = item->analysis.extra_attrs; l; l = l->next) {
- PangoAttribute *attr = (PangoAttribute *)l->data;
- if (attr->klass->type == PANGO_ATTR_UNDERLINE) {
- uline = (PangoUnderline)((PangoAttrInt *)attr)->value;
- }
- }
-
- if (uline == PANGO_UNDERLINE_NONE)
- in_link = FALSE;
- else if (!in_link) {
- in_link = TRUE;
- seen_links++;
- }
-
- if (item->offset <= index && index < item->offset + item->length) {
- if (in_link)
- result = seen_links - 1;
-
- break;
- }
- } else {
- /* We have an empty run at the end of each line. A line break doesn't
- * terminate the link, but a real newline does.
- */
- if (line_is_terminated(iter))
- in_link = FALSE;
- }
-
- if (!pango_layout_iter_next_run (iter))
- break;
- }
-
- pango_layout_iter_free(iter);
-
- return result;
+ /* Coordinates are relative to origin of plugin (different from drawing) */
+
+ if (!mLayout)
+ return -1;
+
+ x -= MARGIN;
+ y -= MARGIN;
+
+ int index;
+ int trailing;
+ if (!pango_layout_xy_to_index(mLayout, x * PANGO_SCALE, y * PANGO_SCALE, &index, &trailing))
+ return - 1;
+
+ PangoLayoutIter *iter = pango_layout_get_iter(mLayout);
+ int seen_links = 0;
+ bool in_link = false;
+ int result = -1;
+
+ while (TRUE) {
+ PangoLayoutRun *run = pango_layout_iter_get_run(iter);
+ if (run) {
+ PangoItem *item = run->item;
+ PangoUnderline uline = PANGO_UNDERLINE_NONE;
+
+ for (GSList *l = item->analysis.extra_attrs; l; l = l->next) {
+ PangoAttribute *attr = (PangoAttribute *)l->data;
+ if (attr->klass->type == PANGO_ATTR_UNDERLINE) {
+ uline = (PangoUnderline)((PangoAttrInt *)attr)->value;
+ }
+ }
+
+ if (uline == PANGO_UNDERLINE_NONE)
+ in_link = FALSE;
+ else if (!in_link) {
+ in_link = TRUE;
+ seen_links++;
+ }
+
+ if (item->offset <= index && index < item->offset + item->length) {
+ if (in_link)
+ result = seen_links - 1;
+
+ break;
+ }
+ } else {
+ /* We have an empty run at the end of each line. A line break doesn't
+ * terminate the link, but a real newline does.
+ */
+ if (line_is_terminated(iter))
+ in_link = FALSE;
+ }
+
+ if (!pango_layout_iter_next_run (iter))
+ break;
+ }
+
+ pango_layout_iter_free(iter);
+
+ return result;
}
void
@@ -507,31 +498,30 @@ PkpContents::buttonPress(int x, int y, Time time)
void
PkpContents::buttonRelease(int x, int y, Time time)
{
- int index = getLinkIndex(x, y);
- if (index < 0)
- return;
-
- switch (mStatus) {
- case IN_PROGRESS:
- case INSTALLING:
- case UNAVAILABLE:
- break;
- case INSTALLED:
- if (mAppInfo != 0)
- runApplication(time);
- break;
- case UPGRADABLE:
- if (mAppInfo != 0 && index == 0)
- runApplication(time);
- else {
- installPackage(time);
- }
- break;
- case AVAILABLE:
- if (!mAvailablePackageName.empty())
- installPackage(time);
- break;
- }
+ int index = getLinkIndex(x, y);
+ if (index < 0)
+ return;
+
+ switch (mStatus) {
+ case IN_PROGRESS:
+ case INSTALLING:
+ case UNAVAILABLE:
+ break;
+ case INSTALLED:
+ if (mAppInfo != 0)
+ runApplication(time);
+ break;
+ case UPGRADABLE:
+ if (mAppInfo != 0 && index == 0)
+ runApplication(time);
+ else
+ installPackage(time);
+ break;
+ case AVAILABLE:
+ if (!mAvailablePackageName.empty())
+ installPackage(time);
+ break;
+ }
}
void
@@ -552,199 +542,186 @@ PkpContents::leave(int x, int y)
static guint32
get_server_timestamp()
{
- GtkWidget *invisible = gtk_invisible_new();
- gtk_widget_realize(invisible);
- return gdk_x11_get_server_time(invisible->window);
- gtk_widget_destroy(invisible);
+ GtkWidget *invisible = gtk_invisible_new();
+ gtk_widget_realize(invisible);
+ return gdk_x11_get_server_time(invisible->window);
+ gtk_widget_destroy(invisible);
}
static gboolean
-validate_name(const char *name)
+validate_name(const gchar *name)
{
- const char *p;
-
- for (p = name; *p; p++) {
- char c = *p;
+ const gchar *p;
- if (!((c >= 'A' && c <= 'Z') ||
- (c >= 'a' && c <= 'z') ||
- (c >= '0' && c <= '9') ||
- (c == '.') ||
- (c == '_') ||
- (c == '-')))
- return FALSE;
- }
+ for (p = name; *p; p++) {
+ char c = *p;
+ if (!((c >= 'A' && c <= 'Z') ||
+ (c >= 'a' && c <= 'z') ||
+ (c >= '0' && c <= '9') ||
+ (c == '.') ||
+ (c == '_') ||
+ (c == '-')))
+ return FALSE;
+ }
- return TRUE;
+ return TRUE;
}
void
PkpContents::findAppInfo()
{
- for (std::vector<std::string>::iterator i = mDesktopNames.begin(); i != mDesktopNames.end(); i++) {
- if (!validate_name(i->c_str())) {
- g_warning("Bad desktop name: '%s'", i->c_str());
- continue;
- }
+ for (std::vector<std::string>::iterator i = mDesktopNames.begin(); i != mDesktopNames.end(); i++) {
+ if (!validate_name(i->c_str())) {
+ g_warning("Bad desktop name: '%s'", i->c_str());
+ continue;
+ }
- /* The "id" taken be g_desktop_app_info_new() is weirdly 'foo.desktop' not 'foo' */
- char *id = g_strconcat(i->c_str(), ".desktop", NULL);
- GDesktopAppInfo *desktopAppInfo = g_desktop_app_info_new(id);
- g_free(id);
+ /* The "id" taken be g_desktop_app_info_new() is weirdly 'foo.desktop' not 'foo' */
+ char *id = g_strconcat(i->c_str(), ".desktop", NULL);
+ GDesktopAppInfo *desktopAppInfo = g_desktop_app_info_new(id);
+ g_free(id);
- if (desktopAppInfo) {
- mAppInfo = G_APP_INFO(desktopAppInfo);
- break;
- }
- }
+ if (desktopAppInfo) {
+ mAppInfo = G_APP_INFO(desktopAppInfo);
+ break;
+ }
+ }
- if (mAppInfo != 0)
- setStatus(INSTALLED);
+ if (mAppInfo != 0)
+ setStatus(INSTALLED);
}
void
PkpContents::runApplication (Time time)
{
- GError *error = NULL;
+ GError *error = NULL;
#ifdef HAVE_GDK_APP_LAUNCH_CONTEXT_NEW
- GdkAppLaunchContext *context;
+ GdkAppLaunchContext *context;
#endif
- if (mAppInfo == 0) {
- g_warning("Didn't find application to launch");
- return;
- }
+ if (mAppInfo == 0) {
+ g_warning("Didn't find application to launch");
+ return;
+ }
- if (time == 0)
- time = get_server_timestamp();
+ if (time == 0)
+ time = get_server_timestamp();
#ifdef HAVE_GDK_APP_LAUNCH_CONTEXT_NEW
- context = gdk_app_launch_context_new();
- gdk_app_launch_context_set_timestamp(context, time);
- if (!g_app_info_launch(mAppInfo, NULL, G_APP_LAUNCH_CONTEXT (context), &error)) {
+ context = gdk_app_launch_context_new();
+ gdk_app_launch_context_set_timestamp(context, time);
+ if (!g_app_info_launch(mAppInfo, NULL, G_APP_LAUNCH_CONTEXT (context), &error)) {
#else
- if (!g_app_info_launch(mAppInfo, NULL, NULL, &error)) {
+ if (!g_app_info_launch(mAppInfo, NULL, NULL, &error)) {
#endif
- g_warning("%s\n", error->message);
- g_clear_error(&error);
- return;
- }
+ g_warning("%s\n", error->message);
+ g_clear_error(&error);
+ return;
+ }
#ifdef HAVE_GDK_APP_LAUNCH_CONTEXT_NEW
- if (context != NULL)
- g_object_unref(context);
+ if (context != NULL)
+ g_object_unref(context);
#endif
}
void
PkpContents::installPackage (Time time)
{
- GdkEvent *event;
- GdkWindow *window;
- guint xid = 0;
-
- if (mAvailablePackageName.empty()) {
- g_warning("No available package to install");
- return;
- }
-
- if (mInstallPackageCall != 0) {
- g_warning("Already installing package");
- return;
- }
-
- /* Get a proxy to the *session* PackageKit service */
- DBusGConnection *connection = dbus_g_bus_get (DBUS_BUS_SESSION, NULL);
- mInstallPackageProxy = dbus_g_proxy_new_for_name(connection,
- "org.freedesktop.PackageKit",
- "/org/freedesktop/PackageKit",
- "org.freedesktop.PackageKit");
-
- /* will be NULL when activated not using a keyboard or a mouse */
- event = gtk_get_current_event ();
- if (event != NULL && event->any.window != NULL) {
- window = gdk_window_get_toplevel (event->any.window);
- xid = GDK_DRAWABLE_XID(window);
- }
-
- mInstallPackageCall = dbus_g_proxy_begin_call_with_timeout(mInstallPackageProxy,
- "InstallPackageName",
- onInstallPackageFinished,
- this,
- (GDestroyNotify)0,
- 24 * 60 * 1000 * 1000, /* one day */
- G_TYPE_UINT, xid, /* xid */
- G_TYPE_UINT, 0, /* timespec */
- G_TYPE_STRING, mAvailablePackageName.c_str(),
- G_TYPE_INVALID,
- G_TYPE_INVALID);
-
- setStatus(INSTALLING);
+ GdkEvent *event;
+ GdkWindow *window;
+ guint xid = 0;
+
+ if (mAvailablePackageName.empty()) {
+ g_warning("No available package to install");
+ return;
+ }
+
+ if (mInstallPackageCall != 0) {
+ g_warning("Already installing package");
+ return;
+ }
+
+ /* Get a proxy to the *session* PackageKit service */
+ DBusGConnection *connection = dbus_g_bus_get (DBUS_BUS_SESSION, NULL);
+ mInstallPackageProxy = dbus_g_proxy_new_for_name(connection,
+ "org.freedesktop.PackageKit",
+ "/org/freedesktop/PackageKit",
+ "org.freedesktop.PackageKit");
+
+ /* will be NULL when activated not using a keyboard or a mouse */
+ event = gtk_get_current_event ();
+ if (event != NULL && event->any.window != NULL) {
+ window = gdk_window_get_toplevel (event->any.window);
+ xid = GDK_DRAWABLE_XID(window);
+ }
+
+ mInstallPackageCall = dbus_g_proxy_begin_call_with_timeout(mInstallPackageProxy,
+ "InstallPackageName",
+ onInstallPackageFinished,
+ this,
+ (GDestroyNotify)0,
+ 24 * 60 * 1000 * 1000, /* one day */
+ G_TYPE_UINT, xid, /* xid */
+ G_TYPE_UINT, 0, /* timespec */
+ G_TYPE_STRING, mAvailablePackageName.c_str(),
+ G_TYPE_INVALID,
+ G_TYPE_INVALID);
+
+ setStatus(INSTALLING);
}
void
-PkpContents::onClientPackage(PkClient *client,
- const PkPackageObj *obj,
- PkpContents *contents)
-{
- /* if we didn't use displayname, use the summary */
- if (contents->mDisplayName.size() == 0)
- contents->mDisplayName = obj->summary;
-
- /* parse the data */
- if (obj->info == PK_INFO_ENUM_AVAILABLE) {
- if (contents->getStatus() == IN_PROGRESS)
- contents->setStatus(AVAILABLE);
- else if (contents->getStatus() == INSTALLED)
- contents->setStatus(UPGRADABLE);
- contents->setAvailableVersion(obj->id->version);
- contents->setAvailablePackageName(obj->id->name);
- } else if (obj->info == PK_INFO_ENUM_INSTALLED) {
- if (contents->getStatus() == IN_PROGRESS)
- contents->setStatus(INSTALLED);
- else if (contents->getStatus() == AVAILABLE)
- contents->setStatus(UPGRADABLE);
- contents->setInstalledVersion(obj->id->version);
- }
+PkpContents::onClientPackage(PkClient *client, const PkPackageObj *obj, PkpContents *contents)
+{
+ /* if we didn't use displayname, use the summary */
+ if (contents->mDisplayName.size() == 0)
+ contents->mDisplayName = obj->summary;
+
+ /* parse the data */
+ if (obj->info == PK_INFO_ENUM_AVAILABLE) {
+ if (contents->getStatus() == IN_PROGRESS)
+ contents->setStatus(AVAILABLE);
+ else if (contents->getStatus() == INSTALLED)
+ contents->setStatus(UPGRADABLE);
+ contents->setAvailableVersion(obj->id->version);
+ contents->setAvailablePackageName(obj->id->name);
+ } else if (obj->info == PK_INFO_ENUM_INSTALLED) {
+ if (contents->getStatus() == IN_PROGRESS)
+ contents->setStatus(INSTALLED);
+ else if (contents->getStatus() == AVAILABLE)
+ contents->setStatus(UPGRADABLE);
+ contents->setInstalledVersion(obj->id->version);
+ }
}
void
-PkpContents::onClientErrorCode(PkClient *client,
- PkErrorCodeEnum code,
- const gchar *details,
- PkpContents *contents)
+PkpContents::onClientErrorCode(PkClient *client, PkErrorCodeEnum code, const gchar *details, PkpContents *contents)
{
- g_warning("Error getting data from PackageKit: %s\n", details);
- contents->removeClient(client);
+ g_warning("Error getting data from PackageKit: %s\n", details);
+ contents->removeClient(client);
}
void
-PkpContents::onClientFinished(PkClient *client,
- PkExitEnum exit,
- guint runtime,
- PkpContents *contents)
-
+PkpContents::onClientFinished(PkClient *client, PkExitEnum exit, guint runtime, PkpContents *contents)
{
- contents->removeClient(client);
+ contents->removeClient(client);
}
void
-PkpContents::onInstallPackageFinished (DBusGProxy *proxy,
- DBusGProxyCall *call,
- void *user_data)
+PkpContents::onInstallPackageFinished (DBusGProxy *proxy, DBusGProxyCall *call, void *user_data)
{
- PkpContents *contents = (PkpContents *)user_data;
+ PkpContents *contents = (PkpContents *)user_data;
- GError *error = NULL;
- if (!dbus_g_proxy_end_call(proxy, call, &error,
- G_TYPE_INVALID)) {
- g_warning("Error occurred during install: %s", error->message);
- g_clear_error(&error);
- }
+ GError *error = NULL;
+ if (!dbus_g_proxy_end_call(proxy, call, &error, G_TYPE_INVALID)) {
+ g_warning("Error occurred during install: %s", error->message);
+ g_clear_error(&error);
+ }
- g_object_unref(contents->mInstallPackageProxy);
- contents->mInstallPackageProxy = 0;
- contents->mInstallPackageCall = 0;
+ g_object_unref(contents->mInstallPackageProxy);
+ contents->mInstallPackageProxy = 0;
+ contents->mInstallPackageCall = 0;
- contents->recheck();
+ contents->recheck();
}
diff --git a/contrib/packagekit-plugin/src/contents.h b/contrib/packagekit-plugin/src/contents.h
index a435608..9cea5a8 100644
--- a/contrib/packagekit-plugin/src/contents.h
+++ b/contrib/packagekit-plugin/src/contents.h
@@ -53,84 +53,71 @@
class PkpPluginInstance;
enum PackageStatus {
- IN_PROGRESS, /* Looking up package information */
- INSTALLED, /* Package installed */
- UPGRADABLE, /* Package installed, newer version available */
- AVAILABLE, /* Package not installed, version available */
- UNAVAILABLE, /* Package not installed or available */
- INSTALLING /* Currently installing a new version */
+ IN_PROGRESS, /* Looking up package information */
+ INSTALLED, /* Package installed */
+ UPGRADABLE, /* Package installed, newer version available */
+ AVAILABLE, /* Package not installed, version available */
+ UNAVAILABLE, /* Package not installed or available */
+ INSTALLING /* Currently installing a new version */
};
class PkpContents
{
public:
- PkpContents(const char *displayName, const char *packageNames, const char *desktopNames);
- virtual ~PkpContents();
+ PkpContents(const gchar *displayName, const gchar *packageNames, const gchar *desktopNames);
+ virtual ~PkpContents();
- void setPlugin(PkpPluginInstance *plugin);
+ void setPlugin(PkpPluginInstance *plugin);
- void draw(cairo_t *cr);
- void buttonPress(int x, int y, Time time);
- void buttonRelease(int x, int y, Time time);
- void motion(int x, int y);
- void enter(int x, int y);
- void leave(int x, int y);
+ void draw(cairo_t *cr);
+ void buttonPress(int x, int y, Time time);
+ void buttonRelease(int x, int y, Time time);
+ void motion(int x, int y);
+ void enter(int x, int y);
+ void leave(int x, int y);
private:
- void recheck();
- void findAppInfo();
- void runApplication(Time time);
- void installPackage(Time time);
-
- int getLinkIndex(int x, int y);
-
- void setStatus(PackageStatus status);
- PackageStatus getStatus() { return mStatus; }
- void setAvailableVersion(const char *version);
- void setAvailablePackageName(const char *name);
- void setInstalledVersion(const char *version);
-
- void ensureLayout(cairo_t *cr,
- PangoFontDescription *font_desc,
- guint32 link_color);
- void clearLayout();
- void refresh();
-
- void removeClient(PkClient *client);
-
- static void onClientPackage(PkClient *client,
- const PkPackageObj *obj,
- PkpContents *contents);
- static void onClientErrorCode(PkClient *client,
- PkErrorCodeEnum code,
- const gchar *details,
- PkpContents *contents);
- static void onClientFinished(PkClient *client,
- PkExitEnum exit,
- guint runtime,
- PkpContents *contents);
-
- static void onInstallPackageFinished(DBusGProxy *proxy,
- DBusGProxyCall *call,
- void *user_data);
-
- PkpPluginInstance *mPlugin;
- PackageStatus mStatus;
- std::string mAvailableVersion;
- std::string mAvailablePackageName;
- std::string mInstalledVersion;
- GAppInfo *mAppInfo;
-
- std::string mDisplayName;
- std::vector<std::string> mPackageNames;
- std::vector<std::string> mDesktopNames;
-
- PangoLayout *mLayout;
-
- std::vector<PkClient *> mClients;
-
- DBusGProxy *mInstallPackageProxy;
- DBusGProxyCall *mInstallPackageCall;
+ void recheck();
+ void findAppInfo();
+ void runApplication(Time time);
+ void installPackage(Time time);
+
+ int getLinkIndex(int x, int y);
+
+ void setStatus(PackageStatus status);
+ PackageStatus getStatus() { return mStatus; }
+ void setAvailableVersion(const gchar *version);
+ void setAvailablePackageName(const gchar *name);
+ void setInstalledVersion(const gchar *version);
+
+ void ensureLayout(cairo_t *cr, PangoFontDescription *font_desc, guint32 link_color);
+ void clearLayout();
+ void refresh();
+
+ void removeClient(PkClient *client);
+
+ static void onClientPackage(PkClient *client, const PkPackageObj *obj, PkpContents *contents);
+ static void onClientErrorCode(PkClient *client, PkErrorCodeEnum code, const gchar *details, PkpContents *contents);
+ static void onClientFinished(PkClient *client, PkExitEnum exit, guint runtime, PkpContents *contents);
+ static void onInstallPackageFinished(DBusGProxy *proxy, DBusGProxyCall *call, void *user_data);
+
+ PkpPluginInstance *mPlugin;
+ PackageStatus mStatus;
+ std::string mAvailableVersion;
+ std::string mAvailablePackageName;
+ std::string mInstalledVersion;
+ GAppInfo *mAppInfo;
+
+ std::string mDisplayName;
+ std::vector<std::string> mPackageNames;
+ std::vector<std::string> mDesktopNames;
+
+ PangoLayout *mLayout;
+
+ std::vector<PkClient *> mClients;
+
+ DBusGProxy *mInstallPackageProxy;
+ DBusGProxyCall *mInstallPackageCall;
};
#endif // __CONTENTS_H__
diff --git a/contrib/packagekit-plugin/src/plugin.cpp b/contrib/packagekit-plugin/src/plugin.cpp
index b9c3268..0c72132 100644
--- a/contrib/packagekit-plugin/src/plugin.cpp
+++ b/contrib/packagekit-plugin/src/plugin.cpp
@@ -50,14 +50,14 @@
#include "plugin.h"
-#define MIME_TYPES_HANDLED "application/x-packagekit-plugin"
-#define PLUGIN_NAME "Plugin for Installing Applications"
+#define MIME_TYPES_HANDLED "application/x-packagekit-plugin"
+#define PLUGIN_NAME "Plugin for Installing Applications"
#define MIME_TYPES_DESCRIPTION MIME_TYPES_HANDLED":bsc:"PLUGIN_NAME
-#define PLUGIN_DESCRIPTION PLUGIN_NAME
+#define PLUGIN_DESCRIPTION PLUGIN_NAME
char* NPP_GetMIMEDescription(void)
{
- return (char *)(MIME_TYPES_DESCRIPTION);
+ return (char *)(MIME_TYPES_DESCRIPTION);
}
static void *module_handle = 0;
@@ -77,37 +77,37 @@ static void *module_handle = 0;
static void
make_module_resident()
{
- Dl_info info;
-
- /* Get the (absolute) filename of this module */
- if (!dladdr((void *)NPP_GetMIMEDescription, &info)) {
- g_warning("Can't find filename for module");
- return;
- }
-
- /* Now reopen it to get our own handle */
- module_handle = dlopen(info.dli_fname, RTLD_NOW);
- if (!module_handle) {
- g_warning("Can't permanently open module %s", dlerror());
- return;
- }
-
- /* the module will never be closed */
+ Dl_info info;
+
+ /* Get the (absolute) filename of this module */
+ if (!dladdr((void *)NPP_GetMIMEDescription, &info)) {
+ g_warning("Can't find filename for module");
+ return;
+ }
+
+ /* Now reopen it to get our own handle */
+ module_handle = dlopen(info.dli_fname, RTLD_NOW);
+ if (!module_handle) {
+ g_warning("Can't permanently open module %s", dlerror());
+ return;
+ }
+
+ /* the module will never be closed */
}
NPError NS_PluginInitialize()
{
- if (module_handle != 0) /* Already initialized */
- return NPERR_NO_ERROR;
+ if (module_handle != 0) /* Already initialized */
+ return NPERR_NO_ERROR;
- make_module_resident();
+ make_module_resident();
#ifdef ENABLE_NLS
- bindtextdomain (GETTEXT_PACKAGE, PACKAGE_LOCALE_DIR);
- bind_textdomain_codeset (GETTEXT_PACKAGE, "UTF-8");
+ bindtextdomain (GETTEXT_PACKAGE, PACKAGE_LOCALE_DIR);
+ bind_textdomain_codeset (GETTEXT_PACKAGE, "UTF-8");
#endif
- return NPERR_NO_ERROR;
+ return NPERR_NO_ERROR;
}
void NS_PluginShutdown()
@@ -117,19 +117,19 @@ void NS_PluginShutdown()
// get values per plugin
NPError NS_PluginGetValue(NPPVariable aVariable, void *aValue)
{
- NPError err = NPERR_NO_ERROR;
- switch (aVariable) {
- case NPPVpluginNameString:
- *((char **)aValue) = (char *)PLUGIN_NAME;
- break;
- case NPPVpluginDescriptionString:
- *((char **)aValue) = (char *)PLUGIN_DESCRIPTION;
- break;
- default:
- err = NPERR_INVALID_PARAM;
- break;
- }
- return err;
+ NPError err = NPERR_NO_ERROR;
+ switch (aVariable) {
+ case NPPVpluginNameString:
+ *((char **)aValue) = (char *)PLUGIN_NAME;
+ break;
+ case NPPVpluginDescriptionString:
+ *((char **)aValue) = (char *)PLUGIN_DESCRIPTION;
+ break;
+ default:
+ err = NPERR_INVALID_PARAM;
+ break;
+ }
+ return err;
}
/////////////////////////////////////////////////////////////
@@ -138,34 +138,33 @@ NPError NS_PluginGetValue(NPPVariable aVariable, void *aValue)
//
nsPluginInstanceBase * NS_NewPluginInstance(nsPluginCreateData * aCreateDataStruct)
{
- const char *displayName = "";
- const char *packageNames = NULL;
- const char *desktopNames = NULL;
+ const gchar *displayName = "";
+ const gchar *packageNames = NULL;
+ const gchar *desktopNames = NULL;
- if(!aCreateDataStruct)
- return NULL;
+ if(!aCreateDataStruct)
+ return NULL;
- for (int i = 0; i < aCreateDataStruct->argc; i++) {
- if (strcmp(aCreateDataStruct->argn[i], "displayname") == 0)
- displayName = aCreateDataStruct->argv[i];
- else if (strcmp(aCreateDataStruct->argn[i], "packagenames") == 0)
- packageNames = aCreateDataStruct->argv[i];
- else if (strcmp(aCreateDataStruct->argn[i], "desktopnames") == 0)
- desktopNames = aCreateDataStruct->argv[i];
- }
+ for (int i = 0; i < aCreateDataStruct->argc; i++) {
+ if (strcmp(aCreateDataStruct->argn[i], "displayname") == 0)
+ displayName = aCreateDataStruct->argv[i];
+ else if (strcmp(aCreateDataStruct->argn[i], "packagenames") == 0)
+ packageNames = aCreateDataStruct->argv[i];
+ else if (strcmp(aCreateDataStruct->argn[i], "desktopnames") == 0)
+ desktopNames = aCreateDataStruct->argv[i];
+ }
- PkpPluginInstance * plugin = new PkpPluginInstance(aCreateDataStruct->instance, displayName, packageNames, desktopNames);
+ PkpPluginInstance * plugin = new PkpPluginInstance(aCreateDataStruct->instance, displayName, packageNames, desktopNames);
- NPN_SetValue(aCreateDataStruct->instance,
- NPPVpluginWindowBool, (void *)FALSE);
+ NPN_SetValue(aCreateDataStruct->instance, NPPVpluginWindowBool, (void *)FALSE);
- return plugin;
+ return plugin;
}
void NS_DestroyPluginInstance(nsPluginInstanceBase * aPlugin)
{
- if(aPlugin)
- delete (PkpPluginInstance *)aPlugin;
+ if(aPlugin)
+ delete (PkpPluginInstance *)aPlugin;
}
////////////////////////////////////////
@@ -173,17 +172,14 @@ void NS_DestroyPluginInstance(nsPluginInstanceBase * aPlugin)
// nsPluginInstance class implementation
//
-PkpPluginInstance::PkpPluginInstance(NPP aInstance,
- const char *displayName,
- const char *packageNames,
- const char *desktopNames) :
- nsPluginInstanceBase(),
- mInstance(aInstance),
- mInitialized(FALSE),
- mContents(displayName, packageNames, desktopNames),
- mWindow(0)
+PkpPluginInstance::PkpPluginInstance(NPP aInstance, const gchar *displayName, const gchar *packageNames, const gchar *desktopNames) :
+ nsPluginInstanceBase(),
+ mInstance(aInstance),
+ mInitialized(FALSE),
+ mContents(displayName, packageNames, desktopNames),
+ mWindow(0)
{
- mContents.setPlugin(this);
+ mContents.setPlugin(this);
}
PkpPluginInstance::~PkpPluginInstance()
@@ -192,125 +188,113 @@ PkpPluginInstance::~PkpPluginInstance()
NPBool PkpPluginInstance::init(NPWindow* aWindow)
{
- if(aWindow == NULL)
- return FALSE;
+ if(aWindow == NULL)
+ return FALSE;
- if (SetWindow(aWindow))
- mInitialized = TRUE;
+ if (SetWindow(aWindow))
+ mInitialized = TRUE;
- return mInitialized;
+ return mInitialized;
}
void PkpPluginInstance::shut()
{
- mInitialized = FALSE;
+ mInitialized = FALSE;
}
NPError PkpPluginInstance::GetValue(NPPVariable aVariable, void *aValue)
{
- NPError err = NPERR_NO_ERROR;
- switch (aVariable) {
- case NPPVpluginNameString:
- case NPPVpluginDescriptionString:
- return NS_PluginGetValue(aVariable, aValue) ;
- break;
- default:
- err = NPERR_INVALID_PARAM;
- break;
- }
- return err;
+ NPError err = NPERR_NO_ERROR;
+ switch (aVariable) {
+ case NPPVpluginNameString:
+ case NPPVpluginDescriptionString:
+ return NS_PluginGetValue(aVariable, aValue) ;
+ break;
+ default:
+ err = NPERR_INVALID_PARAM;
+ break;
+ }
+ return err;
}
NPError PkpPluginInstance::SetWindow(NPWindow* aWindow)
{
- if (aWindow == NULL)
- return FALSE;
-
- mX = aWindow->x;
- mY = aWindow->y;
- mWidth = aWindow->width;
- mHeight = aWindow->height;
-
- mWindow = (Window) aWindow->window;
- NPSetWindowCallbackStruct *ws_info = (NPSetWindowCallbackStruct *)aWindow->ws_info;
- mDisplay = ws_info->display;
- mVisual = ws_info->visual;
- mDepth = ws_info->depth;
- mColormap = ws_info->colormap;
-
- return NPERR_NO_ERROR;
+ if (aWindow == NULL)
+ return FALSE;
+
+ mX = aWindow->x;
+ mY = aWindow->y;
+ mWidth = aWindow->width;
+ mHeight = aWindow->height;
+
+ mWindow = (Window) aWindow->window;
+ NPSetWindowCallbackStruct *ws_info = (NPSetWindowCallbackStruct *)aWindow->ws_info;
+ mDisplay = ws_info->display;
+ mVisual = ws_info->visual;
+ mDepth = ws_info->depth;
+ mColormap = ws_info->colormap;
+
+ return NPERR_NO_ERROR;
}
void
PkpPluginInstance::refresh()
{
- NPRect rect;
+ NPRect rect;
- /* Coordinates here are relative to the plugin's origin (mX,mY) */
+ /* Coordinates here are relative to the plugin's origin (mX,mY) */
- rect.left = 0;
- rect.right = mWidth;
- rect.top = 0;
- rect.bottom = mHeight;
+ rect.left = 0;
+ rect.right = mWidth;
+ rect.top = 0;
+ rect.bottom = mHeight;
- NPN_InvalidateRect(mInstance, &rect);
+ NPN_InvalidateRect(mInstance, &rect);
}
uint16
PkpPluginInstance::HandleEvent(void *event)
{
- XEvent *xev = (XEvent *)event;
-
- switch (xev->xany.type) {
- case GraphicsExpose:
- {
- XGraphicsExposeEvent *xge = (XGraphicsExposeEvent *)event;
-
- cairo_surface_t *surface = cairo_xlib_surface_create (mDisplay, xge->drawable, mVisual, mX + mWidth, mY + mHeight);
- cairo_t *cr = cairo_create(surface);
-
- cairo_rectangle(cr, xge->x, xge->y, xge->width, xge->height);
- cairo_clip(cr);
-
- mContents.draw(cr);
-
- cairo_destroy(cr);
- cairo_surface_destroy(surface);
-
- return 1;
- }
- case ButtonPress:
- {
- XButtonEvent *xbe = (XButtonEvent *)event;
- mContents.buttonPress(xbe->x, xbe->y, xbe->time);
- return 1;
- }
- case ButtonRelease:
- {
- XButtonEvent *xbe = (XButtonEvent *)event;
- mContents.buttonRelease(xbe->x, xbe->y, xbe->time);
- return 1;
- }
- case MotionNotify:
- {
- XMotionEvent *xme = (XMotionEvent *)event;
- mContents.motion(xme->x, xme->y);
- return 1;
- }
- case EnterNotify:
- {
- XCrossingEvent *xce = (XCrossingEvent *)event;
- mContents.enter(xce->x, xce->y);
- return 1;
- }
- case LeaveNotify:
- {
- XCrossingEvent *xce = (XCrossingEvent *)event;
- mContents.leave(xce->x, xce->y);
- return 1;
- }
- }
-
- return 0;
+ XEvent *xev = (XEvent *)event;
+ cairo_surface_t *surface;
+ cairo_t *cr;
+ XButtonEvent *xbe;
+ XGraphicsExposeEvent *xge;
+ XMotionEvent *xme;
+ XCrossingEvent *xce;
+
+ switch (xev->xany.type) {
+ case GraphicsExpose:
+ xge = (XGraphicsExposeEvent *)event;
+ surface = cairo_xlib_surface_create (mDisplay, xge->drawable, mVisual, mX + mWidth, mY + mHeight);
+ cr = cairo_create(surface);
+ cairo_rectangle(cr, xge->x, xge->y, xge->width, xge->height);
+ cairo_clip(cr);
+ mContents.draw(cr);
+ cairo_destroy(cr);
+ cairo_surface_destroy(surface);
+ return 1;
+ case ButtonPress:
+ xbe = (XButtonEvent *)event;
+ mContents.buttonPress(xbe->x, xbe->y, xbe->time);
+ return 1;
+ case ButtonRelease:
+ xbe = (XButtonEvent *)event;
+ mContents.buttonRelease(xbe->x, xbe->y, xbe->time);
+ return 1;
+ case MotionNotify:
+ xme = (XMotionEvent *)event;
+ mContents.motion(xme->x, xme->y);
+ return 1;
+ case EnterNotify:
+ xce = (XCrossingEvent *)event;
+ mContents.enter(xce->x, xce->y);
+ return 1;
+ case LeaveNotify:
+ xce = (XCrossingEvent *)event;
+ mContents.leave(xce->x, xce->y);
+ return 1;
+ }
+ return 0;
}
diff --git a/contrib/packagekit-plugin/src/plugin.h b/contrib/packagekit-plugin/src/plugin.h
index 9364cbc..0bb0707 100644
--- a/contrib/packagekit-plugin/src/plugin.h
+++ b/contrib/packagekit-plugin/src/plugin.h
@@ -46,36 +46,36 @@
class PkpPluginInstance : public nsPluginInstanceBase
{
public:
- PkpPluginInstance(NPP aInstance, const char *displayName, const char *packageNames, const char *desktopNames);
- virtual ~PkpPluginInstance();
+ PkpPluginInstance(NPP aInstance, const gchar *displayName, const gchar *packageNames, const gchar *desktopNames);
+ virtual ~PkpPluginInstance();
- NPBool init(NPWindow* aWindow);
- void shut();
- NPBool isInitialized() {return mInitialized;}
- NPError GetValue(NPPVariable variable, void *value);
- NPError SetWindow(NPWindow* aWindow);
- uint16 HandleEvent(void *event);
+ NPBool init(NPWindow* aWindow);
+ void shut();
+ NPBool isInitialized() {return mInitialized;}
+ NPError GetValue(NPPVariable variable, void *value);
+ NPError SetWindow(NPWindow* aWindow);
+ uint16 HandleEvent(void *event);
- void refresh();
+ void refresh();
- int getX() { return mX; }
- int getY() { return mY; }
- int getWidth() { return mWidth; }
- int getHeight() { return mHeight; }
+ int getX() { return mX; }
+ int getY() { return mY; }
+ int getWidth() { return mWidth; }
+ int getHeight() { return mHeight; }
private:
- NPP mInstance;
- NPBool mInitialized;
+ NPP mInstance;
+ NPBool mInitialized;
- PkpContents mContents;
+ PkpContents mContents;
- Window mWindow;
- Display *mDisplay;
- int mX, mY;
- int mWidth, mHeight;
- Visual* mVisual;
- Colormap mColormap;
- unsigned int mDepth;
+ Window mWindow;
+ Display *mDisplay;
+ int mX, mY;
+ int mWidth, mHeight;
+ Visual* mVisual;
+ Colormap mColormap;
+ unsigned int mDepth;
};
#endif // __PLUGIN_H__
commit 7714a93a2eb568f8edcce1d879c49ce97fa3e370
Author: Richard Hughes <richard at hughsie.com>
Date: Tue Oct 28 17:26:49 2008 +0000
trivial: be more careful when checking for the toplevel window
diff --git a/contrib/packagekit-plugin/src/contents.cpp b/contrib/packagekit-plugin/src/contents.cpp
index 1b413aa..812bf37 100644
--- a/contrib/packagekit-plugin/src/contents.cpp
+++ b/contrib/packagekit-plugin/src/contents.cpp
@@ -662,7 +662,7 @@ PkpContents::installPackage (Time time)
/* will be NULL when activated not using a keyboard or a mouse */
event = gtk_get_current_event ();
- if (event != NULL) {
+ if (event != NULL && event->any.window != NULL) {
window = gdk_window_get_toplevel (event->any.window);
xid = GDK_DRAWABLE_XID(window);
}
commit 1f83e267c4584d74b6a1b26722ad18ef70da19bd
Author: Richard Hughes <richard at hughsie.com>
Date: Tue Oct 28 17:23:51 2008 +0000
plugin: send the XID of the browser window so focus stealing and modality is set correctly -- many thanks for the pointers Owen...
diff --git a/contrib/packagekit-plugin/src/contents.cpp b/contrib/packagekit-plugin/src/contents.cpp
index 2c16e92..1b413aa 100644
--- a/contrib/packagekit-plugin/src/contents.cpp
+++ b/contrib/packagekit-plugin/src/contents.cpp
@@ -639,6 +639,10 @@ PkpContents::runApplication (Time time)
void
PkpContents::installPackage (Time time)
{
+ GdkEvent *event;
+ GdkWindow *window;
+ guint xid = 0;
+
if (mAvailablePackageName.empty()) {
g_warning("No available package to install");
return;
@@ -656,13 +660,20 @@ PkpContents::installPackage (Time time)
"/org/freedesktop/PackageKit",
"org.freedesktop.PackageKit");
+ /* will be NULL when activated not using a keyboard or a mouse */
+ event = gtk_get_current_event ();
+ if (event != NULL) {
+ window = gdk_window_get_toplevel (event->any.window);
+ xid = GDK_DRAWABLE_XID(window);
+ }
+
mInstallPackageCall = dbus_g_proxy_begin_call_with_timeout(mInstallPackageProxy,
"InstallPackageName",
onInstallPackageFinished,
this,
(GDestroyNotify)0,
24 * 60 * 1000 * 1000, /* one day */
- G_TYPE_UINT, 0, /* xid */
+ G_TYPE_UINT, xid, /* xid */
G_TYPE_UINT, 0, /* timespec */
G_TYPE_STRING, mAvailablePackageName.c_str(),
G_TYPE_INVALID,
commit 211b538cd0d6e420f288af49f7bb106cf99b4ce6
Author: Richard Hughes <richard at hughsie.com>
Date: Tue Oct 28 14:29:02 2008 +0000
bugfix: use the correct session interface in the browser plugin
diff --git a/contrib/packagekit-plugin/src/contents.cpp b/contrib/packagekit-plugin/src/contents.cpp
index bd0d69f..2c16e92 100644
--- a/contrib/packagekit-plugin/src/contents.cpp
+++ b/contrib/packagekit-plugin/src/contents.cpp
@@ -662,6 +662,8 @@ PkpContents::installPackage (Time time)
this,
(GDestroyNotify)0,
24 * 60 * 1000 * 1000, /* one day */
+ G_TYPE_UINT, 0, /* xid */
+ G_TYPE_UINT, 0, /* timespec */
G_TYPE_STRING, mAvailablePackageName.c_str(),
G_TYPE_INVALID,
G_TYPE_INVALID);
More information about the PackageKit-commit
mailing list