[PackageKit-commit] packagekit: Branch 'master' - 5 commits
Richard Hughes
hughsient at kemper.freedesktop.org
Mon Apr 21 03:49:24 PDT 2008
Makefile.am | 3
backends/conary/helpers/conaryBackend.py | 17 -
backends/poldek/pk-backend-poldek.c | 110 ++++++--
po/LINGUAS | 1
po/fr.po | 403 +++++++++++++++++++++++++++++++
5 files changed, 504 insertions(+), 30 deletions(-)
New commits:
commit 6b209bd2cf85a0b4689ca46281dce772b9100e63
Author: Marc-André Lureau <marcandre.lureau at gmail.com>
Date: Mon Apr 21 11:48:27 2008 +0100
Add french translation
diff --git a/po/LINGUAS b/po/LINGUAS
index 92a2dad..c5fa38f 100644
--- a/po/LINGUAS
+++ b/po/LINGUAS
@@ -6,4 +6,5 @@ sr at latin
zh_CN
he
nl
+fr
diff --git a/po/fr.po b/po/fr.po
new file mode 100644
index 0000000..b8618ce
--- /dev/null
+++ b/po/fr.po
@@ -0,0 +1,403 @@
+# French translation of PackageKit.
+# Copyright (C) 2008 Free Software Foundation, Inc.
+# This file is distributed under the same license as the packagekit package.
+#
+# Marc-Andre Lureau <marcandre.lureau at gmail.com>, 2008
+# Claude Paroz <claude at 2xlibre.net>, 2008
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: PackageKit HEAD\n"
+"Report-Msgid-Bugs-To: \n"
+"POT-Creation-Date: 2008-04-18 21:33+0300\n"
+"PO-Revision-Date: 2008-04-18 21:30+0200\n"
+"Last-Translator: Claude Paroz <claude at 2xlibre.net>\n"
+"Language-Team: GNOME French Team <gnomefr at traduc.org>\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+"Plural-Forms: nplurals=2; plural=(n > 1);\n"
+
+#: ../policy/org.freedesktop.packagekit.policy.in.h:1
+msgid "Accept EULA"
+msgstr "Accepter la licence du logiciel"
+
+#: ../policy/org.freedesktop.packagekit.policy.in.h:2
+msgid "Authentication is required to accept a EULA"
+msgstr "Authentification requise pour accepter une licence"
+
+#: ../policy/org.freedesktop.packagekit.policy.in.h:3
+msgid "Authentication is required to change software source parameters"
+msgstr "Authentification requise pour changer les dépôts de logiciels"
+
+#: ../policy/org.freedesktop.packagekit.policy.in.h:4
+msgid "Authentication is required to install a local file"
+msgstr "Authentification requise pour installer un fichier local"
+
+#: ../policy/org.freedesktop.packagekit.policy.in.h:5
+msgid "Authentication is required to install a package"
+msgstr "Authentification requise pour installer un paquet"
+
+#: ../policy/org.freedesktop.packagekit.policy.in.h:6
+msgid "Authentication is required to install a security signature"
+msgstr "Authentification requise pour installer une signature de sécurité"
+
+#: ../policy/org.freedesktop.packagekit.policy.in.h:7
+msgid "Authentication is required to refresh the package lists"
+msgstr "Authentification requise pour mettre à jour la liste des paquets"
+
+#: ../policy/org.freedesktop.packagekit.policy.in.h:8
+msgid "Authentication is required to remove packages"
+msgstr "Authentification requise pour désinstaller des paquets"
+
+#: ../policy/org.freedesktop.packagekit.policy.in.h:9
+msgid "Authentication is required to rollback a transaction"
+msgstr "Authentification requise pour annuler une transaction"
+
+#: ../policy/org.freedesktop.packagekit.policy.in.h:10
+msgid "Authentication is required to update all packages"
+msgstr "Authentification requise pour mettre à jour tous les paquets"
+
+#: ../policy/org.freedesktop.packagekit.policy.in.h:11
+msgid "Authentication is required to update packages"
+msgstr "Authentification requise pour mettre à jour des paquets"
+
+#: ../policy/org.freedesktop.packagekit.policy.in.h:12
+msgid "Change software source parameters"
+msgstr "Modifier les dépôts de logiciels"
+
+#: ../policy/org.freedesktop.packagekit.policy.in.h:13
+msgid "Install local file"
+msgstr "Installer un fichier local"
+
+#: ../policy/org.freedesktop.packagekit.policy.in.h:14
+msgid "Install package"
+msgstr "Installer un paquet"
+
+#: ../policy/org.freedesktop.packagekit.policy.in.h:15
+msgid "Install security signature"
+msgstr "Installer une signature de sécurité"
+
+#: ../policy/org.freedesktop.packagekit.policy.in.h:16
+msgid "Refresh package lists"
+msgstr "Mettre à jour la liste des paquets"
+
+#: ../policy/org.freedesktop.packagekit.policy.in.h:17
+msgid "Remove package"
+msgstr "Supprimer un paquet"
+
+#: ../policy/org.freedesktop.packagekit.policy.in.h:18
+msgid "Rollback to a previous transaction"
+msgstr "Restauration"
+
+#: ../policy/org.freedesktop.packagekit.policy.in.h:19
+msgid "Update all packages"
+msgstr "Mettre à jour tous les paquets"
+
+#: ../policy/org.freedesktop.packagekit.policy.in.h:20
+msgid "Update package"
+msgstr "Mettre à jour le paquet"
+
+#: ../client/pk-console.c:208
+msgid "Update detail"
+msgstr "Détails de mise à jour"
+
+#: ../client/pk-console.c:400
+msgid "A system restart is required"
+msgstr "Redémarrage du système conseillé"
+
+#: ../client/pk-console.c:402
+msgid "A logout and login is required"
+msgstr "Reconnexion à la session conseillée"
+
+#: ../client/pk-console.c:404
+msgid "An application restart is required"
+msgstr "Redémarrage d'une application conseillé"
+
+#: ../client/pk-console.c:443
+#, c-format
+msgid "Please enter a number from 1 to %i: "
+msgstr "Veuillez saisir un nombre entre 1 et %i : "
+
+#: ../client/pk-console.c:493
+msgid "Could not find a package match"
+msgstr "Impossible de trouver un paquet correspondant"
+
+#: ../client/pk-console.c:507
+msgid "There are multiple package matches"
+msgstr "Il y a plusieurs paquets correspondants"
+
+#. find out what package the user wants to use
+#: ../client/pk-console.c:514
+msgid "Please enter the package number: "
+msgstr "Veuillez saisir le numéro du paquet : "
+
+#: ../client/pk-console.c:530
+msgid ""
+"Could not find a package with that name to install, or package already "
+"installed"
+msgstr "Aucun paquet à installer avec ce nom, ou le paquet est déjà installé"
+
+#: ../client/pk-console.c:612
+msgid "Could not find a package with that name to remove"
+msgstr "Impossible de trouver un paquet à supprimer portant ce nom"
+
+#: ../client/pk-console.c:652
+msgid "The following packages have to be removed"
+msgstr "Les paquets suivants vont être désinstallés"
+
+#. get user input
+#: ../client/pk-console.c:661
+msgid "Okay to remove additional packages?"
+msgstr "Acceptez-vous de désinstaller les paquets supplémentaires ?"
+
+#: ../client/pk-console.c:665
+msgid "Cancelled!"
+msgstr "Annulé !"
+
+#: ../client/pk-console.c:687
+msgid "Could not find a package with that name to update"
+msgstr "Impossible de trouver un paquet à mettre à jour portant ce nom"
+
+#: ../client/pk-console.c:705
+msgid "Could not find what packages require this package"
+msgstr "Impossible de trouver quels paquets ont besoin de ce paquet"
+
+#: ../client/pk-console.c:723
+msgid "Could not get dependencies for this package"
+msgstr "Impossible de trouver les dépendances de ce paquet"
+
+#: ../client/pk-console.c:741
+msgid "Could not find a description for this package"
+msgstr "Impossible de trouver la description de ce paquet"
+
+#: ../client/pk-console.c:759
+#, c-format
+msgid "Could not find the files for this package"
+msgstr "Impossible de trouver les fichiers contenus dans ce paquet"
+
+#: ../client/pk-console.c:819
+msgid "Package description"
+msgstr "Description du paquet"
+
+#: ../client/pk-console.c:842
+msgid "Package files"
+msgstr "Fichiers du paquet"
+
+#: ../client/pk-console.c:850
+msgid "No files"
+msgstr "Aucun fichier"
+
+#. get user input
+#: ../client/pk-console.c:882
+msgid "Okay to import key?"
+msgstr "Acceptez-vous d'importer la clé ?"
+
+#: ../client/pk-console.c:885
+msgid "Did not import key"
+msgstr "Clé non importée"
+
+#. get user input
+#: ../client/pk-console.c:925
+msgid "Do you agree?"
+msgstr "Ãtes-vous d'accord ?"
+
+#: ../client/pk-console.c:928
+msgid "Did not agree to licence, task will fail"
+msgstr "Licence refusée ; la tâche va donc échouer"
+
+#: ../client/pk-console.c:957
+msgid "The daemon crashed mid-transaction!"
+msgstr "Le démon a échoué en cours de transaction."
+
+#. header
+#: ../client/pk-console.c:1010
+msgid "PackageKit Console Interface"
+msgstr "Interface PackageKit en console"
+
+#: ../client/pk-console.c:1010
+msgid "Subcommands:"
+msgstr "Sous-commandes :"
+
+#: ../client/pk-console.c:1114 ../client/pk-monitor.c:100 ../src/pk-main.c:189
+msgid "Show extra debugging information"
+msgstr "Affiche des informations de débogage"
+
+#: ../client/pk-console.c:1116 ../client/pk-monitor.c:102
+msgid "Show the program version and exit"
+msgstr "Affiche la version du programme et quitte"
+
+#: ../client/pk-console.c:1118
+msgid "Set the filter, e.g. installed"
+msgstr "Sélectionne le filtre, par ex. : installé"
+
+#: ../client/pk-console.c:1120
+msgid "Exit without waiting for actions to complete"
+msgstr "Quitte sans attendre que la tâche soit terminée"
+
+#: ../client/pk-console.c:1143
+msgid "Could not connect to system DBUS."
+msgstr "Impossible de se connecter au bus système."
+
+#: ../client/pk-console.c:1231
+#, c-format
+msgid "You need to specify a search type"
+msgstr "Vous devez indiquer un type de recherche"
+
+#: ../client/pk-console.c:1236 ../client/pk-console.c:1243
+#: ../client/pk-console.c:1250 ../client/pk-console.c:1257
+#: ../client/pk-console.c:1361 ../client/pk-console.c:1368
+#: ../client/pk-console.c:1375 ../client/pk-console.c:1382
+#, c-format
+msgid "You need to specify a search term"
+msgstr "Vous devez indiquer un terme à rechercher"
+
+#: ../client/pk-console.c:1262
+#, c-format
+msgid "Invalid search type"
+msgstr "Type de recherche incorrect"
+
+#: ../client/pk-console.c:1267
+#, c-format
+msgid "You need to specify a package or file to install"
+msgstr "Vous devez indiquer un paquet ou un fichier à installer"
+
+#: ../client/pk-console.c:1280
+#, c-format
+msgid "You need to specify a type, key_id and package_id"
+msgstr "Vous devez indiquer un type, « key_id » et « package_id »"
+
+#: ../client/pk-console.c:1287
+#, c-format
+msgid "You need to specify a package to remove"
+msgstr "Vous devez indiquer un paquet à désinstaller"
+
+#: ../client/pk-console.c:1294
+#, c-format
+msgid "You need to specify a eula-id"
+msgstr "Vous devez indiquer la licence de logiciel « eula-id »"
+
+#: ../client/pk-console.c:1309
+#, c-format
+msgid "You need to specify a package name to resolve"
+msgstr "Vous devez indiquer un nom de paquet à résoudre"
+
+#: ../client/pk-console.c:1316 ../client/pk-console.c:1323
+#, c-format
+msgid "You need to specify a repo name"
+msgstr "Vous devez indiquer un nom de dépôt"
+
+#: ../client/pk-console.c:1330
+#, c-format
+msgid "You need to specify a repo name/parameter and value"
+msgstr "Vous devez indiquer un nom de dépôt ou un paramètre et une valeur"
+
+#: ../client/pk-console.c:1343
+#, c-format
+msgid "You need to specify a time term"
+msgstr "Vous devez indiquer une date"
+
+#: ../client/pk-console.c:1348
+#, c-format
+msgid "You need to specify a correct role"
+msgstr "Vous devez indiquer un rôle correct"
+
+#: ../client/pk-console.c:1353
+#, c-format
+msgid "Failed to get last time"
+msgstr "Impossible de lire la dernière date"
+
+#: ../client/pk-console.c:1389
+#, c-format
+msgid "You need to specify a package to find the description for"
+msgstr "Vous devez indiquer un paquet dont vous souhaitez la description"
+
+#: ../client/pk-console.c:1396
+#, c-format
+msgid "You need to specify a package to find the files for"
+msgstr "Vous devez indiquer un paquet pour en lister les fichiers"
+
+#: ../client/pk-console.c:1441
+#, c-format
+msgid "Option '%s' not supported"
+msgstr "L'option « %s » n'est pas prise en charge"
+
+#: ../client/pk-console.c:1452
+msgid "Command failed"
+msgstr "La commande a échoué"
+
+#: ../client/pk-console.c:1456
+msgid "You don't have the necessary privileges for this operation"
+msgstr "Vous ne disposez pas des privilèges nécessaires pour cette opération"
+
+#: ../client/pk-monitor.c:113
+msgid "PackageKit Monitor"
+msgstr "Contrôleur PackageKit"
+
+#: ../client/pk-import-desktop.c:283 ../client/pk-import-specspo.c:169
+#, c-format
+msgid "Could not open database: %s"
+msgstr "Impossible d'ouvrir la base de données : %s"
+
+#: ../client/pk-import-desktop.c:284 ../client/pk-import-specspo.c:170
+msgid "You probably need to run this program as the root user"
+msgstr "Vous devriez exécuter ce programme en tant qu'administrateur « root »"
+
+#: ../src/pk-main.c:83
+msgid "Startup failed due to security policies on this machine."
+msgstr "Les règles de sécurité de ce système empêchent le démarrage."
+
+#: ../src/pk-main.c:84
+msgid "This can happen for two reasons:"
+msgstr "Cela peut s'expliquer pour deux raisons :"
+
+#: ../src/pk-main.c:85
+msgid "The correct user is not launching the executable (usually root)"
+msgstr ""
+"L'utilisateur n'a pas la permission d'exécuter le programme (généralement "
+"« root »)"
+
+#: ../src/pk-main.c:86
+msgid ""
+"The org.freedesktop.PackageKit.conf file is not installed in the system /etc/"
+"dbus-1/system.d directory"
+msgstr ""
+"Le fichier « org.freedesktop.PackageKit.conf » n'est pas installé dans le "
+"répertoire /etc/dbus-1/system.d."
+
+#: ../src/pk-main.c:185
+msgid "Packaging backend to use, e.g. dummy"
+msgstr "Moteur du gestionnaire de paquets, par ex. : dummy"
+
+#: ../src/pk-main.c:187
+msgid "Daemonize and detach from the terminal"
+msgstr "Crée un démon et se sépare du terminal"
+
+#: ../src/pk-main.c:191
+msgid "Disable the idle timer"
+msgstr "Désactive la minuterie d'inactivité"
+
+#: ../src/pk-main.c:193
+msgid "Show version and exit"
+msgstr "Affiche la version et quitte"
+
+#: ../src/pk-main.c:195
+msgid "Exit after a small delay"
+msgstr "Quitte après un court instant"
+
+#: ../src/pk-main.c:197
+msgid "Exit after the engine has loaded"
+msgstr "Quitte immédiatement après chargement du gestionnaire"
+
+#: ../src/pk-main.c:207
+msgid "PackageKit service"
+msgstr "Service PackageKit"
+
+#: ../src/pk-main.c:233
+msgid "Cannot connect to the system bus"
+msgstr "Impossible de se connecter au bus système"
+
+#: ../src/pk-main.c:273
+#, c-format
+msgid "Error trying to start: %s\n"
+msgstr "Impossible de démarrer : %s\n"
commit 12b5dfae2d795552fc1b27932fd4ccf8019e9dca
Author: Robin Norwood <rnorwood at redhat.com>
Date: Sun Apr 20 23:52:40 2008 -0400
Fix typos in searchGroup method.
diff --git a/backends/conary/helpers/conaryBackend.py b/backends/conary/helpers/conaryBackend.py
index b6d340c..b7ef3e1 100644
--- a/backends/conary/helpers/conaryBackend.py
+++ b/backends/conary/helpers/conaryBackend.py
@@ -267,6 +267,7 @@ class PackageKitConaryBackend(PackageKitBaseBackend):
try:
troveTupleList = cache.searchByGroups(revGroupMap[key])
finally:
+ # FIXME: Really need to send an error here
pass
troveTupleList.sort()
@@ -807,7 +808,7 @@ class Cache(object):
self.cursor.execute(sql)
- sql = '''CREATE TABLE conary_lienses (
+ sql = '''CREATE TABLE conary_licenses (
licenseId INTEGER,
licenseName text)'''
@@ -871,19 +872,19 @@ class Cache(object):
groups = ["all"]
if "all" in groups:
- stmt = ("SELECT DISTINCT CP.trove, CP.version, CP.flavor, CC.category_name"
+ stmt = ("SELECT DISTINCT CP.trove, CP.version, CP.flavor, CC.categoryName"
" FROM conary_packages CP, conary_categories CC, conary_category_package_map CCMap"
- " WHERE CCMap.package_id = CP.id"
- " AND CCMap.category_id = CC.id"
+ " WHERE CCMap.packageId = CP.packageId"
+ " AND CCMap.categoryId = CC.categoryId"
" GROUP BY CP.trove, CP.version, CP.flavor"
" ORDER BY CP.trove, CP.version DESC, CP.flavor")
else:
group_string = ", ".join(groups)
- stmt = ("SELECT DISTINCT CP.trove, CP.version, CP.flavor, CC.category_name"
+ stmt = ("SELECT DISTINCT CP.trove, CP.version, CP.flavor, CC.categoryName"
" FROM conary_packages CP, conary_categories CC, conary_category_package_map CCMap"
- " WHERE CC.category_name IN (%s)"
- " AND CCMap.package_id = CP.id"
- " AND CCMap.category_id = CC.id"
+ " WHERE CC.categoryName IN (%s)"
+ " AND CCMap.packageId = CP.packageId"
+ " AND CCMap.categoryId = CC.categoryId"
" GROUP BY CP.trove, CP.version, CP.flavor"
" ORDER BY CP.trove, CP.version DESC, CP.flavor" % group_string)
commit 583dc31362cf1227523800b91af5a8fe4c289cad
Merge: 74049fc... b8bc682...
Author: Richard Hughes <richard at hughsie.com>
Date: Sun Apr 20 23:38:19 2008 +0100
Merge branch 'master' of git+ssh://hughsie@git.packagekit.org/srv/git/PackageKit
commit 74049fc4e2c86698fed6d8ba0de3322f673cddd8
Author: Richard Hughes <richard at hughsie.com>
Date: Sun Apr 20 23:37:29 2008 +0100
add a make snapshot target for rpm builds
diff --git a/Makefile.am b/Makefile.am
index ad828e4..7e753cb 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -43,6 +43,9 @@ gprof:
cat gprof.txt
endif
+snapshot:
+ $(MAKE) dist distdir=$(PACKAGE)-$(VERSION)-`date +"%Y%m%d"`
+
DISTCLEANFILES = \
PackageKit-*.tar.gz \
packagekit.pc \
commit b8bc68202abebbf09c219809ab7af638593908ad
Author: Marcin Banasiak <megabajt at pld-linux.org>
Date: Mon Apr 21 00:17:08 2008 +0200
poldek: when an error occurs display transaction log and try to recognize which PkErrorCodeEnum would be the most suitable
diff --git a/backends/poldek/pk-backend-poldek.c b/backends/poldek/pk-backend-poldek.c
index 3c5a3e3..4e2d312 100644
--- a/backends/poldek/pk-backend-poldek.c
+++ b/backends/poldek/pk-backend-poldek.c
@@ -107,12 +107,26 @@ typedef struct {
gboolean allow_deps;
} TsData;
+/* I need this to avoid showing error messages more than once.
+ * It's initalized by backend_initalize() and destroyed by
+ * backend_destroy(), but every method should clean it at the
+ * end. */
+typedef struct {
+ /* last 'vfff: foo' message */
+ gchar *vfffmsg;
+
+ /* all messages merged into one string which can
+ * be displayed at the end of transaction. */
+ GString *tslog;
+} PbError;
+
/* global variables */
static PkBackendThread *thread;
static PkNetwork *network;
static gint verbose = 1;
static gint ref = 0;
+static PbError *pberror;
static struct poldek_ctx *ctx = NULL;
static struct poclidek_ctx *cctx = NULL;
@@ -1102,23 +1116,58 @@ search_package (PkBackendThread *thread, gpointer data)
}
static void
+pb_error_show (PkBackend *backend, PkErrorCodeEnum errorcode)
+{
+ /* Before emiting error_code try to find the most suitable PkErrorCodeEnum */
+ if (g_strrstr (pberror->tslog->str, " unresolved depend") != NULL)
+ errorcode = PK_ERROR_ENUM_DEP_RESOLUTION_FAILED;
+ else if (g_strrstr (pberror->tslog->str, " conflicts") != NULL)
+ errorcode = PK_ERROR_ENUM_FILE_CONFLICTS;
+
+ pk_backend_error_code (backend, errorcode, pberror->tslog->str);
+}
+
+static void
+pb_error_clean (void)
+{
+ g_free (pberror->vfffmsg);
+
+ pberror->tslog = g_string_erase (pberror->tslog, 0, -1);
+}
+
+static void
poldek_backend_log (void *data, int pri, char *message)
{
- const gchar *msg = strchr (message, ':');
PkBackend *backend;
+ /* skip messages that we don't want to show */
+ if (g_str_has_prefix (message, "Nothing")) // 'Nothing to do'
+ return;
+ if (g_str_has_prefix (message, "There we")) // 'There were errors'
+ return;
+
backend = pk_backend_thread_get_backend (thread);
/* catch vfff messages */
if (g_str_has_prefix (message, "vfff: ")) {
+ /* check if this message was already showed */
+ if (pberror->vfffmsg) {
+ if (strcmp (pberror->vfffmsg, message) == 0)
+ return;
+ else
+ g_free (pberror->vfffmsg);
+ }
+
+ pberror->vfffmsg = g_strdup (message);
+
// 'vfff: unable to connect to ftp.pld-linux.org:21: Connection refused'
pk_backend_message (backend, PK_MESSAGE_ENUM_WARNING, "%s", message);
- } else if (msg) {
-
- if (strcmp (msg+(2*sizeof(char)), "equal version installed, skipped\n") == 0)
- pk_backend_error_code (backend, PK_ERROR_ENUM_PACKAGE_ALREADY_INSTALLED, "Package already installed");
- else if (strcmp (msg+(2*sizeof(char)), "refusing to upgrade held package\n") == 0)
- pk_backend_error_code (backend, PK_ERROR_ENUM_TRANSACTION_ERROR, "Refusing to upgrade held package");
+ } else {
+ if (pri & LOGERR) {
+ g_string_append_printf (pberror->tslog, "error: %s", message);
+ } else {
+ g_string_append_printf (pberror->tslog, "%s", message);
+ }
}
}
@@ -1138,6 +1187,7 @@ do_poldek_init (void) {
poldeklib_init ();
ctx = poldek_new (0);
+
poldek_load_config (ctx, "/etc/poldek/poldek.conf", NULL, 0);
poldek_setup (ctx);
@@ -1191,6 +1241,9 @@ backend_initalize (PkBackend *backend)
{
g_return_if_fail (backend != NULL);
+ pberror = g_new0 (PbError, 1);
+ pberror->tslog = g_string_new ("");
+
thread = pk_backend_thread_new ();
/* reference count for the global variables */
@@ -1215,6 +1268,12 @@ backend_destroy (PkBackend *backend)
return;
do_poldek_destroy ();
+
+ /* release PbError struct */
+ g_free (pberror->vfffmsg);
+ g_string_free (pberror->tslog, TRUE);
+
+ g_free (pberror);
}
/**
@@ -1300,6 +1359,7 @@ backend_get_depends (PkBackend *backend, PkFilterEnum filters, const gchar *pack
pk_backend_set_status (backend, PK_STATUS_ENUM_QUERY);
poldek_backend_set_allow_cancel (backend, FALSE, TRUE);
+ pb_error_clean ();
data->package_id = g_strdup (package_id);
data->filters = filters;
@@ -1364,6 +1424,7 @@ backend_get_description (PkBackend *backend, const gchar *package_id)
pk_backend_set_status (backend, PK_STATUS_ENUM_QUERY);
poldek_backend_set_allow_cancel (backend, FALSE, TRUE);
+ pb_error_clean ();
pk_backend_thread_create (thread,
(PkBackendThreadFunc)backend_get_description_thread,
@@ -1443,6 +1504,7 @@ backend_get_files (PkBackend *backend, const gchar *package_id)
pk_backend_set_status (backend, PK_STATUS_ENUM_QUERY);
poldek_backend_set_allow_cancel (backend, FALSE, TRUE);
+ pb_error_clean ();
pk_backend_thread_create (thread,
(PkBackendThreadFunc)backend_get_files_thread,
@@ -1461,6 +1523,7 @@ backend_get_packages (PkBackend *backend, PkFilterEnum filters)
pk_backend_set_status (backend, PK_STATUS_ENUM_QUERY);
poldek_backend_set_allow_cancel (backend, TRUE, TRUE);
+ pb_error_clean ();
data->mode = SEARCH_ENUM_NONE;
data->filters = filters;
@@ -1521,6 +1584,7 @@ backend_get_requires (PkBackend *backend, PkFilterEnum filters, const gchar *pac
pk_backend_set_status (backend, PK_STATUS_ENUM_QUERY);
poldek_backend_set_allow_cancel (backend, FALSE, TRUE);
+ pb_error_clean ();
data->package_id = g_strdup (package_id);
data->filters = filters;
@@ -1610,6 +1674,7 @@ backend_get_update_detail (PkBackend *backend, const gchar *package_id)
pk_backend_set_status (backend, PK_STATUS_ENUM_QUERY);
poldek_backend_set_allow_cancel (backend, FALSE, TRUE);
+ pb_error_clean ();
pk_backend_thread_create (thread,
(PkBackendThreadFunc)backend_get_update_detail_thread,
@@ -1674,6 +1739,7 @@ backend_get_updates (PkBackend *backend, PkFilterEnum filters)
pk_backend_set_status (backend, PK_STATUS_ENUM_QUERY);
poldek_backend_set_allow_cancel (backend, TRUE, TRUE);
+ pb_error_clean ();
pk_backend_thread_create (thread, backend_get_updates_thread, NULL);
}
@@ -1706,13 +1772,13 @@ backend_install_package_thread (PkBackendThread *thread, gpointer data)
rcmd = poclidek_rcmd_new (cctx, ts);
nvra = poldek_get_nvra_from_package_id (td->package_id);
- command = g_strdup_printf ("install %s", nvra);
+ command = g_strdup_printf ("install --test %s", nvra);
pk_backend_set_status (backend, PK_STATUS_ENUM_DEP_RESOLVE);
if (!poclidek_rcmd_execline (rcmd, command))
{
- pk_backend_error_code (backend, PK_ERROR_ENUM_TRANSACTION_ERROR, "Package can't be installed!");
+ pb_error_show (backend, PK_ERROR_ENUM_TRANSACTION_ERROR);
}
g_free (nvra);
@@ -1747,6 +1813,7 @@ backend_install_package (PkBackend *backend, const gchar *package_id)
}
poldek_backend_set_allow_cancel (backend, FALSE, TRUE);
+ pb_error_clean ();
data->package_id = g_strdup (package_id);
data->pd = g_new0 (PercentageData, 1);
@@ -1824,6 +1891,7 @@ backend_refresh_cache (PkBackend *backend, gboolean force)
pk_backend_set_status (backend, PK_STATUS_ENUM_REFRESH_CACHE);
poldek_backend_set_allow_cancel (backend, FALSE, TRUE);
+ pb_error_clean ();
if (pk_network_is_online (network) == FALSE) {
pk_backend_error_code (backend, PK_ERROR_ENUM_NO_NETWORK, "Cannot refresh cache when offline!");
@@ -1863,7 +1931,7 @@ backend_remove_package_thread (PkBackendThread *thread, gpointer data)
if (!poclidek_rcmd_execline (rcmd, command))
{
- pk_backend_error_code (backend, PK_ERROR_ENUM_CANNOT_REMOVE_SYSTEM_PACKAGE, "Package can't be removed!");
+ pk_backend_error_code (backend, PK_ERROR_ENUM_CANNOT_REMOVE_SYSTEM_PACKAGE, pberror->tslog->str);
}
g_free (nvra);
@@ -1888,6 +1956,7 @@ backend_remove_package (PkBackend *backend, const gchar *package_id, gboolean al
g_return_if_fail (backend != NULL);
poldek_backend_set_allow_cancel (backend, FALSE, TRUE);
+ pb_error_clean ();
data->package_id = g_strdup (package_id);
data->allow_deps = allow_deps;
@@ -1925,6 +1994,7 @@ backend_search_details (PkBackend *backend, PkFilterEnum filters, const gchar *s
pk_backend_set_status (backend, PK_STATUS_ENUM_QUERY);
poldek_backend_set_allow_cancel (backend, TRUE, TRUE);
+ pb_error_clean ();
data->mode = SEARCH_ENUM_DETAILS;
data->filters = filters;
@@ -1944,6 +2014,7 @@ backend_search_file (PkBackend *backend, PkFilterEnum filters, const gchar *sear
pk_backend_set_status (backend, PK_STATUS_ENUM_QUERY);
poldek_backend_set_allow_cancel (backend, TRUE, TRUE);
+ pb_error_clean ();
data->mode = SEARCH_ENUM_FILE;
data->filters = filters;
@@ -1963,6 +2034,7 @@ backend_search_group (PkBackend *backend, PkFilterEnum filters, const gchar *sea
pk_backend_set_status (backend, PK_STATUS_ENUM_QUERY);
poldek_backend_set_allow_cancel (backend, TRUE, TRUE);
+ pb_error_clean ();
data->mode = SEARCH_ENUM_GROUP;
data->filters = filters;
@@ -1982,6 +2054,7 @@ backend_search_name (PkBackend *backend, PkFilterEnum filters, const gchar *sear
pk_backend_set_status (backend, PK_STATUS_ENUM_QUERY);
poldek_backend_set_allow_cancel (backend, TRUE, TRUE);
+ pb_error_clean ();
data->mode = SEARCH_ENUM_NAME;
data->filters = filters;
@@ -2035,14 +2108,9 @@ backend_update_packages_thread (PkBackendThread *thread, gpointer data)
command = g_strdup_printf ("upgrade %s", nvra);
if (!poclidek_rcmd_execline (rcmd, command)) {
- gchar *error;
+ pb_error_show (backend, PK_ERROR_ENUM_TRANSACTION_ERROR);
- error = g_strdup_printf ("Cannot update %s", nvra);
-
- pk_backend_error_code (backend, PK_ERROR_ENUM_TRANSACTION_ERROR, error);
update_cancelled = TRUE;
-
- g_free (error);
}
g_free (nvra);
@@ -2092,6 +2160,7 @@ backend_update_packages (PkBackend *backend, gchar **package_ids)
}
poldek_backend_set_allow_cancel (backend, FALSE, TRUE);
+ pb_error_clean ();
data->package_ids = g_strdupv (package_ids);
data->pd = g_new0 (PercentageData, 1);
@@ -2168,14 +2237,9 @@ backend_update_system_thread (PkBackendThread *thread, gpointer data)
command = g_strdup_printf ("upgrade %s-%s-%s.%s", pkg->name, pkg->ver, pkg->rel, pkg_arch (pkg));
if (!poclidek_rcmd_execline (rcmd, command)) {
- gchar *error;
+ pb_error_show (backend, PK_ERROR_ENUM_TRANSACTION_ERROR);
- error = g_strdup_printf ("Cannot update %s-%s-%s.%s", pkg->name, pkg->ver, pkg->rel, pkg_arch (pkg));
-
- pk_backend_error_code (backend, PK_ERROR_ENUM_TRANSACTION_ERROR, error);
update_cancelled = TRUE;
-
- g_free (error);
}
g_free (command);
@@ -2221,6 +2285,7 @@ backend_update_system (PkBackend *backend)
}
poldek_backend_set_allow_cancel (backend, FALSE, TRUE);
+ pb_error_clean ();
data->pd = g_new0 (PercentageData, 1);
data->type = TS_TYPE_ENUM_UPDATE;
@@ -2240,6 +2305,7 @@ backend_get_repo_list (PkBackend *backend, PkFilterEnum filters)
pk_backend_set_status (backend, PK_STATUS_ENUM_QUERY);
poldek_backend_set_allow_cancel (backend, FALSE, TRUE);
+ pb_error_clean ();
sources = poldek_get_sources (ctx);
More information about the PackageKit-commit
mailing list