[PackageKit-commit] packagekit: Branch 'master' - 59 commits
Richard Hughes
hughsient at kemper.freedesktop.org
Fri Nov 20 03:50:35 PST 2009
backends/apt/aptBackend.py | 264 ++++-
backends/aptcc/aptcc_show_error.cpp | 2
backends/aptcc/aptcc_show_error.h | 2
backends/dummy/pk-backend-dummy.c | 6
backends/poldek/pk-backend-poldek.c | 8
backends/smart/smartBackend.py | 4
backends/yum/yumBackend.py | 171 ++-
client/pk-console.c | 345 +++++--
client/pk-monitor.c | 12
configure.ac | 1
contrib/browser-plugin/pk-plugin-install.c | 46 -
contrib/command-not-found/pk-command-not-found.c | 32
contrib/debuginfo-install/pk-debuginfo-install.c | 82 -
docs/api/PackageKit-docs.sgml | 28
docs/html/pk-faq.html | 2
docs/migration-glib-to-glib2.txt | 2
lib/packagekit-glib2/Makefile.am | 46 -
lib/packagekit-glib2/packagekit.h | 15
lib/packagekit-glib2/pk-catalog.c | 78 -
lib/packagekit-glib2/pk-category.c | 228 +++++
lib/packagekit-glib2/pk-category.h | 67 +
lib/packagekit-glib2/pk-client-sync.c | 70 -
lib/packagekit-glib2/pk-client.c | 298 ++++--
lib/packagekit-glib2/pk-console-shared.c | 34
lib/packagekit-glib2/pk-control-sync.c | 4
lib/packagekit-glib2/pk-details.c | 245 +++++
lib/packagekit-glib2/pk-details.h | 67 +
lib/packagekit-glib2/pk-distro-upgrade.c | 193 ++++
lib/packagekit-glib2/pk-distro-upgrade.h | 67 +
lib/packagekit-glib2/pk-enum.c | 4
lib/packagekit-glib2/pk-enum.h | 8
lib/packagekit-glib2/pk-error.c | 195 ++++
lib/packagekit-glib2/pk-error.h | 71 +
lib/packagekit-glib2/pk-eula-required.c | 212 ++++
lib/packagekit-glib2/pk-eula-required.h | 67 +
lib/packagekit-glib2/pk-files.c | 178 +++
lib/packagekit-glib2/pk-files.h | 67 +
lib/packagekit-glib2/pk-item.c | 997 ----------------------
lib/packagekit-glib2/pk-item.h | 348 -------
lib/packagekit-glib2/pk-media-change-required.c | 193 ++++
lib/packagekit-glib2/pk-media-change-required.h | 67 +
lib/packagekit-glib2/pk-message.c | 175 +++
lib/packagekit-glib2/pk-message.h | 67 +
lib/packagekit-glib2/pk-package-sack.c | 138 ++-
lib/packagekit-glib2/pk-package.c | 155 ++-
lib/packagekit-glib2/pk-package.h | 7
lib/packagekit-glib2/pk-repo-detail.c | 192 ++++
lib/packagekit-glib2/pk-repo-detail.h | 67 +
lib/packagekit-glib2/pk-repo-signature-required.c | 283 ++++++
lib/packagekit-glib2/pk-repo-signature-required.h | 67 +
lib/packagekit-glib2/pk-require-restart.c | 175 +++
lib/packagekit-glib2/pk-require-restart.h | 67 +
lib/packagekit-glib2/pk-results.c | 223 ++--
lib/packagekit-glib2/pk-results.h | 44
lib/packagekit-glib2/pk-self-test.c | 1
lib/packagekit-glib2/pk-service-pack.c | 55 -
lib/packagekit-glib2/pk-task-sync.c | 10
lib/packagekit-glib2/pk-task-text.c | 132 ++
lib/packagekit-glib2/pk-task-wrapper.c | 60 -
lib/packagekit-glib2/pk-task.c | 77 +
lib/packagekit-glib2/pk-transaction-past.c | 277 ++++++
lib/packagekit-glib2/pk-transaction-past.h | 67 +
lib/packagekit-glib2/pk-update-detail.c | 353 +++++++
lib/packagekit-glib2/pk-update-detail.h | 67 +
lib/python/packagekit/backend.py | 97 +-
lib/python/packagekit/filter.py | 6
po/or.po | 605 ++++++-------
po/te.po | 605 ++++++-------
policy/org.freedesktop.packagekit.policy.in | 2
src/pk-backend-spawn.c | 6
src/pk-backend.c | 376 ++++----
src/pk-backend.h | 2
src/pk-transaction-db.c | 39
src/pk-transaction-extra.c | 64 -
src/pk-transaction.c | 522 ++++++++---
src/run-pk.sh | 12
76 files changed, 6714 insertions(+), 3207 deletions(-)
New commits:
commit f240982f73202185e6e7ec3efd3be311973a2c29
Author: Richard Hughes <richard at hughsie.com>
Date: Fri Nov 20 11:13:33 2009 +0000
Add some additional trivial help in run-pk.sh
diff --git a/src/run-pk.sh b/src/run-pk.sh
index 17207db..923d73a 100755
--- a/src/run-pk.sh
+++ b/src/run-pk.sh
@@ -12,7 +12,19 @@ if [ "$USER" != "root" ]; then
exit 1
fi
+# check some important things are installed systemwide
+if [ ! -e "/etc/dbus-1/system.d/org.freedesktop.PackageKit.conf" ]; then
+ echo "You need to install the DBus policy. Use sudo ../data/org.freedesktop.PackageKit.conf /etc/dbus-1/system.d"
+ exit 1
+fi
+if [ ! -e "/usr/share/polkit-1/actions/org.freedesktop.packagekit.policy" ]; then
+ echo "You need to install the PolicyKit rules. Use sudo ../policy/org.freedesktop.packagekit.policy /usr/share/polkit-1/actions"
+ exit 1
+fi
+
+
if [ "$1x" = "x" ]; then
+ echo "NO BACKEND SPECIFIED, using dummy"
BACKEND=dummy
else
BACKEND=$1
commit 304327c61fa13b31677de04aea8dc9d4eda13c13
Author: Richard Hughes <richard at hughsie.com>
Date: Fri Nov 20 10:51:24 2009 +0000
Correct a few trivial NULL/FALSE mismatches
diff --git a/lib/packagekit-glib2/pk-catalog.c b/lib/packagekit-glib2/pk-catalog.c
index c4e528b..b369e46 100644
--- a/lib/packagekit-glib2/pk-catalog.c
+++ b/lib/packagekit-glib2/pk-catalog.c
@@ -556,14 +556,14 @@ pk_catalog_lookup_finish (PkCatalog *catalog, GAsyncResult *res, GError **error)
{
GSimpleAsyncResult *simple;
- g_return_val_if_fail (PK_IS_CATALOG (catalog), FALSE);
- g_return_val_if_fail (G_IS_SIMPLE_ASYNC_RESULT (res), FALSE);
- g_return_val_if_fail (error == NULL || *error == NULL, FALSE);
+ g_return_val_if_fail (PK_IS_CATALOG (catalog), NULL);
+ g_return_val_if_fail (G_IS_SIMPLE_ASYNC_RESULT (res), NULL);
+ g_return_val_if_fail (error == NULL || *error == NULL, NULL);
simple = G_SIMPLE_ASYNC_RESULT (res);
if (g_simple_async_result_propagate_error (simple, error))
- return FALSE;
+ return NULL;
return g_ptr_array_ref (g_simple_async_result_get_op_res_gpointer (simple));
}
diff --git a/lib/packagekit-glib2/pk-client-sync.c b/lib/packagekit-glib2/pk-client-sync.c
index 945fcc9..44a5427 100644
--- a/lib/packagekit-glib2/pk-client-sync.c
+++ b/lib/packagekit-glib2/pk-client-sync.c
@@ -81,7 +81,7 @@ pk_client_resolve (PkClient *client, PkBitfield filters, gchar **packages, GCanc
PkResults *results;
g_return_val_if_fail (PK_IS_CLIENT (client), NULL);
- g_return_val_if_fail (error == NULL || *error == NULL, FALSE);
+ g_return_val_if_fail (error == NULL || *error == NULL, NULL);
/* create temp object */
helper = g_new0 (PkClientHelper, 1);
@@ -129,7 +129,7 @@ pk_client_search_name (PkClient *client, PkBitfield filters, gchar **values, GCa
PkResults *results;
g_return_val_if_fail (PK_IS_CLIENT (client), NULL);
- g_return_val_if_fail (error == NULL || *error == NULL, FALSE);
+ g_return_val_if_fail (error == NULL || *error == NULL, NULL);
/* create temp object */
helper = g_new0 (PkClientHelper, 1);
@@ -178,7 +178,7 @@ pk_client_search_details (PkClient *client, PkBitfield filters, gchar **values,
PkResults *results;
g_return_val_if_fail (PK_IS_CLIENT (client), NULL);
- g_return_val_if_fail (error == NULL || *error == NULL, FALSE);
+ g_return_val_if_fail (error == NULL || *error == NULL, NULL);
/* create temp object */
helper = g_new0 (PkClientHelper, 1);
@@ -225,7 +225,7 @@ pk_client_search_group (PkClient *client, PkBitfield filters, gchar **values, GC
PkResults *results;
g_return_val_if_fail (PK_IS_CLIENT (client), NULL);
- g_return_val_if_fail (error == NULL || *error == NULL, FALSE);
+ g_return_val_if_fail (error == NULL || *error == NULL, NULL);
/* create temp object */
helper = g_new0 (PkClientHelper, 1);
@@ -272,7 +272,7 @@ pk_client_search_file (PkClient *client, PkBitfield filters, gchar **values, GCa
PkResults *results;
g_return_val_if_fail (PK_IS_CLIENT (client), NULL);
- g_return_val_if_fail (error == NULL || *error == NULL, FALSE);
+ g_return_val_if_fail (error == NULL || *error == NULL, NULL);
/* create temp object */
helper = g_new0 (PkClientHelper, 1);
@@ -319,7 +319,7 @@ pk_client_get_details (PkClient *client, gchar **package_ids, GCancellable *canc
PkResults *results;
g_return_val_if_fail (PK_IS_CLIENT (client), NULL);
- g_return_val_if_fail (error == NULL || *error == NULL, FALSE);
+ g_return_val_if_fail (error == NULL || *error == NULL, NULL);
/* create temp object */
helper = g_new0 (PkClientHelper, 1);
@@ -366,7 +366,7 @@ pk_client_get_update_detail (PkClient *client, gchar **package_ids, GCancellable
PkResults *results;
g_return_val_if_fail (PK_IS_CLIENT (client), NULL);
- g_return_val_if_fail (error == NULL || *error == NULL, FALSE);
+ g_return_val_if_fail (error == NULL || *error == NULL, NULL);
/* create temp object */
helper = g_new0 (PkClientHelper, 1);
@@ -413,7 +413,7 @@ pk_client_download_packages (PkClient *client, gchar **package_ids, const gchar
PkResults *results;
g_return_val_if_fail (PK_IS_CLIENT (client), NULL);
- g_return_val_if_fail (error == NULL || *error == NULL, FALSE);
+ g_return_val_if_fail (error == NULL || *error == NULL, NULL);
/* create temp object */
helper = g_new0 (PkClientHelper, 1);
@@ -459,7 +459,7 @@ pk_client_get_updates (PkClient *client, PkBitfield filters, GCancellable *cance
PkResults *results;
g_return_val_if_fail (PK_IS_CLIENT (client), NULL);
- g_return_val_if_fail (error == NULL || *error == NULL, FALSE);
+ g_return_val_if_fail (error == NULL || *error == NULL, NULL);
/* create temp object */
helper = g_new0 (PkClientHelper, 1);
@@ -505,7 +505,7 @@ pk_client_get_old_transactions (PkClient *client, guint number, GCancellable *ca
PkResults *results;
g_return_val_if_fail (PK_IS_CLIENT (client), NULL);
- g_return_val_if_fail (error == NULL || *error == NULL, FALSE);
+ g_return_val_if_fail (error == NULL || *error == NULL, NULL);
/* create temp object */
helper = g_new0 (PkClientHelper, 1);
@@ -556,7 +556,7 @@ pk_client_update_system (PkClient *client, gboolean only_trusted, GCancellable *
PkResults *results;
g_return_val_if_fail (PK_IS_CLIENT (client), NULL);
- g_return_val_if_fail (error == NULL || *error == NULL, FALSE);
+ g_return_val_if_fail (error == NULL || *error == NULL, NULL);
/* create temp object */
helper = g_new0 (PkClientHelper, 1);
@@ -604,7 +604,7 @@ pk_client_get_depends (PkClient *client, PkBitfield filters, gchar **package_ids
PkResults *results;
g_return_val_if_fail (PK_IS_CLIENT (client), NULL);
- g_return_val_if_fail (error == NULL || *error == NULL, FALSE);
+ g_return_val_if_fail (error == NULL || *error == NULL, NULL);
/* create temp object */
helper = g_new0 (PkClientHelper, 1);
@@ -650,7 +650,7 @@ pk_client_get_packages (PkClient *client, PkBitfield filters, GCancellable *canc
PkResults *results;
g_return_val_if_fail (PK_IS_CLIENT (client), NULL);
- g_return_val_if_fail (error == NULL || *error == NULL, FALSE);
+ g_return_val_if_fail (error == NULL || *error == NULL, NULL);
/* create temp object */
helper = g_new0 (PkClientHelper, 1);
@@ -698,7 +698,7 @@ pk_client_get_requires (PkClient *client, PkBitfield filters, gchar **package_id
PkResults *results;
g_return_val_if_fail (PK_IS_CLIENT (client), NULL);
- g_return_val_if_fail (error == NULL || *error == NULL, FALSE);
+ g_return_val_if_fail (error == NULL || *error == NULL, NULL);
/* create temp object */
helper = g_new0 (PkClientHelper, 1);
@@ -748,7 +748,7 @@ pk_client_what_provides (PkClient *client, PkBitfield filters, PkProvidesEnum pr
PkResults *results;
g_return_val_if_fail (PK_IS_CLIENT (client), NULL);
- g_return_val_if_fail (error == NULL || *error == NULL, FALSE);
+ g_return_val_if_fail (error == NULL || *error == NULL, NULL);
/* create temp object */
helper = g_new0 (PkClientHelper, 1);
@@ -794,7 +794,7 @@ pk_client_get_distro_upgrades (PkClient *client, GCancellable *cancellable,
PkResults *results;
g_return_val_if_fail (PK_IS_CLIENT (client), NULL);
- g_return_val_if_fail (error == NULL || *error == NULL, FALSE);
+ g_return_val_if_fail (error == NULL || *error == NULL, NULL);
/* create temp object */
helper = g_new0 (PkClientHelper, 1);
@@ -840,7 +840,7 @@ pk_client_get_files (PkClient *client, gchar **package_ids, GCancellable *cancel
PkResults *results;
g_return_val_if_fail (PK_IS_CLIENT (client), NULL);
- g_return_val_if_fail (error == NULL || *error == NULL, FALSE);
+ g_return_val_if_fail (error == NULL || *error == NULL, NULL);
/* create temp object */
helper = g_new0 (PkClientHelper, 1);
@@ -885,7 +885,7 @@ pk_client_get_categories (PkClient *client, GCancellable *cancellable,
PkResults *results;
g_return_val_if_fail (PK_IS_CLIENT (client), NULL);
- g_return_val_if_fail (error == NULL || *error == NULL, FALSE);
+ g_return_val_if_fail (error == NULL || *error == NULL, NULL);
/* create temp object */
helper = g_new0 (PkClientHelper, 1);
@@ -935,7 +935,7 @@ pk_client_remove_packages (PkClient *client, gchar **package_ids, gboolean allow
PkResults *results;
g_return_val_if_fail (PK_IS_CLIENT (client), NULL);
- g_return_val_if_fail (error == NULL || *error == NULL, FALSE);
+ g_return_val_if_fail (error == NULL || *error == NULL, NULL);
/* create temp object */
helper = g_new0 (PkClientHelper, 1);
@@ -984,7 +984,7 @@ pk_client_refresh_cache (PkClient *client, gboolean force, GCancellable *cancell
PkResults *results;
g_return_val_if_fail (PK_IS_CLIENT (client), NULL);
- g_return_val_if_fail (error == NULL || *error == NULL, FALSE);
+ g_return_val_if_fail (error == NULL || *error == NULL, NULL);
/* create temp object */
helper = g_new0 (PkClientHelper, 1);
@@ -1031,7 +1031,7 @@ pk_client_install_packages (PkClient *client, gboolean only_trusted, gchar **pac
PkResults *results;
g_return_val_if_fail (PK_IS_CLIENT (client), NULL);
- g_return_val_if_fail (error == NULL || *error == NULL, FALSE);
+ g_return_val_if_fail (error == NULL || *error == NULL, NULL);
/* create temp object */
helper = g_new0 (PkClientHelper, 1);
@@ -1079,7 +1079,7 @@ pk_client_install_signature (PkClient *client, PkSigTypeEnum type, const gchar *
PkResults *results;
g_return_val_if_fail (PK_IS_CLIENT (client), NULL);
- g_return_val_if_fail (error == NULL || *error == NULL, FALSE);
+ g_return_val_if_fail (error == NULL || *error == NULL, NULL);
/* create temp object */
helper = g_new0 (PkClientHelper, 1);
@@ -1126,7 +1126,7 @@ pk_client_update_packages (PkClient *client, gboolean only_trusted, gchar **pack
PkResults *results;
g_return_val_if_fail (PK_IS_CLIENT (client), NULL);
- g_return_val_if_fail (error == NULL || *error == NULL, FALSE);
+ g_return_val_if_fail (error == NULL || *error == NULL, NULL);
/* create temp object */
helper = g_new0 (PkClientHelper, 1);
@@ -1174,7 +1174,7 @@ pk_client_install_files (PkClient *client, gboolean only_trusted, gchar **files,
PkResults *results;
g_return_val_if_fail (PK_IS_CLIENT (client), NULL);
- g_return_val_if_fail (error == NULL || *error == NULL, FALSE);
+ g_return_val_if_fail (error == NULL || *error == NULL, NULL);
/* create temp object */
helper = g_new0 (PkClientHelper, 1);
@@ -1220,7 +1220,7 @@ pk_client_accept_eula (PkClient *client, const gchar *eula_id, GCancellable *can
PkResults *results;
g_return_val_if_fail (PK_IS_CLIENT (client), NULL);
- g_return_val_if_fail (error == NULL || *error == NULL, FALSE);
+ g_return_val_if_fail (error == NULL || *error == NULL, NULL);
/* create temp object */
helper = g_new0 (PkClientHelper, 1);
@@ -1266,7 +1266,7 @@ pk_client_rollback (PkClient *client, const gchar *transaction_id, GCancellable
PkResults *results;
g_return_val_if_fail (PK_IS_CLIENT (client), NULL);
- g_return_val_if_fail (error == NULL || *error == NULL, FALSE);
+ g_return_val_if_fail (error == NULL || *error == NULL, NULL);
/* create temp object */
helper = g_new0 (PkClientHelper, 1);
@@ -1312,7 +1312,7 @@ pk_client_get_repo_list (PkClient *client, PkBitfield filters, GCancellable *can
PkResults *results;
g_return_val_if_fail (PK_IS_CLIENT (client), NULL);
- g_return_val_if_fail (error == NULL || *error == NULL, FALSE);
+ g_return_val_if_fail (error == NULL || *error == NULL, NULL);
/* create temp object */
helper = g_new0 (PkClientHelper, 1);
@@ -1359,7 +1359,7 @@ pk_client_repo_enable (PkClient *client, const gchar *repo_id, gboolean enabled,
PkResults *results;
g_return_val_if_fail (PK_IS_CLIENT (client), NULL);
- g_return_val_if_fail (error == NULL || *error == NULL, FALSE);
+ g_return_val_if_fail (error == NULL || *error == NULL, NULL);
/* create temp object */
helper = g_new0 (PkClientHelper, 1);
@@ -1408,7 +1408,7 @@ pk_client_repo_set_data (PkClient *client, const gchar *repo_id, const gchar *pa
PkResults *results;
g_return_val_if_fail (PK_IS_CLIENT (client), NULL);
- g_return_val_if_fail (error == NULL || *error == NULL, FALSE);
+ g_return_val_if_fail (error == NULL || *error == NULL, NULL);
/* create temp object */
helper = g_new0 (PkClientHelper, 1);
@@ -1455,7 +1455,7 @@ pk_client_simulate_install_files (PkClient *client, gchar **files, GCancellable
PkResults *results;
g_return_val_if_fail (PK_IS_CLIENT (client), NULL);
- g_return_val_if_fail (error == NULL || *error == NULL, FALSE);
+ g_return_val_if_fail (error == NULL || *error == NULL, NULL);
/* create temp object */
helper = g_new0 (PkClientHelper, 1);
@@ -1501,7 +1501,7 @@ pk_client_simulate_install_packages (PkClient *client, gchar **package_ids, GCan
PkResults *results;
g_return_val_if_fail (PK_IS_CLIENT (client), NULL);
- g_return_val_if_fail (error == NULL || *error == NULL, FALSE);
+ g_return_val_if_fail (error == NULL || *error == NULL, NULL);
/* create temp object */
helper = g_new0 (PkClientHelper, 1);
@@ -1547,7 +1547,7 @@ pk_client_simulate_remove_packages (PkClient *client, gchar **package_ids, GCanc
PkResults *results;
g_return_val_if_fail (PK_IS_CLIENT (client), NULL);
- g_return_val_if_fail (error == NULL || *error == NULL, FALSE);
+ g_return_val_if_fail (error == NULL || *error == NULL, NULL);
/* create temp object */
helper = g_new0 (PkClientHelper, 1);
@@ -1593,7 +1593,7 @@ pk_client_simulate_update_packages (PkClient *client, gchar **package_ids, GCanc
PkResults *results;
g_return_val_if_fail (PK_IS_CLIENT (client), NULL);
- g_return_val_if_fail (error == NULL || *error == NULL, FALSE);
+ g_return_val_if_fail (error == NULL || *error == NULL, NULL);
/* create temp object */
helper = g_new0 (PkClientHelper, 1);
@@ -1639,7 +1639,7 @@ pk_client_adopt (PkClient *client, const gchar *transaction_id, GCancellable *ca
PkResults *results;
g_return_val_if_fail (PK_IS_CLIENT (client), NULL);
- g_return_val_if_fail (error == NULL || *error == NULL, FALSE);
+ g_return_val_if_fail (error == NULL || *error == NULL, NULL);
/* create temp object */
helper = g_new0 (PkClientHelper, 1);
@@ -1699,7 +1699,7 @@ pk_client_get_progress (PkClient *client, const gchar *transaction_id, GCancella
PkProgress *progress;
g_return_val_if_fail (PK_IS_CLIENT (client), NULL);
- g_return_val_if_fail (error == NULL || *error == NULL, FALSE);
+ g_return_val_if_fail (error == NULL || *error == NULL, NULL);
/* create temp object */
helper = g_new0 (PkClientHelper, 1);
diff --git a/lib/packagekit-glib2/pk-client.c b/lib/packagekit-glib2/pk-client.c
index 790516a..ac6cc0a 100644
--- a/lib/packagekit-glib2/pk-client.c
+++ b/lib/packagekit-glib2/pk-client.c
@@ -1816,7 +1816,7 @@ pk_client_generic_finish (PkClient *client, GAsyncResult *res, GError **error)
g_return_val_if_fail (PK_IS_CLIENT (client), NULL);
g_return_val_if_fail (G_IS_SIMPLE_ASYNC_RESULT (res), NULL);
- g_return_val_if_fail (error == NULL || *error == NULL, FALSE);
+ g_return_val_if_fail (error == NULL || *error == NULL, NULL);
simple = G_SIMPLE_ASYNC_RESULT (res);
if (g_simple_async_result_propagate_error (simple, error))
@@ -3642,7 +3642,7 @@ pk_client_get_progress_finish (PkClient *client, GAsyncResult *res, GError **err
g_return_val_if_fail (PK_IS_CLIENT (client), NULL);
g_return_val_if_fail (G_IS_SIMPLE_ASYNC_RESULT (res), NULL);
- g_return_val_if_fail (error == NULL || *error == NULL, FALSE);
+ g_return_val_if_fail (error == NULL || *error == NULL, NULL);
simple = G_SIMPLE_ASYNC_RESULT (res);
if (g_simple_async_result_propagate_error (simple, error))
diff --git a/lib/packagekit-glib2/pk-control-sync.c b/lib/packagekit-glib2/pk-control-sync.c
index 23976cd..a69c147 100644
--- a/lib/packagekit-glib2/pk-control-sync.c
+++ b/lib/packagekit-glib2/pk-control-sync.c
@@ -119,8 +119,8 @@ pk_control_get_transaction_list (PkControl *control, GCancellable *cancellable,
gchar **transaction_list;
PkControlHelper *helper;
- g_return_val_if_fail (PK_IS_CONTROL (control), FALSE);
- g_return_val_if_fail (error == NULL || *error == NULL, FALSE);
+ g_return_val_if_fail (PK_IS_CONTROL (control), NULL);
+ g_return_val_if_fail (error == NULL || *error == NULL, NULL);
/* create temp object */
helper = g_new0 (PkControlHelper, 1);
diff --git a/lib/packagekit-glib2/pk-package-sack.c b/lib/packagekit-glib2/pk-package-sack.c
index 3074904..c26147f 100644
--- a/lib/packagekit-glib2/pk-package-sack.c
+++ b/lib/packagekit-glib2/pk-package-sack.c
@@ -133,7 +133,7 @@ pk_package_sack_get_index (PkPackageSack *sack, guint i)
{
PkPackage *package = NULL;
- g_return_val_if_fail (PK_IS_PACKAGE_SACK (sack), FALSE);
+ g_return_val_if_fail (PK_IS_PACKAGE_SACK (sack), NULL);
/* index invalid */
if (i >= sack->priv->array->len)
@@ -277,8 +277,8 @@ pk_package_sack_find_by_id (PkPackageSack *sack, const gchar *package_id)
guint i;
guint len;
- g_return_val_if_fail (PK_IS_PACKAGE_SACK (sack), FALSE);
- g_return_val_if_fail (package_id != NULL, FALSE);
+ g_return_val_if_fail (PK_IS_PACKAGE_SACK (sack), NULL);
+ g_return_val_if_fail (package_id != NULL, NULL);
len = sack->priv->array->len;
for (i=0; i<len; i++) {
diff --git a/lib/packagekit-glib2/pk-package.c b/lib/packagekit-glib2/pk-package.c
index 10623b4..0f8f5c9 100644
--- a/lib/packagekit-glib2/pk-package.c
+++ b/lib/packagekit-glib2/pk-package.c
@@ -218,7 +218,7 @@ pk_package_get_info (PkPackage *package)
const gchar *
pk_package_get_id (PkPackage *package)
{
- g_return_val_if_fail (PK_IS_PACKAGE (package), FALSE);
+ g_return_val_if_fail (PK_IS_PACKAGE (package), NULL);
return package->priv->package_id;
}
@@ -233,7 +233,7 @@ pk_package_get_id (PkPackage *package)
const gchar *
pk_package_get_summary (PkPackage *package)
{
- g_return_val_if_fail (PK_IS_PACKAGE (package), FALSE);
+ g_return_val_if_fail (PK_IS_PACKAGE (package), NULL);
return package->priv->summary;
}
diff --git a/lib/packagekit-glib2/pk-results.c b/lib/packagekit-glib2/pk-results.c
index 5823299..98b5715 100644
--- a/lib/packagekit-glib2/pk-results.c
+++ b/lib/packagekit-glib2/pk-results.c
@@ -53,7 +53,7 @@ struct _PkResultsPrivate
guint inputs;
PkProgress *progress;
PkExitEnum exit_enum;
- PkError *error_code;
+ PkError *error_code;
GPtrArray *package_array;
GPtrArray *details_array;
GPtrArray *update_detail_array;
@@ -474,7 +474,7 @@ pk_results_get_exit_code (PkResults *results)
PkError *
pk_results_get_error_code (PkResults *results)
{
- g_return_val_if_fail (PK_IS_RESULTS (results), FALSE);
+ g_return_val_if_fail (PK_IS_RESULTS (results), NULL);
/* failed, but no exit code? */
if (results->priv->error_code == NULL && results->priv->exit_enum != PK_EXIT_ENUM_SUCCESS)
@@ -496,7 +496,7 @@ pk_results_get_error_code (PkResults *results)
GPtrArray *
pk_results_get_package_array (PkResults *results)
{
- g_return_val_if_fail (PK_IS_RESULTS (results), FALSE);
+ g_return_val_if_fail (PK_IS_RESULTS (results), NULL);
return g_ptr_array_ref (results->priv->package_array);
}
@@ -543,7 +543,7 @@ pk_results_get_package_sack (PkResults *results)
GPtrArray *
pk_results_get_details_array (PkResults *results)
{
- g_return_val_if_fail (PK_IS_RESULTS (results), FALSE);
+ g_return_val_if_fail (PK_IS_RESULTS (results), NULL);
return g_ptr_array_ref (results->priv->details_array);
}
@@ -558,7 +558,7 @@ pk_results_get_details_array (PkResults *results)
GPtrArray *
pk_results_get_update_detail_array (PkResults *results)
{
- g_return_val_if_fail (PK_IS_RESULTS (results), FALSE);
+ g_return_val_if_fail (PK_IS_RESULTS (results), NULL);
return g_ptr_array_ref (results->priv->update_detail_array);
}
@@ -573,7 +573,7 @@ pk_results_get_update_detail_array (PkResults *results)
GPtrArray *
pk_results_get_category_array (PkResults *results)
{
- g_return_val_if_fail (PK_IS_RESULTS (results), FALSE);
+ g_return_val_if_fail (PK_IS_RESULTS (results), NULL);
return g_ptr_array_ref (results->priv->category_array);
}
@@ -588,7 +588,7 @@ pk_results_get_category_array (PkResults *results)
GPtrArray *
pk_results_get_distro_upgrade_array (PkResults *results)
{
- g_return_val_if_fail (PK_IS_RESULTS (results), FALSE);
+ g_return_val_if_fail (PK_IS_RESULTS (results), NULL);
return g_ptr_array_ref (results->priv->distro_upgrade_array);
}
@@ -603,7 +603,7 @@ pk_results_get_distro_upgrade_array (PkResults *results)
GPtrArray *
pk_results_get_require_restart_array (PkResults *results)
{
- g_return_val_if_fail (PK_IS_RESULTS (results), FALSE);
+ g_return_val_if_fail (PK_IS_RESULTS (results), NULL);
return g_ptr_array_ref (results->priv->require_restart_array);
}
@@ -656,7 +656,7 @@ pk_results_get_require_restart_worst (PkResults *results)
GPtrArray *
pk_results_get_transaction_array (PkResults *results)
{
- g_return_val_if_fail (PK_IS_RESULTS (results), FALSE);
+ g_return_val_if_fail (PK_IS_RESULTS (results), NULL);
return g_ptr_array_ref (results->priv->transaction_array);
}
@@ -671,7 +671,7 @@ pk_results_get_transaction_array (PkResults *results)
GPtrArray *
pk_results_get_files_array (PkResults *results)
{
- g_return_val_if_fail (PK_IS_RESULTS (results), FALSE);
+ g_return_val_if_fail (PK_IS_RESULTS (results), NULL);
return g_ptr_array_ref (results->priv->files_array);
}
@@ -686,7 +686,7 @@ pk_results_get_files_array (PkResults *results)
GPtrArray *
pk_results_get_repo_signature_required_array (PkResults *results)
{
- g_return_val_if_fail (PK_IS_RESULTS (results), FALSE);
+ g_return_val_if_fail (PK_IS_RESULTS (results), NULL);
return g_ptr_array_ref (results->priv->repo_signature_required_array);
}
@@ -701,7 +701,7 @@ pk_results_get_repo_signature_required_array (PkResults *results)
GPtrArray *
pk_results_get_eula_required_array (PkResults *results)
{
- g_return_val_if_fail (PK_IS_RESULTS (results), FALSE);
+ g_return_val_if_fail (PK_IS_RESULTS (results), NULL);
return g_ptr_array_ref (results->priv->eula_required_array);
}
@@ -716,7 +716,7 @@ pk_results_get_eula_required_array (PkResults *results)
GPtrArray *
pk_results_get_media_change_required_array (PkResults *results)
{
- g_return_val_if_fail (PK_IS_RESULTS (results), FALSE);
+ g_return_val_if_fail (PK_IS_RESULTS (results), NULL);
return g_ptr_array_ref (results->priv->media_change_required_array);
}
@@ -731,7 +731,7 @@ pk_results_get_media_change_required_array (PkResults *results)
GPtrArray *
pk_results_get_repo_detail_array (PkResults *results)
{
- g_return_val_if_fail (PK_IS_RESULTS (results), FALSE);
+ g_return_val_if_fail (PK_IS_RESULTS (results), NULL);
return g_ptr_array_ref (results->priv->repo_detail_array);
}
@@ -746,7 +746,7 @@ pk_results_get_repo_detail_array (PkResults *results)
GPtrArray *
pk_results_get_message_array (PkResults *results)
{
- g_return_val_if_fail (PK_IS_RESULTS (results), FALSE);
+ g_return_val_if_fail (PK_IS_RESULTS (results), NULL);
return g_ptr_array_ref (results->priv->message_array);
}
diff --git a/lib/packagekit-glib2/pk-task-sync.c b/lib/packagekit-glib2/pk-task-sync.c
index 24c54a5..3c5a1e9 100644
--- a/lib/packagekit-glib2/pk-task-sync.c
+++ b/lib/packagekit-glib2/pk-task-sync.c
@@ -83,7 +83,7 @@ pk_task_update_system_sync (PkTask *task, GCancellable *cancellable,
PkResults *results;
g_return_val_if_fail (PK_IS_TASK (task), NULL);
- g_return_val_if_fail (error == NULL || *error == NULL, FALSE);
+ g_return_val_if_fail (error == NULL || *error == NULL, NULL);
/* create temp object */
helper = g_new0 (PkTaskHelper, 1);
@@ -133,7 +133,7 @@ pk_task_remove_packages_sync (PkTask *task, gchar **package_ids, gboolean allow_
PkResults *results;
g_return_val_if_fail (PK_IS_TASK (task), NULL);
- g_return_val_if_fail (error == NULL || *error == NULL, FALSE);
+ g_return_val_if_fail (error == NULL || *error == NULL, NULL);
/* create temp object */
helper = g_new0 (PkTaskHelper, 1);
@@ -179,7 +179,7 @@ pk_task_install_packages_sync (PkTask *task, gchar **package_ids, GCancellable *
PkResults *results;
g_return_val_if_fail (PK_IS_TASK (task), NULL);
- g_return_val_if_fail (error == NULL || *error == NULL, FALSE);
+ g_return_val_if_fail (error == NULL || *error == NULL, NULL);
/* create temp object */
helper = g_new0 (PkTaskHelper, 1);
@@ -225,7 +225,7 @@ pk_task_update_packages_sync (PkTask *task, gchar **package_ids, GCancellable *c
PkResults *results;
g_return_val_if_fail (PK_IS_TASK (task), NULL);
- g_return_val_if_fail (error == NULL || *error == NULL, FALSE);
+ g_return_val_if_fail (error == NULL || *error == NULL, NULL);
/* create temp object */
helper = g_new0 (PkTaskHelper, 1);
@@ -272,7 +272,7 @@ pk_task_install_files_sync (PkTask *task, gchar **files, GCancellable *cancellab
PkResults *results;
g_return_val_if_fail (PK_IS_TASK (task), NULL);
- g_return_val_if_fail (error == NULL || *error == NULL, FALSE);
+ g_return_val_if_fail (error == NULL || *error == NULL, NULL);
/* create temp object */
helper = g_new0 (PkTaskHelper, 1);
diff --git a/lib/packagekit-glib2/pk-task.c b/lib/packagekit-glib2/pk-task.c
index eb6b6e4..62b960d 100644
--- a/lib/packagekit-glib2/pk-task.c
+++ b/lib/packagekit-glib2/pk-task.c
@@ -105,8 +105,8 @@ pk_task_find_by_request (PkTask *task, guint request)
guint i;
GPtrArray *array;
- g_return_val_if_fail (PK_IS_TASK (task), FALSE);
- g_return_val_if_fail (request != 0, FALSE);
+ g_return_val_if_fail (PK_IS_TASK (task), NULL);
+ g_return_val_if_fail (request != 0, NULL);
array = task->priv->array;
for (i=0; i<array->len; i++) {
@@ -1028,14 +1028,14 @@ pk_task_generic_finish (PkTask *task, GAsyncResult *res, GError **error)
{
GSimpleAsyncResult *simple;
- g_return_val_if_fail (PK_IS_TASK (task), FALSE);
- g_return_val_if_fail (G_IS_SIMPLE_ASYNC_RESULT (res), FALSE);
- g_return_val_if_fail (error == NULL || *error == NULL, FALSE);
+ g_return_val_if_fail (PK_IS_TASK (task), NULL);
+ g_return_val_if_fail (G_IS_SIMPLE_ASYNC_RESULT (res), NULL);
+ g_return_val_if_fail (error == NULL || *error == NULL, NULL);
simple = G_SIMPLE_ASYNC_RESULT (res);
if (g_simple_async_result_propagate_error (simple, error))
- return FALSE;
+ return NULL;
return g_object_ref (g_simple_async_result_get_op_res_gpointer (simple));
}
commit 3d3513e5628e4d992e4c9204d26bf82c15227025
Author: Richard Hughes <richard at hughsie.com>
Date: Thu Nov 19 20:00:17 2009 +0000
Switch the signed install permission to require the root password
Switch the signed package install required authentication to be auth_admin_keep
by default, other distributions with different useability tradeoffs can override
this with pkla files where required.
diff --git a/policy/org.freedesktop.packagekit.policy.in b/policy/org.freedesktop.packagekit.policy.in
index e5e5522..b514a71 100644
--- a/policy/org.freedesktop.packagekit.policy.in
+++ b/policy/org.freedesktop.packagekit.policy.in
@@ -42,7 +42,7 @@
<defaults>
<allow_any>no</allow_any>
<allow_inactive>no</allow_inactive>
- <allow_active>yes</allow_active>
+ <allow_active>auth_admin_keep</allow_active>
</defaults>
</action>
commit 6774f1af0c2354e5463967ed1e5e9bdd8c57494a
Merge: f658735... c17314a...
Author: Richard Hughes <richard at hughsie.com>
Date: Thu Nov 19 16:38:15 2009 +0000
Merge branch 'master' of git+ssh://git.packagekit.org/srv/git/PackageKit
commit c17314a388bbd6deb7c61e92687b78a2b944bb76
Author: Anders F Bjorklund <afb at users.sourceforge.net>
Date: Thu Nov 19 17:15:57 2009 +0100
smart: fix syntax error typo with only_trusted
diff --git a/backends/smart/smartBackend.py b/backends/smart/smartBackend.py
index af61888..3a89e94 100755
--- a/backends/smart/smartBackend.py
+++ b/backends/smart/smartBackend.py
@@ -172,7 +172,6 @@ class PackageKitSmartBackend(PackageKitBaseBackend):
if only_trusted:
self.error(ERROR_MISSING_GPG_SIGNATURE, "Trusted packages not available.")
return
- end
packages = []
for packageid in packageids:
ratio, results, suggestions = self._search_packageid(packageid)
@@ -209,7 +208,6 @@ class PackageKitSmartBackend(PackageKitBaseBackend):
if only_trusted:
self.error(ERROR_MISSING_GPG_SIGNATURE, "Trusted packages not available.")
return
- end
for path in paths:
self.ctrl.addFileChannel(path)
self.ctrl.reloadChannels()
@@ -273,7 +271,6 @@ class PackageKitSmartBackend(PackageKitBaseBackend):
if only_trusted:
self.error(ERROR_MISSING_GPG_SIGNATURE, "Trusted packages not available.")
return
- end
packages = []
for packageid in packageids:
ratio, results, suggestions = self._search_packageid(packageid)
@@ -325,7 +322,6 @@ class PackageKitSmartBackend(PackageKitBaseBackend):
if only_trusted:
self.error(ERROR_MISSING_GPG_SIGNATURE, "Trusted packages not available.")
return
- end
self.status(STATUS_INFO)
cache = self.ctrl.getCache()
commit f658735d6f9578ab6a3f9e92aa7bd7ceaf5f7390
Author: Richard Hughes <richard at hughsie.com>
Date: Wed Nov 18 15:14:11 2009 +0000
yum: throw errors from _findPackage which mackes it much easier to report (and ignore) different types of errors
diff --git a/backends/yum/yumBackend.py b/backends/yum/yumBackend.py
index dec66a6..840cfd8 100755
--- a/backends/yum/yumBackend.py
+++ b/backends/yum/yumBackend.py
@@ -891,7 +891,11 @@ class PackageKitYumBackend(PackageKitBaseBackend, PackagekitPackage):
# download each package
for package_id in package_ids:
self.percentage(percentage)
- pkg, inst = self._findPackage(package_id)
+ try:
+ pkg, inst = self._findPackage(package_id)
+ except PkError, e:
+ self.error(e.code, e.details, exit=True)
+ return
# if we couldn't map package_id -> pkg
if not pkg:
self.message(MESSAGE_COULD_NOT_FIND_PACKAGE, "Could not find the package %s" % package_id)
@@ -977,8 +981,7 @@ class PackageKitYumBackend(PackageKitBaseBackend, PackagekitPackage):
# is this an real id?
if len(package_id.split(';')) <= 1:
- self.error(ERROR_PACKAGE_ID_INVALID, "package_id '%s' cannot be parsed" % package_id)
- return
+ raise PkError(ERROR_PACKAGE_ID_INVALID, "package_id '%s' cannot be parsed" % _format_package_id(package_id))
# Split up the id
(n, idver, a, repo) = self.get_package_from_id(package_id)
@@ -990,7 +993,7 @@ class PackageKitYumBackend(PackageKitBaseBackend, PackagekitPackage):
try:
pkgs = self.yumbase.rpmdb.searchNevra(name=n, epoch=e, ver=v, rel=r, arch=a)
except Exception, e:
- self.error(ERROR_INTERNAL_ERROR, _format_str(traceback.format_exc()))
+ raise PkError(ERROR_INTERNAL_ERROR, _format_str(traceback.format_exc()))
# if the package is found, then return it (do not have to match the repo_id)
if len(pkgs) != 0:
return pkgs[0], True
@@ -1000,38 +1003,31 @@ class PackageKitYumBackend(PackageKitBaseBackend, PackagekitPackage):
try:
repos = self.yumbase.repos.findRepos(repo)
except Exception, e:
- self.error(ERROR_INTERNAL_ERROR, _format_str(traceback.format_exc()))
- return None, False
+ raise PkError(ERROR_INTERNAL_ERROR, _format_str(traceback.format_exc()))
if len(repos) == 0:
- self.error(ERROR_REPO_NOT_FOUND, "cannot find repo %s" % repo)
- return None, False
+ raise PkError(ERROR_REPO_NOT_FOUND, "cannot find repo %s" % repo)
# the repo might have been disabled if it is no longer contactable
if not repos[0].isEnabled():
- self.message(MESSAGE_COULD_NOT_FIND_PACKAGE, '%s cannot be found as %s is disabled' % (n, repos[0].id))
- return None, False
+ raise PkError(ERROR_PACKAGE_NOT_FOUND, '%s cannot be found as %s is disabled' % (_format_package_id(package_id), repos[0].id))
# populate the sack with data
try:
self.yumbase.repos.populateSack(repo)
except Exception, e:
- self.error(ERROR_INTERNAL_ERROR, _format_str(traceback.format_exc()))
- return None, False
+ raise PkError(ERROR_INTERNAL_ERROR, _format_str(traceback.format_exc()))
# search the pkgSack for the nevra
try:
pkgs = repos[0].sack.searchNevra(name=n, epoch=e, ver=v, rel=r, arch=a)
except yum.Errors.RepoError, e:
- self.error(ERROR_REPO_NOT_AVAILABLE, _to_unicode(e))
- return None, False
+ raise PkError(ERROR_REPO_NOT_AVAILABLE, _to_unicode(e))
except Exception, e:
- self.error(ERROR_INTERNAL_ERROR, _format_str(traceback.format_exc()))
- return None, False
+ raise PkError(ERROR_INTERNAL_ERROR, _format_str(traceback.format_exc()))
# multiple entries
if len(pkgs) > 1:
- self.error(ERROR_INTERNAL_ERROR, "more than one package match for %s" % _format_package_id(package_id))
- return pkgs[0], False
+ raise PkError(ERROR_INTERNAL_ERROR, "more than one package match for %s" % _format_package_id(package_id))
# one NEVRA in a single repo
if len(pkgs) == 1:
@@ -1073,7 +1069,14 @@ class PackageKitYumBackend(PackageKitBaseBackend, PackagekitPackage):
for txmbr in self.yumbase.tsInfo:
deps_list.append(txmbr.po)
else:
- pkg, inst = self._findPackage(package_id)
+ try:
+ pkg, inst = self._findPackage(package_id)
+ except PkError, e:
+ if e.code == ERROR_PACKAGE_NOT_FOUND:
+ self.message(MESSAGE_COULD_NOT_FIND_PACKAGE, e.details)
+ continue
+ self.error(e.code, e.details, exit=True)
+ return
# This simulates the removal of the package
if inst and pkg:
resolve_list.append(pkg)
@@ -1320,7 +1323,11 @@ class PackageKitYumBackend(PackageKitBaseBackend, PackagekitPackage):
except Exception, e:
self.error(ERROR_INTERNAL_ERROR, _format_str(traceback.format_exc()))
else:
- pkg, inst = self._findPackage(package_id)
+ try:
+ pkg, inst = self._findPackage(package_id)
+ except PkError, e:
+ self.error(e.code, e.details, exit=True)
+ return
# This simulates the addition of the package
if not inst and pkg:
resolve_list.append(pkg)
@@ -1351,7 +1358,11 @@ class PackageKitYumBackend(PackageKitBaseBackend, PackagekitPackage):
# remove any of the packages we passed in
for package_id in package_ids:
- pkg, inst = self._findPackage(package_id)
+ try:
+ pkg, inst = self._findPackage(package_id)
+ except PkError, e:
+ self.error(e.code, e.details, exit=True)
+ return
if pkg in deps_list:
deps_list.remove(pkg)
@@ -1403,7 +1414,14 @@ class PackageKitYumBackend(PackageKitBaseBackend, PackagekitPackage):
pkgs = self._get_group_packages(grp)
grp_pkgs.extend(pkgs)
else:
- pkg, inst = self._findPackage(package_id)
+ try:
+ pkg, inst = self._findPackage(package_id)
+ except PkError, e:
+ if e.code == ERROR_PACKAGE_NOT_FOUND:
+ self.message(MESSAGE_COULD_NOT_FIND_PACKAGE, e.details)
+ continue
+ self.error(e.code, e.details, exit=True)
+ return
if pkg:
resolve_list.append(pkg)
else:
@@ -1639,7 +1657,11 @@ class PackageKitYumBackend(PackageKitBaseBackend, PackagekitPackage):
self.error(ERROR_INTERNAL_ERROR, _format_str(traceback.format_exc()))
txmbrs.extend(txmbr)
else:
- pkg, inst = self._findPackage(package_id)
+ try:
+ pkg, inst = self._findPackage(package_id)
+ except PkError, e:
+ self.error(e.code, e.details, exit=True)
+ return
if pkg and not inst:
txmbr = self.yumbase.install(po=pkg)
txmbrs.extend(txmbr)
@@ -1927,7 +1949,14 @@ class PackageKitYumBackend(PackageKitBaseBackend, PackagekitPackage):
txmbrs = []
try:
for package_id in package_ids:
- pkg, inst = self._findPackage(package_id)
+ try:
+ pkg, inst = self._findPackage(package_id)
+ except PkError, e:
+ if e.code == ERROR_PACKAGE_NOT_FOUND:
+ self.message(MESSAGE_COULD_NOT_FIND_PACKAGE, e.details)
+ continue
+ self.error(e.code, e.details, exit=True)
+ return
if pkg:
try:
txmbr = self.yumbase.update(po=pkg)
@@ -2075,7 +2104,11 @@ class PackageKitYumBackend(PackageKitBaseBackend, PackagekitPackage):
self.error(ERROR_INTERNAL_ERROR, _format_str(traceback.format_exc()))
txmbrs.extend(txmbr)
else:
- pkg, inst = self._findPackage(package_id)
+ try:
+ pkg, inst = self._findPackage(package_id)
+ except PkError, e:
+ self.error(e.code, e.details, exit=True)
+ return
if pkg and inst:
try:
txmbr = self.yumbase.remove(po=pkg)
@@ -2132,7 +2165,14 @@ class PackageKitYumBackend(PackageKitBaseBackend, PackagekitPackage):
self.details(package_id, "", group, desc, "", size)
else:
- pkg, inst = self._findPackage(package_id)
+ try:
+ pkg, inst = self._findPackage(package_id)
+ except PkError, e:
+ if e.code == ERROR_PACKAGE_NOT_FOUND:
+ self.message(MESSAGE_COULD_NOT_FIND_PACKAGE, e.details)
+ continue
+ self.error(e.code, e.details, exit=True)
+ return
if pkg:
self._show_details_pkg(pkg)
else:
@@ -2172,7 +2212,11 @@ class PackageKitYumBackend(PackageKitBaseBackend, PackagekitPackage):
self.status(STATUS_INFO)
for package_id in package_ids:
- pkg, inst = self._findPackage(package_id)
+ try:
+ pkg, inst = self._findPackage(package_id)
+ except PkError, e:
+ self.error(e.code, e.details, exit=True)
+ return
if pkg:
files = pkg.returnFileEntries('dir')
files.extend(pkg.returnFileEntries()) # regular files
@@ -2469,7 +2513,14 @@ class PackageKitYumBackend(PackageKitBaseBackend, PackagekitPackage):
self.percentage(None)
self.status(STATUS_INFO)
for package_id in package_ids:
- pkg, inst = self._findPackage(package_id)
+ try:
+ pkg, inst = self._findPackage(package_id)
+ except PkError, e:
+ if e.code == ERROR_PACKAGE_NOT_FOUND:
+ self.message(MESSAGE_COULD_NOT_FIND_PACKAGE, e.details)
+ continue
+ self.error(e.code, e.details, exit=True)
+ return
if pkg == None:
self.message(MESSAGE_COULD_NOT_FIND_PACKAGE, "could not find %s" % _format_package_id(package_id))
continue
@@ -2638,7 +2689,11 @@ class PackageKitYumBackend(PackageKitBaseBackend, PackagekitPackage):
except Exception, e:
self.error(ERROR_GPG_FAILURE, "Error importing GPG Key for the %s repository: %s" % (repo, str(e)))
else: # This is a package signature
- pkg, inst = self._findPackage(package_id)
+ try:
+ pkg, inst = self._findPackage(package_id)
+ except PkError, e:
+ self.error(e.code, e.details, exit=True)
+ return
if pkg:
try:
self.yumbase.getKeyForPackage(pkg, askcb = lambda x, y, z: True)
commit d3066b774f7085769047f7eb1cd5bf0707947d6d
Author: Richard Hughes <richard at hughsie.com>
Date: Wed Nov 18 14:54:59 2009 +0000
yum: don't fail with a crypic message if a package is being searched for is in a repo no longer available.
diff --git a/backends/yum/yumBackend.py b/backends/yum/yumBackend.py
index ee32da7..dec66a6 100755
--- a/backends/yum/yumBackend.py
+++ b/backends/yum/yumBackend.py
@@ -1006,6 +1006,11 @@ class PackageKitYumBackend(PackageKitBaseBackend, PackagekitPackage):
self.error(ERROR_REPO_NOT_FOUND, "cannot find repo %s" % repo)
return None, False
+ # the repo might have been disabled if it is no longer contactable
+ if not repos[0].isEnabled():
+ self.message(MESSAGE_COULD_NOT_FIND_PACKAGE, '%s cannot be found as %s is disabled' % (n, repos[0].id))
+ return None, False
+
# populate the sack with data
try:
self.yumbase.repos.populateSack(repo)
@@ -1932,9 +1937,6 @@ class PackageKitYumBackend(PackageKitBaseBackend, PackagekitPackage):
self.error(ERROR_TRANSACTION_ERROR, "could not add package update for %s: %s" % (_format_package_id(package_id), pkg), exit=False)
return
txmbrs.extend(txmbr)
- else:
- self.error(ERROR_UPDATE_NOT_FOUND, "cannot find package '%s'" % _format_package_id(package_id), exit=False)
- return
except yum.Errors.RepoError, e:
self.error(ERROR_REPO_NOT_AVAILABLE, _to_unicode(e), exit=False)
except Exception, e:
commit 315867f665ca36a8315afc03266902ff567c47c6
Author: Richard Hughes <richard at hughsie.com>
Date: Wed Nov 18 10:22:11 2009 +0000
yum: Do a better fix for the non-name callback bug - trivial change
diff --git a/backends/yum/yumBackend.py b/backends/yum/yumBackend.py
index 54bedc2..ee32da7 100755
--- a/backends/yum/yumBackend.py
+++ b/backends/yum/yumBackend.py
@@ -2794,7 +2794,7 @@ class DownloadCallback(BaseMeter):
val = int(frac*100)
# new package
- if val == 0 and len(name) > 0:
+ if val == 0 and name:
pkg = self._getPackage(name)
if pkg: # show package to download
self.base._show_package(pkg, INFO_DOWNLOADING)
@@ -2806,7 +2806,7 @@ class DownloadCallback(BaseMeter):
break
# package finished
- if val == 100 and len(name) > 0:
+ if val == 100 and name:
pkg = self._getPackage(name)
if pkg:
self.base._show_package(pkg, INFO_FINISHED)
commit 948a2f3206c9e264159a01c0fb1d84a99d4a5813
Merge: 247f1bc... 3a80942...
Author: Richard Hughes <richard at hughsie.com>
Date: Wed Nov 18 08:38:04 2009 +0000
Merge branch 'master' of git+ssh://git.packagekit.org/srv/git/PackageKit
commit 3a80942ae04d1ced69e83b55eea7212c0395a572
Author: Sebastian Heinlein <devel at glatzor.de>
Date: Tue Nov 17 16:28:31 2009 -0600
APT: Parse for closed Launchpad bugs in the Ubuntu changelogs
diff --git a/backends/apt/aptBackend.py b/backends/apt/aptBackend.py
index 78ef090..a1f4353 100755
--- a/backends/apt/aptBackend.py
+++ b/backends/apt/aptBackend.py
@@ -149,6 +149,9 @@ MATCH_BUG_NUMBERS=r"\#?\s?(\d+)"
# URL pointing to a bug in the Debian bug tracker
HREF_BUG_DEBIAN="http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=%s"
+MATCH_BUG_CLOSES_UBUNTU = r"lp:\s+\#\d+(?:,\s*\#\d+)*"
+HREF_BUG_UBUNTU = "https://bugs.launchpad.net/bugs/%s"
+
# Regular expression to find cve references
MATCH_CVE="CVE-\d{4}-\d{4}"
HREF_CVE="http://web.nvd.nist.gov/view/vuln/detail?vulnId=%s"
@@ -787,11 +790,14 @@ class PackageKitAptBackend(PackageKitBaseBackend):
Create a list of urls pointing to closed bugs in the changelog
"""
urls = []
- #FIXME: Add support for Launchpad/Ubuntu
for r in re.findall(MATCH_BUG_CLOSES_DEBIAN, changelog,
re.IGNORECASE | re.MULTILINE):
- urls.extend(map(lambda b: HREF_BUG_DEBIAN % b,
- re.findall(MATCH_BUG_NUMBERS, r)))
+ urls.extend([HREF_BUG_DEBIAN % bug for bug in \
+ re.findall(MATCH_BUG_NUMBERS, r)])
+ for r in re.findall(MATCH_BUG_CLOSES_UBUNTU, changelog,
+ re.IGNORECASE | re.MULTILINE):
+ urls.extend([HREF_BUG_UBUNTU % bug for bug in \
+ re.findall(MATCH_BUG_NUMBERS, r)])
return urls
def get_cve_urls(changelog):
commit 247f1bcfa04817afe67f460a5ac490ee1b3c3a8e
Merge: 356176d... 2c4956c...
Author: Richard Hughes <richard at hughsie.com>
Date: Tue Nov 17 15:15:04 2009 +0000
Merge branch 'master' of git+ssh://git.packagekit.org/srv/git/PackageKit
commit 2c4956c9226d11c50be012506872c71e66814a32
Author: Sebastian Heinlein <devel at glatzor.de>
Date: Tue Nov 17 08:46:45 2009 -0600
APT: Minor cleanups to the markdown creator
diff --git a/backends/apt/aptBackend.py b/backends/apt/aptBackend.py
index 3e6ba65..78ef090 100755
--- a/backends/apt/aptBackend.py
+++ b/backends/apt/aptBackend.py
@@ -857,10 +857,11 @@ class PackageKitAptBackend(PackageKitBaseBackend):
update_text += " %s \n" % line
elif line.startswith(" --"):
#FIXME: Add %z for the time zone - requires Python 2.6
- maint, mail, date_raw, offset = \
- re.match("^ -- (.+) (<.+>) (.+) ([-\+][0-9]+)$",
- line).groups()
- date = datetime.datetime.strptime(date_raw,
+ update_text += " \n"
+ match = re.match("^ -- (?P<maintainer>.+) (?P<mail><.+>) "
+ "(?P<date>.+) (?P<offset>[-\+][0-9]+)$",
+ line)
+ date = datetime.datetime.strptime(match.group("date"),
"%a, %d %b %Y %H:%M:%S")
issued = date.isoformat()
commit b42c1ff61f762bdf8058a6dd8959983a48251249
Author: Sebastian Heinlein <devel at glatzor.de>
Date: Tue Nov 17 08:40:44 2009 -0600
APT: Use a more readable markdown raw syntax
diff --git a/backends/apt/aptBackend.py b/backends/apt/aptBackend.py
index e1fc397..3e6ba65 100755
--- a/backends/apt/aptBackend.py
+++ b/backends/apt/aptBackend.py
@@ -843,16 +843,18 @@ class PackageKitAptBackend(PackageKitBaseBackend):
changelog = ""
for line in changelog_raw.split("\n"):
if line == "":
- changelog += "\n\n\n\n"
+ changelog += " \n"
else:
- changelog += "`%s` \n\n" % line
+ changelog += " %s \n" % line
if line.startswith(pkg.candidate.source_name):
- source, version, dist, urgency = \
- re.match(r"(.+) \((.*)\) (.+); urgency=(.+)",
- line).groups()
- update_text += "# %s #\n\n \n\n" % version
+ match = re.match(r"(?P<source>.+) \((?P<version>.*)\) "
+ "(?P<dist>.+); urgency=(?P<urgency>.+)",
+ line)
+ update_text += "%s\n%s\n\n" % (match.group("version"),
+ "=" * \
+ len(match.group("version")))
elif line.startswith(" "):
- update_text += "`%s`\n\n" % line[2:]
+ update_text += " %s \n" % line
elif line.startswith(" --"):
#FIXME: Add %z for the time zone - requires Python 2.6
maint, mail, date_raw, offset = \
@@ -864,7 +866,6 @@ class PackageKitAptBackend(PackageKitBaseBackend):
issued = date.isoformat()
if not updated:
updated = date.isoformat()
- update_text += "\n\n\n\n"
if issued == updated:
updated = ""
bugzilla_url = ";;".join(get_bug_urls(changelog))
commit f6463cbd23e3990a067448f183d37ba7e9ff4e73
Merge: 667fadb... ad0d42c...
Author: Sebastian Heinlein <devel at glatzor.de>
Date: Tue Nov 17 07:29:02 2009 -0600
Merge branch 'master' of git+ssh://git.packagekit.org/srv/git/PackageKit
commit 667fadb194adcb7d2d9dc4d67e5c1039f9adb0b2
Author: Sebastian Heinlein <devel at glatzor.de>
Date: Tue Nov 17 07:28:05 2009 -0600
APT: Share the pinning file with Synaptic which allows to block updates
in Synaptic
diff --git a/backends/apt/aptBackend.py b/backends/apt/aptBackend.py
index 8bb634e..e1fc397 100755
--- a/backends/apt/aptBackend.py
+++ b/backends/apt/aptBackend.py
@@ -153,6 +153,8 @@ HREF_BUG_DEBIAN="http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=%s"
MATCH_CVE="CVE-\d{4}-\d{4}"
HREF_CVE="http://web.nvd.nist.gov/view/vuln/detail?vulnId=%s"
+SYNAPTIC_PIN_FILE = "/var/lib/synaptic/preferences"
+
# Required to get translated descriptions
try:
locale.setlocale(locale.LC_ALL, "")
@@ -729,6 +731,10 @@ class PackageKitAptBackend(PackageKitBaseBackend):
for pkg in self._cache:
if not pkg.isUpgradable:
continue
+ # This may occur on pinned packages which have been updated to
+ # later version than the pinned one
+ if not pkg.candidateOrigin:
+ continue
pklog.debug("Checking upgrade of %s" % pkg.name)
if not pkg in upgrades_safe:
# Check if the upgrade would require the removal of an already
@@ -1868,6 +1874,11 @@ class PackageKitAptBackend(PackageKitBaseBackend):
self._open_cache(prange, progress)
else:
pass
+ # Read the pin file of Synaptic if available
+ self._cache._depcache.ReadPinFile()
+ if os.path.exists(SYNAPTIC_PIN_FILE):
+ self._cache._depcache.ReadPinFile(SYNAPTIC_PIN_FILE)
+ # Reset the depcache
self._cache.clear()
def _emit_package(self, pkg, info=None, force_candidate=False):
commit 356176d644904324cd5e832b6e4b2759857b60e3
Author: Richard Hughes <richard at hughsie.com>
Date: Tue Nov 17 12:22:59 2009 +0000
yum: check the filename is valid before exploding when yum fails on us. Fixes rh#537381
diff --git a/backends/yum/yumBackend.py b/backends/yum/yumBackend.py
index 83459ae..54bedc2 100755
--- a/backends/yum/yumBackend.py
+++ b/backends/yum/yumBackend.py
@@ -2794,7 +2794,7 @@ class DownloadCallback(BaseMeter):
val = int(frac*100)
# new package
- if val == 0:
+ if val == 0 and len(name) > 0:
pkg = self._getPackage(name)
if pkg: # show package to download
self.base._show_package(pkg, INFO_DOWNLOADING)
@@ -2806,7 +2806,7 @@ class DownloadCallback(BaseMeter):
break
# package finished
- if val == 100:
+ if val == 100 and len(name) > 0:
pkg = self._getPackage(name)
if pkg:
self.base._show_package(pkg, INFO_FINISHED)
commit ad0d42c859e39b0a40bbab504fe6c6ea6dea2834
Author: Richard Hughes <richard at hughsie.com>
Date: Tue Nov 17 11:47:59 2009 +0000
yum: fix the broken metadata ISO8601 encoded update detail values
diff --git a/backends/yum/yumBackend.py b/backends/yum/yumBackend.py
index e1e3bc2..83459ae 100755
--- a/backends/yum/yumBackend.py
+++ b/backends/yum/yumBackend.py
@@ -2475,6 +2475,10 @@ class PackageKitYumBackend(PackageKitBaseBackend, PackagekitPackage):
obsolete = self._get_obsoleted(pkg.name)
desc, urls, reboot, changelog, state, issued, updated = self._get_update_extras(pkg)
+ # the metadata stores broken ISO8601 formatted values
+ issued = issued.replace(" ", "T")
+ updated = updated.replace(" ", "T")
+
# extract the changelog for the local package
if len(changelog) == 0:
commit f6473a1d16d88f7787d06be7a4b9328b7c925896
Author: Richard Hughes <richard at hughsie.com>
Date: Tue Nov 17 11:47:26 2009 +0000
bugfix: ignore blank ISO8601 dates
diff --git a/src/pk-backend.c b/src/pk-backend.c
index 6d024cf..1340419 100644
--- a/src/pk-backend.c
+++ b/src/pk-backend.c
@@ -1052,18 +1052,24 @@ pk_backend_update_detail (PkBackend *backend, const gchar *package_id,
goto out;
}
+ /* check the dates are not empty */
+ if (issued_text != NULL && issued_text[0] == '\0')
+ issued_text = NULL;
+ if (updated_text != NULL && updated_text[0] == '\0')
+ updated_text = NULL;
+
/* check the issued dates are valid */
if (issued_text != NULL) {
ret = g_time_val_from_iso8601 (issued_text, &timeval);
if (!ret) {
- egg_warning ("failed to parse %s", issued_text);
+ egg_warning ("failed to parse '%s'", issued_text);
goto out;
}
}
if (updated_text != NULL) {
ret = g_time_val_from_iso8601 (updated_text, &timeval);
if (!ret) {
- egg_warning ("failed to parse %s", updated_text);
+ egg_warning ("failed to parse '%s'", updated_text);
goto out;
}
}
commit 0a8dc2fee0caf22c108fd6d2314408fb01c20f5d
Author: Richard Hughes <richard at hughsie.com>
Date: Tue Nov 17 11:39:18 2009 +0000
bugfix: Ensure the update detail ISO8601 dates are formatted correctly before they are sent to the daemon
diff --git a/src/pk-backend.c b/src/pk-backend.c
index d5afb16..6d024cf 100644
--- a/src/pk-backend.c
+++ b/src/pk-backend.c
@@ -1039,6 +1039,7 @@ pk_backend_update_detail (PkBackend *backend, const gchar *package_id,
{
gchar *update_text_safe = NULL;
PkUpdateDetail *item = NULL;
+ GTimeVal timeval;
gboolean ret = FALSE;
g_return_val_if_fail (PK_IS_BACKEND (backend), FALSE);
@@ -1051,6 +1052,22 @@ pk_backend_update_detail (PkBackend *backend, const gchar *package_id,
goto out;
}
+ /* check the issued dates are valid */
+ if (issued_text != NULL) {
+ ret = g_time_val_from_iso8601 (issued_text, &timeval);
+ if (!ret) {
+ egg_warning ("failed to parse %s", issued_text);
+ goto out;
+ }
+ }
+ if (updated_text != NULL) {
+ ret = g_time_val_from_iso8601 (updated_text, &timeval);
+ if (!ret) {
+ egg_warning ("failed to parse %s", updated_text);
+ goto out;
+ }
+ }
+
/* replace unsafe chars */
update_text_safe = pk_backend_strsafe (update_text);
commit 2be5ed5caba1432c95a66d9573ab508e49e7b027
Author: Richard Hughes <richard at hughsie.com>
Date: Tue Nov 17 11:38:31 2009 +0000
dummy: ensure we send valid ISO8601 dates to the daemon
diff --git a/backends/dummy/pk-backend-dummy.c b/backends/dummy/pk-backend-dummy.c
index 374ec55..0f3267c 100644
--- a/backends/dummy/pk-backend-dummy.c
+++ b/backends/dummy/pk-backend-dummy.c
@@ -309,7 +309,7 @@ backend_get_update_detail_timeout (gpointer data)
"http://www.distro-update.org/page?moo;Bugfix release for powertop",
"http://bgzilla.fd.org/result.php?#12344;Freedesktop Bugzilla #12344",
"", PK_RESTART_ENUM_NONE, "Update to newest upstream source",
- changelog, PK_UPDATE_STATE_ENUM_STABLE, "2008-07-31", NULL);
+ changelog, PK_UPDATE_STATE_ENUM_STABLE, "2009-11-17T09:19:00", "2009-11-19T09:19:00");
} else if (g_strcmp0 (package_id, "kernel;2.6.23-0.115.rc3.git1.fc8;i386;installed") == 0) {
pk_backend_update_detail (backend, package_id,
"kernel;2.6.22-0.104.rc3.git6.fc8;i386;installed"
@@ -323,7 +323,7 @@ backend_get_update_detail_timeout (gpointer data)
"Update to newest upstream version.\n"
"* This should fix many driver bugs when using nouveau\n"
" * This also introduces the new `frobnicator` driver for *vibrating* rabbit hardware.",
- changelog, PK_UPDATE_STATE_ENUM_UNSTABLE, "2008-06-28", NULL);
+ changelog, PK_UPDATE_STATE_ENUM_UNSTABLE, "2008-06-28T09:19:00", NULL);
} else if (g_strcmp0 (package_id, "gtkhtml2;2.19.1-4.fc8;i386;fedora") == 0) {
pk_backend_update_detail (backend, package_id,
"gtkhtml2;2.18.1-22.fc8;i386;installed", "",
@@ -334,7 +334,7 @@ backend_get_update_detail_timeout (gpointer data)
"* support this new thing\n"
"* something else\n"
"- and that new thing",
- changelog, PK_UPDATE_STATE_ENUM_UNKNOWN, "2008-07-25", NULL);
+ changelog, PK_UPDATE_STATE_ENUM_UNKNOWN, "2008-07-25T09:19:00", NULL);
} else if (g_strcmp0 (package_id, "vino;2.24.2.fc9;i386;fedora") == 0) {
pk_backend_update_detail (backend, package_id,
commit 93d6435dfc97970ed6ee7993db0c4f2f5a9eb7a6
Author: Sebastian Heinlein <devel at glatzor.de>
Date: Mon Nov 16 15:23:43 2009 -0600
APT: Make use of the package metadata to search for provided gstreamer
plugins
diff --git a/backends/apt/aptBackend.py b/backends/apt/aptBackend.py
index a3ce251..8bb634e 100755
--- a/backends/apt/aptBackend.py
+++ b/backends/apt/aptBackend.py
@@ -1651,32 +1651,65 @@ class PackageKitAptBackend(PackageKitBaseBackend):
"app-install-data.")
else:
return db
-
+ def extract_gstreamer_request(search):
+ # The search term from PackageKit daemon:
+ # gstreamer0.10(urisource-foobar)
+ # gstreamer0.10(decoder-audio/x-wma)(wmaversion=3)
+ match = re.match("^gstreamer(?P<version>[0-9\.]+)"
+ "\((?P<kind>.+?)-(?P<data>.+?)\)"
+ "(\((?P<opt>.*)\))?",
+ search)
+ caps = None
+ if not match:
+ self.error(ERROR_INTERNAL_ERROR,
+ "The search term is invalid: %s" % search)
+ if match.group("opt"):
+ caps_str = "%s, %s" % (match.group("data"), match.group("opt"))
+ # gst.Caps.__init__ cannot handle unicode instances
+ caps = gst.Caps(str(caps_str))
+ record = GSTREAMER_RECORD_MAP[match.group("kind")]
+ return match.group("version"), record, match.group("data"), caps
self.status(STATUS_QUERY)
self.percentage(None)
self._check_init(progress=False)
self.allow_cancel(False)
if provides_type == PROVIDES_CODEC:
- # The search term from the codec helper looks like this one:
- match = re.match(r"gstreamer([0-9\.]+)\((.+?)\)", search)
- if not match:
- self.error(ERROR_INTERNAL_ERROR,
- "The search term is invalid")
- codec = "%s:%s" % (match.group(1), match.group(2))
- db = get_mapping_db("/var/lib/PackageKit/codec-map.gdbm")
- if db == None:
- self.error(ERROR_INTERNAL_ERROR,
- "Failed to open codec mapping database")
- if db.has_key(codec):
- # The codec mapping db stores the packages as a string
- # separated by spaces. Each package has its section
- # prefixed and separated by a slash
- # FIXME: Should make use of the section and emit a
- # RepositoryRequired signal if the package does
- # not exist
- pkgs = map(lambda s: s.split("/")[1],
- db[codec].split(" "))
- self._emit_visible_packages_by_name(filters, pkgs)
+ # Search for privided gstreamer plugins using the package
+ # metadata
+ import gst
+ GSTREAMER_RECORD_MAP = {"encoder": "Gstreamer-Encoders",
+ "decoder": "Gstreamer-Decoders",
+ "urisource": "Gstreamer-Uri-Sources",
+ "urisink": "Gstreamer-Uri-Sinks",
+ "element": "Gstreamer-Elements"}
+ for pkg in self._cache:
+ if pkg.installed:
+ version = pkg.installed
+ elif pkg.candidate:
+ version = pkg.candidate
+ else:
+ continue
+ if not "Gstreamer-Version" in version.record:
+ continue
+ gst_version, gst_record, gst_data, gst_caps = \
+ extract_gstreamer_request(search)
+ if version.record["Gstreamer-Version"] != gst_version:
+ continue
+ if gst_caps:
+ try:
+ pkg_caps = gst.Caps(version.record[gst_record])
+ except KeyError:
+ continue
+ if gst_caps.intersect(pkg_caps):
+ self._emit_visible_package(filters, pkg)
+ else:
+ try:
+ elements = version.record[gst_record]
+ except KeyError:
+ continue
+ if gst_data in elements:
+ self._emit_visible_package(filters, pkg)
+
elif provides_type == PROVIDES_MIMETYPE:
# Emit packages that contain an application that can handle
# the given mime type
commit fd8482473bb392ca0bc79b74ad6a015ae3c477d0
Author: mgiri <mgiri at fedoraproject.org>
Date: Sat Nov 14 10:05:23 2009 +0000
Sending translation for Oriya
diff --git a/po/or.po b/po/or.po
index a347498..c1d96b6 100644
--- a/po/or.po
+++ b/po/or.po
@@ -7,8 +7,8 @@ msgid ""
msgstr ""
"Project-Id-Version: packagekit.master.or\n"
"Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2009-09-25 08:37+0000\n"
-"PO-Revision-Date: 2009-09-25 17:48+0530\n"
+"POT-Creation-Date: 2009-11-14 08:42+0000\n"
+"PO-Revision-Date: 2009-11-14 15:18+0530\n"
"Last-Translator: Manoj Kumar Giri <mgiri at redhat.com>\n"
"Language-Team: Oriya <oriya-it at googlegroups.com>\n"
"MIME-Version: 1.0\n"
@@ -30,117 +30,118 @@ msgstr ""
"\n"
"\n"
"\n"
+"\n"
#. TRANSLATORS: this is an atomic transaction
-#: ../client/pk-console.c:143
+#: ../client/pk-console.c:173
msgid "Transaction"
msgstr "à¬à¬¾à¬°à¬¬à¬¾à¬°"
#. TRANSLATORS: this is the time the transaction was started in system timezone
-#: ../client/pk-console.c:145
+#: ../client/pk-console.c:175
msgid "System time"
msgstr "ତନàତàର ସମà"
#. TRANSLATORS: this is if the transaction succeeded or not
-#: ../client/pk-console.c:147
+#: ../client/pk-console.c:177
msgid "Succeeded"
msgstr "ସଫଳ ହàà¬à¬à¬¿"
-#: ../client/pk-console.c:147
+#: ../client/pk-console.c:177
msgid "True"
msgstr "True (ସତàà)"
-#: ../client/pk-console.c:147
+#: ../client/pk-console.c:177
msgid "False"
msgstr "False (ମିଥààା)"
#. TRANSLATORS: this is the transactions role, e.g. "update-system"
#. TRANSLATORS: the trasaction role, e.g. update-system
-#: ../client/pk-console.c:149 ../src/pk-polkit-action-lookup.c:336
+#: ../client/pk-console.c:179 ../src/pk-polkit-action-lookup.c:336
msgid "Role"
msgstr "à¬àମିà¬à¬¾"
#. TRANSLATORS: this is The duration of the transaction
-#: ../client/pk-console.c:154
+#: ../client/pk-console.c:184
msgid "Duration"
msgstr "à¬
ବଧି"
-#: ../client/pk-console.c:154
+#: ../client/pk-console.c:184
msgid "(seconds)"
msgstr "(ସàà¬à¬£àଡ)"
#. TRANSLATORS: this is The command line used to do the action
#. TRANSLATORS: the command line of the thing that wants the authentication
-#: ../client/pk-console.c:158 ../src/pk-polkit-action-lookup.c:350
+#: ../client/pk-console.c:188 ../src/pk-polkit-action-lookup.c:350
msgid "Command line"
msgstr "ପାଠàà ନିରàଦàଦàଶ"
#. TRANSLATORS: this is the user ID of the user that started the action
-#: ../client/pk-console.c:160
+#: ../client/pk-console.c:190
msgid "User ID"
msgstr "à¬à¬¾à¬³à¬ ID"
#. TRANSLATORS: this is the username, e.g. hughsie
-#: ../client/pk-console.c:167
+#: ../client/pk-console.c:197
msgid "Username"
msgstr "à¬à¬¾à¬³à¬ ନାମ"
#. TRANSLATORS: this is the users real name, e.g. "Richard Hughes"
-#: ../client/pk-console.c:171
+#: ../client/pk-console.c:201
msgid "Real name"
msgstr "ପàରà¬àତ ନାମ"
-#: ../client/pk-console.c:179
+#: ../client/pk-console.c:209
msgid "Affected packages:"
msgstr "ପàରà¬à¬¾à¬¬à¬¿à¬¤ ପààାà¬àà¬à¬àଡ଼ିà¬:"
-#: ../client/pk-console.c:181
+#: ../client/pk-console.c:211
msgid "Affected packages: None"
msgstr "ପàରà¬à¬¾à¬¬à¬¿à¬¤ ପààାà¬àà¬à¬àଡ଼ିà¬: à¬à¬¿à¬à¬¿à¬¨àହà¬"
#. TRANSLATORS: this is the distro, e.g. Fedora 10
-#: ../client/pk-console.c:201
+#: ../client/pk-console.c:246
msgid "Distribution"
msgstr "ବଣàà¬à¬¨"
#. TRANSLATORS: this is type of update, stable or testing
-#: ../client/pk-console.c:203
+#: ../client/pk-console.c:248
msgid "Type"
msgstr "ପàରà¬à¬¾à¬°"
#. TRANSLATORS: this is any summary text describing the upgrade
#. TRANSLATORS: this is the summary of the group
-#: ../client/pk-console.c:205 ../client/pk-console.c:226
+#: ../client/pk-console.c:250 ../client/pk-console.c:289
msgid "Summary"
msgstr "ସାରାà¬à¬¶"
#. TRANSLATORS: this is the group category name
-#: ../client/pk-console.c:215
+#: ../client/pk-console.c:278
msgid "Category"
msgstr "ବିà¬à¬¾à¬"
#. TRANSLATORS: this is group identifier
-#: ../client/pk-console.c:217
+#: ../client/pk-console.c:280
msgid "ID"
msgstr "ID"
#. TRANSLATORS: this is the parent group
-#: ../client/pk-console.c:220
+#: ../client/pk-console.c:283
msgid "Parent"
msgstr "ମàà¬àà"
#. TRANSLATORS: this is the name of the parent group
-#: ../client/pk-console.c:223
+#: ../client/pk-console.c:286
msgid "Name"
msgstr "ନାମ"
#. TRANSLATORS: this is preferred icon for the group
-#: ../client/pk-console.c:229
+#: ../client/pk-console.c:292
msgid "Icon"
msgstr "à¬à¬¿à¬¤àରସà¬à¬àତ"
#. TRANSLATORS: this is a header for the package that can be updated
-#: ../client/pk-console.c:243
+#: ../client/pk-console.c:338
msgid "Details about the update:"
msgstr "à¬
ଦààତନ ବିଷàରà ବିସàତàତ ବିବରଣà:"
@@ -148,8 +149,8 @@ msgstr "à¬
ଦààତନ ବିଷàରà ବିସàତàତ ବିବର
#. TRANSLATORS: the package that is not signed by a known key
#. TRANSLATORS: the package name that was trying to be installed
#. TRANSLATORS: title, the names of the packages that the method is processing
-#: ../client/pk-console.c:249 ../lib/packagekit-glib2/pk-task-text.c:105
-#: ../lib/packagekit-glib2/pk-task-text.c:172
+#: ../client/pk-console.c:344 ../lib/packagekit-glib2/pk-task-text.c:126
+#: ../lib/packagekit-glib2/pk-task-text.c:208
#: ../src/pk-polkit-action-lookup.c:361
msgid "Package"
msgid_plural "Packages"
@@ -157,141 +158,141 @@ msgstr[0] "ପààାà¬àà¬"
msgstr[1] "ପààାà¬àà¬à¬àଡ଼ିà¬"
#. TRANSLATORS: details about the update, any packages that this update updates
-#: ../client/pk-console.c:252
+#: ../client/pk-console.c:347
msgid "Updates"
msgstr "à¬
ଦààତନà¬àଡ଼ିà¬"
#. TRANSLATORS: details about the update, any packages that this update obsoletes
-#: ../client/pk-console.c:256
+#: ../client/pk-console.c:351
msgid "Obsoletes"
msgstr "à¬
à¬à¬³à¬àଡ଼ିà¬"
#. TRANSLATORS: details about the update, the vendor URLs
#. TRANSLATORS: the vendor (e.g. vmware) that is providing the EULA
-#: ../client/pk-console.c:260 ../lib/packagekit-glib2/pk-task-text.c:175
+#: ../client/pk-console.c:355 ../lib/packagekit-glib2/pk-task-text.c:211
msgid "Vendor"
msgstr "ବିà¬àରàତା"
#. TRANSLATORS: details about the update, the bugzilla URLs
-#: ../client/pk-console.c:264
+#: ../client/pk-console.c:359
msgid "Bugzilla"
msgstr "Bugzilla"
#. TRANSLATORS: details about the update, the CVE URLs
-#: ../client/pk-console.c:268
+#: ../client/pk-console.c:363
msgid "CVE"
msgstr "CVE"
#. TRANSLATORS: details about the update, if the package requires a restart
-#: ../client/pk-console.c:272
+#: ../client/pk-console.c:367
msgid "Restart"
msgstr "ପàନà¬à¬à¬¾à¬³à¬¨"
#. TRANSLATORS: details about the update, any description of the update
-#: ../client/pk-console.c:276
+#: ../client/pk-console.c:371
msgid "Update text"
msgstr "ପାଠàà à¬
ଦààତନ à¬à¬°à¬¨àତà"
#. TRANSLATORS: details about the update, the changelog for the package
-#: ../client/pk-console.c:280
+#: ../client/pk-console.c:375
msgid "Changes"
msgstr "ପରିବରàତàତନà¬àଡ଼ିà¬"
#. TRANSLATORS: details about the update, the ongoing state of the update
-#: ../client/pk-console.c:284
+#: ../client/pk-console.c:379
msgid "State"
msgstr "à¬
ବସàଥା"
#. TRANSLATORS: details about the update, date the update was issued
-#: ../client/pk-console.c:289
+#: ../client/pk-console.c:383
msgid "Issued"
msgstr "ପàରଦତàତ"
#. TRANSLATORS: details about the update, date the update was updated
#. TRANSLATORS: The action of the package, in past tense
-#: ../client/pk-console.c:294 ../lib/packagekit-glib2/pk-console-shared.c:498
+#: ../client/pk-console.c:387 ../lib/packagekit-glib2/pk-console-shared.c:510
msgid "Updated"
msgstr "à¬
ଦààତିତ"
#. TRANSLATORS: if the repo is enabled
-#: ../client/pk-console.c:312
+#: ../client/pk-console.c:423
msgid "Enabled"
msgstr "ସà¬àରିà"
#. TRANSLATORS: if the repo is disabled
-#: ../client/pk-console.c:315
+#: ../client/pk-console.c:426
msgid "Disabled"
msgstr "ନିଷàà¬àରିà"
#. TRANSLATORS: a package requires the system to be restarted
-#: ../client/pk-console.c:337
+#: ../client/pk-console.c:460
msgid "System restart required by:"
msgstr "ପାà¬à¬ ତନàତàର ପàନà¬à¬à¬¾à¬³à¬¨ à¬à¬¬à¬¶ààà¬:"
#. TRANSLATORS: a package requires the session to be restarted
-#: ../client/pk-console.c:340
+#: ../client/pk-console.c:463
msgid "Session restart required:"
msgstr "à¬
ଧିବàଶନ ପàନà¬à¬à¬¾à¬³à¬¨ à¬à¬¬à¬¶ààà¬:"
#. TRANSLATORS: a package requires the system to be restarted due to a security update
-#: ../client/pk-console.c:343
+#: ../client/pk-console.c:466
msgid "System restart (security) required by:"
msgstr "ତନàତàର ପàନà¬à¬à¬¾à¬³à¬¨ (ସàରà¬àଷା) à¬à¬¹à¬¾ ଦàà±à¬¾à¬°à¬¾ à¬à¬¬à¬¶ààà¬:"
#. TRANSLATORS: a package requires the session to be restarted due to a security update
-#: ../client/pk-console.c:346
+#: ../client/pk-console.c:469
msgid "Session restart (security) required:"
msgstr "à¬
ଧିବàଶନ ପàନà¬à¬à¬¾à¬³à¬¨ (ସàରà¬àଷା) à¬à¬¬à¬¶ààà¬:"
#. TRANSLATORS: a package requires the application to be restarted
-#: ../client/pk-console.c:349
+#: ../client/pk-console.c:472
msgid "Application restart required by:"
msgstr "ପାà¬à¬ ପàରààଠପàନà¬à¬à¬¾à¬³à¬¨ à¬à¬¬à¬¶ààà¬:"
#. TRANSLATORS: This a list of details about the package
-#: ../client/pk-console.c:366
+#: ../client/pk-console.c:505
msgid "Package description"
msgstr "ପààାà¬àଠବରàଣàଣନା"
#. TRANSLATORS: This a message (like a little note that may be of interest) from the transaction
-#: ../client/pk-console.c:384
+#: ../client/pk-console.c:536
msgid "Message:"
msgstr "ସନàଦàଶ:"
#. TRANSLATORS: This where the package has no files
-#: ../client/pk-console.c:398
+#: ../client/pk-console.c:557
msgid "No files"
msgstr "à¬àଣସି ଫାà¬à¬² ନାହିà¬"
#. TRANSLATORS: This a list files contained in the package
-#: ../client/pk-console.c:403
+#: ../client/pk-console.c:562
msgid "Package files"
msgstr "ପààାà¬àଠଫାà¬à¬²à¬àଡ଼ିà¬"
#. TRANSLATORS: we failed to get any results, which is pretty fatal in my book
-#: ../client/pk-console.c:475
+#: ../client/pk-console.c:636
msgid "Fatal error"
msgstr "ମାରାତàମଠତàରàà¬à¬¿"
#. TRANSLATORS: the transaction failed in a way we could not expect
-#: ../client/pk-console.c:484
-#: ../contrib/command-not-found/pk-command-not-found.c:422
-#: ../contrib/command-not-found/pk-command-not-found.c:563
+#: ../client/pk-console.c:645
+#: ../contrib/command-not-found/pk-command-not-found.c:432
+#: ../contrib/command-not-found/pk-command-not-found.c:599
msgid "The transaction failed"
msgstr "à¬à¬¾à¬°à¬¬à¬¾à¬° ବିଫଳ ହàà¬à¬à¬¿"
#. TRANSLATORS: a package needs to restart their system
-#: ../client/pk-console.c:552
+#: ../client/pk-console.c:713
msgid "Please restart the computer to complete the update."
msgstr "à¬
ଦààତନà¬à ସମàପàରàଣàଣ à¬à¬°à¬¿à¬¬à¬¾ ପାà¬à¬ à¬à¬®àପàà¬à¬°à¬à ପàନà¬à¬à¬¾à¬³à¬¨ à¬à¬°à¬¨àତà।"
#. TRANSLATORS: a package needs to restart the session
-#: ../client/pk-console.c:555
+#: ../client/pk-console.c:716
msgid "Please logout and login to complete the update."
msgstr "à¬
ଦààତନà¬à ସମàପàରàଣàଣ à¬à¬°à¬¿à¬¬à¬¾ ପାà¬à¬ ଦàାà¬à¬°à¬¿ ଲà¬à¬à¬à¬ à¬à¬°à¬¿à¬¸à¬¾à¬°à¬¿ ପàଣି ଲà¬à¬à¬¨ à¬à¬°à¬¨àତà।"
#. TRANSLATORS: a package needs to restart their system (due to security)
-#: ../client/pk-console.c:558
+#: ../client/pk-console.c:719
msgid ""
"Please restart the computer to complete the update as important security "
"updates have been installed."
@@ -300,7 +301,7 @@ msgstr ""
"ସàଥାପିତ ହàà¬à¬¸à¬¾à¬°à¬¿à¬à¬¿à¥¤"
#. TRANSLATORS: a package needs to restart the session (due to security)
-#: ../client/pk-console.c:561
+#: ../client/pk-console.c:722
msgid ""
"Please logout and login to complete the update as important security updates "
"have been installed."
@@ -309,19 +310,19 @@ msgstr ""
"à¬
ଦààତନà¬àଡ଼ିଠସàଥାପିତ ହàà¬à¬¸à¬¾à¬°à¬¿à¬à¬¿à¥¤"
#. TRANSLATORS: There was an error getting the list of files for the package. The detailed error follows
-#: ../client/pk-console.c:584
+#: ../client/pk-console.c:745
#, c-format
msgid "This tool could not find any available package: %s"
msgstr "à¬à¬¹à¬¿ ସାଧନ à¬àଣସି à¬à¬ªà¬²à¬¬àଧ ପààାà¬àà¬à¬àଡ଼ିà¬à ପାଠପାରିଲା ନାହିà¬: %s"
#. TRANSLATORS: There was an error getting the list of files for the package. The detailed error follows
-#: ../client/pk-console.c:612
+#: ../client/pk-console.c:773
#, c-format
msgid "This tool could not find the installed package: %s"
msgstr "à¬à¬¹à¬¿ ସାଧନ ସàଥାପିତ ପààାà¬àà¬à¬àଡ଼ିà¬à ପାଠପାରିଲା ନାହିà¬: %s"
#. TRANSLATORS: There was an error getting the list of files for the package. The detailed error follows
-#: ../client/pk-console.c:640 ../client/pk-console.c:668
+#: ../client/pk-console.c:801 ../client/pk-console.c:829
#, c-format
msgid "This tool could not find the package: %s"
msgstr "à¬à¬¹à¬¿ ସାଧନ ପààାà¬àà¬à¬àଡ଼ିà¬à à¬àà¬à¬¿ ପାà¬à¬²à¬¾ ନାହିà¬: %s"
@@ -330,170 +331,181 @@ msgstr "à¬à¬¹à¬¿ ସାଧନ ପààାà¬àà¬à¬àଡ଼ିà¬à à¬à
#. TRANSLATORS: There was an error getting the dependencies for the package. The detailed error follows
#. TRANSLATORS: There was an error getting the details about the package. The detailed error follows
#. TRANSLATORS: The package name was not found in any software sources. The detailed error follows
-#: ../client/pk-console.c:696 ../client/pk-console.c:724
-#: ../client/pk-console.c:752 ../client/pk-console.c:780
-#: ../client/pk-console.c:808
+#: ../client/pk-console.c:857 ../client/pk-console.c:885
+#: ../client/pk-console.c:913 ../client/pk-console.c:941
+#: ../client/pk-console.c:969
#, c-format
msgid "This tool could not find all the packages: %s"
msgstr "à¬à¬¹à¬¿ ସାଧନ ସମସàତ ପààାà¬àà¬à¬àଡ଼ିà¬à à¬àà¬à¬¿ ପାà¬à¬²à¬¾ ନାହିà¬: %s"
#. TRANSLATORS: This is when the daemon crashed, and we are up shit creek without a paddle
-#: ../client/pk-console.c:837
+#: ../client/pk-console.c:998
msgid "The daemon crashed mid-transaction!"
msgstr "ଡàମନ ମଧàଯ-à¬à¬¾à¬°à¬¬à¬¾à¬°à¬à ନଷàଠà¬à¬°à¬¿à¬à¬¿!"
#. TRANSLATORS: This is the header to the --help menu
-#: ../client/pk-console.c:871
+#: ../client/pk-console.c:1032
msgid "PackageKit Console Interface"
msgstr "PackageKit à¬àନସàଲ à¬
ନàତରାପàଷàଠ"
#. these are commands we can use with pkcon
-#: ../client/pk-console.c:873
+#: ../client/pk-console.c:1034
msgid "Subcommands:"
msgstr "à¬à¬ª ନିରàଦàଦàଶà¬àଡ଼ିà¬:"
#. TRANSLATORS: we keep a database updated with the time that an action was last executed
-#: ../client/pk-console.c:952
+#: ../client/pk-console.c:1113
msgid "Failed to get the time since this action was last completed"
msgstr "à¬à¬¹à¬¿ à¬à¬¾à¬°àଯààà¬à¬¿ ଶàଷରà ସମàପàରàଣàଣ ହàà¬à¬¥à¬¿à¬¬à¬¾ ହàତà ସମà ପାà¬à¬¬à¬¾à¬°à ବିଫଳ"
#. TRANSLATORS: command line argument, if we should show debugging information
#. TRANSLATORS: if we should show debugging data
-#: ../client/pk-console.c:987 ../client/pk-generate-pack.c:223
-#: ../client/pk-monitor.c:276
-#: ../contrib/command-not-found/pk-command-not-found.c:616
-#: ../contrib/debuginfo-install/pk-debuginfo-install.c:511
+#: ../client/pk-console.c:1150 ../client/pk-generate-pack.c:223
+#: ../client/pk-monitor.c:281
+#: ../contrib/command-not-found/pk-command-not-found.c:653
+#: ../contrib/debuginfo-install/pk-debuginfo-install.c:518
#: ../contrib/device-rebind/pk-device-rebind.c:293 ../src/pk-main.c:211
msgid "Show extra debugging information"
msgstr "à¬
ତିରିà¬àତ ତàରàà¬à¬¿ ନିବାରଣ ସàà¬à¬¨à¬¾ ଦରàଶାନàତà"
#. TRANSLATORS: command line argument, just show the version string
-#: ../client/pk-console.c:990 ../client/pk-monitor.c:278
+#: ../client/pk-console.c:1153 ../client/pk-monitor.c:283
msgid "Show the program version and exit"
msgstr "ପàରà¬àରାମ ସà¬à¬¸àà¬à¬°à¬£ ଦରàଶାନàତà à¬à¬¬à¬ ପàରସàଥାନ à¬à¬°à¬¨àତà"
#. TRANSLATORS: command line argument, use a filter to narrow down results
-#: ../client/pk-console.c:993
+#: ../client/pk-console.c:1156
msgid "Set the filter, e.g. installed"
msgstr "à¬à¬¾à¬£à¬ ସàଠà¬à¬°à¬¨àତà, ଯàପରିà¬à¬¿ ସàଥାପିତ"
#. TRANSLATORS: command line argument, work asynchronously
-#: ../client/pk-console.c:996
+#: ../client/pk-console.c:1159
msgid "Exit without waiting for actions to complete"
msgstr "à¬à¬¾à¬°àଯàà ସମàପàରàଣàଣ ହàବା ପରàଯààନàତ à¬
ପàà¬àଷା ନà¬à¬°à¬¿ ପàରସàଥାନ à¬à¬°à¬¨àତà"
+#. command line argument, do we ask questions
+#: ../client/pk-console.c:1162
+#: ../contrib/debuginfo-install/pk-debuginfo-install.c:530
+msgid "Install the packages without asking for confirmation"
+msgstr "ନିଶàà¬à¬¿à¬¤à¬à¬°à¬£ ବିନା ପààାà¬àà¬à¬àଡ଼ିà¬à ସàଥାପନ à¬à¬°à¬¨àତà"
+
+#. TRANSLATORS: command line argument, this command is not a priority
+#: ../client/pk-console.c:1165
+msgid "Run the command using idle network bandwidth and also using less power"
+msgstr "ସàଥିର ନàà¬à±à¬°àଠବààାଣàଡà±à¬¿à¬¡à¬¼à¬¥ ବààବହାର à¬à¬°à¬¿ ନିରàଦàଦàଶà¬à à¬à¬²à¬¾à¬¨àତà à¬à¬¬à¬ à¬à¬® ବିଦàààତ ଶà¬àତି ବààବହାର à¬à¬°à¬¿"
+
#. TRANSLATORS: we failed to contact the daemon
-#: ../client/pk-console.c:1022
+#: ../client/pk-console.c:1191
msgid "Failed to contact PackageKit"
msgstr "PackageKit ସହିତ ଯàà¬à¬¾à¬¯àଠà¬à¬°à¬¿à¬¬à¬¾à¬°à ବିଫଳ"
#. TRANSLATORS: The user specified an incorrect filter
-#: ../client/pk-console.c:1074
+#: ../client/pk-console.c:1247
msgid "The filter specified was invalid"
msgstr "à¬à¬²àଲିà¬à¬¿à¬¤ à¬à¬¾à¬£à¬à¬à¬¿ à¬
ବàଧ à¬
à¬à"
#. TRANSLATORS: a search type can be name, details, file, etc
-#: ../client/pk-console.c:1093
+#: ../client/pk-console.c:1266
msgid "A search type is required, e.g. name"
msgstr "à¬àà¬à¬¿à¬ ସନàଧାନ ପàରà¬à¬¾à¬° à¬à¬¬à¬¶ààà¬, ଯàପରିà¬à¬¿ ନାମ"
#. TRANSLATORS: the user needs to provide a search term
-#: ../client/pk-console.c:1100 ../client/pk-console.c:1112
-#: ../client/pk-console.c:1124 ../client/pk-console.c:1136
+#: ../client/pk-console.c:1273 ../client/pk-console.c:1285
+#: ../client/pk-console.c:1297 ../client/pk-console.c:1309
msgid "A search term is required"
msgstr "à¬àà¬à¬¿à¬ ସନàଧାନ ନିତି à¬à¬¬à¬¶ààà¬"
#. TRANSLATORS: the search type was provided, but invalid
-#: ../client/pk-console.c:1146
+#: ../client/pk-console.c:1319
msgid "Invalid search type"
msgstr "à¬
ବàଧ ସନàଧାନ ପàରà¬à¬¾à¬°"
#. TRANSLATORS: the user did not specify what they wanted to install
-#: ../client/pk-console.c:1152
+#: ../client/pk-console.c:1325
msgid "A package name to install is required"
msgstr "ସàଥାପନ à¬à¬°à¬¿à¬¬à¬¾ ପାà¬à¬ à¬àà¬à¬¿à¬ ପààାà¬àଠନାମ à¬à¬¬à¬¶ààà¬"
#. TRANSLATORS: the user did not specify what they wanted to install
-#: ../client/pk-console.c:1161
+#: ../client/pk-console.c:1334
msgid "A filename to install is required"
msgstr "ସàଥାପନ à¬à¬°à¬¿à¬¬à¬¾ ପାà¬à¬ à¬àà¬à¬¿à¬ ଫାà¬à¬² ନାମ à¬à¬¬à¬¶ààà¬"
#. TRANSLATORS: geeky error, 99.9999% of users won't see this
-#: ../client/pk-console.c:1173
+#: ../client/pk-console.c:1346
msgid "A type, key_id and package_id are required"
msgstr "à¬àà¬à¬¿à¬ ପàରà¬à¬¾à¬°, key_id à¬à¬¬à¬ package_id à¬à¬¬à¬¶ààà¬"
#. TRANSLATORS: the user did not specify what they wanted to remove
-#: ../client/pk-console.c:1184
+#: ../client/pk-console.c:1357
msgid "A package name to remove is required"
msgstr "à¬à¬¾à¬¢à¬¼à¬¿à¬¬à¬¾ ପାà¬à¬ à¬àà¬à¬¿à¬ ପààାà¬àଠନାମ à¬à¬¬à¬¶ààà¬"
#. TRANSLATORS: the user did not specify anything about what to download or where
-#: ../client/pk-console.c:1193
+#: ../client/pk-console.c:1366
msgid "A destination directory and the package names to download are required"
msgstr "à¬àà¬à¬¿à¬ ଲà¬àଷàଯସàଥଳ ଡିରàà¬àà¬àରà à¬à¬¬à¬ à¬à¬¹à¬°à¬£ à¬à¬°à¬¿à¬¬à¬¾ ପାà¬à¬ ପààାà¬àଠନାମà¬àଡ଼ିଠà¬à¬¬à¬¶ààà¬"
#. TRANSLATORS: the directory does not exist, so we can't continue
-#: ../client/pk-console.c:1200
+#: ../client/pk-console.c:1373
msgid "Directory not found"
msgstr "ଡିରàà¬àà¬àରà ମିଳàନାହିà¬"
#. TRANSLATORS: geeky error, 99.9999% of users won't see this
-#: ../client/pk-console.c:1209
+#: ../client/pk-console.c:1382
msgid "A licence identifier (eula-id) is required"
msgstr "à¬àà¬à¬¿à¬ à¬
ନàମତିପତàର ପରିà¬à¬¾àଠ(eula-id) à¬à¬¬à¬¶ààà¬"
#. TRANSLATORS: geeky error, 99.9999% of users won't see this
-#: ../client/pk-console.c:1220
+#: ../client/pk-console.c:1393
msgid "A transaction identifier (tid) is required"
msgstr "à¬àà¬à¬¿à¬ à¬à¬¾à¬°à¬¬à¬¾à¬° ପରିà¬à¬¾àଠ(tid) à¬à¬¬à¬¶ààà¬"
#. TRANSLATORS: The user did not specify a package name
-#: ../client/pk-console.c:1241
+#: ../client/pk-console.c:1414
msgid "A package name to resolve is required"
msgstr "ସମାଧାନ à¬à¬°à¬¿à¬¬à¬¾ ପାà¬à¬ à¬àà¬à¬¿à¬ ପààାà¬àଠନାମ à¬à¬¬à¬¶ààà¬"
#. TRANSLATORS: The user did not specify a repository (software source) name
-#: ../client/pk-console.c:1252 ../client/pk-console.c:1263
+#: ../client/pk-console.c:1425 ../client/pk-console.c:1436
msgid "A repository name is required"
msgstr "à¬àà¬à¬¿à¬ ସà¬à¬àରହାଳà ନାମ à¬à¬¬à¬¶ààà¬"
#. TRANSLATORS: The user didn't provide any data
-#: ../client/pk-console.c:1274
+#: ../client/pk-console.c:1447
msgid "A repo name, parameter and value are required"
msgstr "à¬àà¬à¬¿à¬ ସà¬à¬àରହାଳà, ପàରାà¬à¬³ à¬à¬¬à¬ ମàଲàà à¬à¬¬à¬¶ààà¬"
#. TRANSLATORS: The user didn't specify what action to use
-#: ../client/pk-console.c:1291
+#: ../client/pk-console.c:1464
msgid "An action, e.g. 'update-system' is required"
msgstr "à¬àà¬à¬¿à¬ à¬à¬¾à¬°àଯàà, à¬à¬¦à¬¾à¬¹à¬°à¬£ ସàà±à¬°àପ 'update-system' à¬à¬¬à¬¶ààà¬"
#. TRANSLATORS: The user specified an invalid action
-#: ../client/pk-console.c:1298
+#: ../client/pk-console.c:1471
msgid "A correct role is required"
msgstr "à¬àà¬à¬¿à¬ ସଠିଠà¬àମିà¬à¬¾ à¬à¬¬à¬¶ààà¬"
#. TRANSLATORS: The user did not provide a package name
#. TRANSLATORS: This is when the user fails to supply the package name
-#: ../client/pk-console.c:1308 ../client/pk-console.c:1323
-#: ../client/pk-console.c:1332 ../client/pk-console.c:1352
-#: ../client/pk-console.c:1361 ../client/pk-generate-pack.c:287
+#: ../client/pk-console.c:1481 ../client/pk-console.c:1496
+#: ../client/pk-console.c:1505 ../client/pk-console.c:1525
+#: ../client/pk-console.c:1534 ../client/pk-generate-pack.c:287
msgid "A package name is required"
msgstr "à¬àà¬à¬¿à¬ ପààାà¬àଠନାମ à¬à¬¬à¬¶ààà¬"
#. TRANSLATORS: each package "provides" certain things, e.g. mime(gstreamer-decoder-mp3), the user didn't specify it
-#: ../client/pk-console.c:1341
+#: ../client/pk-console.c:1514
msgid "A package provide string is required"
msgstr "à¬àà¬à¬¿à¬ ପààାà¬àଠପàରଦତàତ ବାà¬ààà¬à¬£àଡ à¬à¬¬à¬¶ààà¬"
#. TRANSLATORS: The user tried to use an unsupported option on the command line
-#: ../client/pk-console.c:1421
+#: ../client/pk-console.c:1594
#, c-format
msgid "Option '%s' is not supported"
msgstr "ବିà¬à¬³àପ '%s' à¬à¬¿ ସମରàଥିତ ନàହà¬"
#. TRANSLATORS: Generic failure of what they asked to do
-#: ../client/pk-console.c:1431
+#: ../client/pk-console.c:1604
msgid "Command failed"
msgstr "ନିରàଦàଦàଶ ବିଫଳ ହàà¬à¬à¬¿"
@@ -605,155 +617,160 @@ msgstr "ସରàà¬à¬¿à¬¸ ପààାଠନିରàମାଣ ହàà¬à¬
à¬
msgid "Failed to create '%s': %s"
msgstr "'%s'à¬à ନିରàମାଣ à¬à¬°à¬¿à¬¬à¬¾à¬°à ବିଫଳ: %s"
-#: ../client/pk-monitor.c:206
+#: ../client/pk-monitor.c:211
msgid "Failed to get daemon state"
msgstr "ଡàମନ ସàଥିତି ପାà¬à¬¬à¬¾à¬°à ବିଫଳ"
#. TRANSLATORS: this is a program that monitors PackageKit
-#: ../client/pk-monitor.c:294
+#: ../client/pk-monitor.c:299
msgid "PackageKit Monitor"
msgstr "PackageKit ପàରଦରàଶିà¬à¬¾"
#. TRANSLATORS: when we are getting data from the daemon
-#: ../contrib/browser-plugin/pk-plugin-install.c:491
+#: ../contrib/browser-plugin/pk-plugin-install.c:495
msgid "Getting package information..."
msgstr "ପààାà¬àଠସàà¬à¬¨à¬¾ à¬àରହଣ à¬à¬°àà¬
à¬à¬¿..."
#. TRANSLATORS: run an applicaiton
-#: ../contrib/browser-plugin/pk-plugin-install.c:497
+#: ../contrib/browser-plugin/pk-plugin-install.c:501
#, c-format
msgid "Run %s"
msgstr "%s à¬à à¬à¬²à¬¾à¬¨àତà"
#. TRANSLATORS: show the installed version of a package
-#: ../contrib/browser-plugin/pk-plugin-install.c:503
+#: ../contrib/browser-plugin/pk-plugin-install.c:507
msgid "Installed version"
msgstr "ସàଥାପିତ ସà¬à¬¸àà¬à¬°à¬£"
#. TRANSLATORS: run the application now
-#: ../contrib/browser-plugin/pk-plugin-install.c:511
+#: ../contrib/browser-plugin/pk-plugin-install.c:515
#, c-format
msgid "Run version %s now"
msgstr "ସà¬à¬¸àà¬à¬°à¬£ %s à¬à ବରàତàତମାନ à¬à¬²à¬¾à¬¨àତà"
#. TRANSLATORS: run the application now
-#: ../contrib/browser-plugin/pk-plugin-install.c:517
+#: ../contrib/browser-plugin/pk-plugin-install.c:521
msgid "Run now"
msgstr "ବରàତàତମାନ à¬à¬²à¬¾à¬¨àତà"
#. TRANSLATORS: update to a new version of the package
-#: ../contrib/browser-plugin/pk-plugin-install.c:523
+#: ../contrib/browser-plugin/pk-plugin-install.c:527
#, c-format
msgid "Update to version %s"
msgstr "ସà¬à¬¸àà¬à¬°à¬£ %sà¬à à¬
ଦààତନ à¬à¬°à¬¨àତà"
#. TRANSLATORS: To install a package
-#: ../contrib/browser-plugin/pk-plugin-install.c:529
+#: ../contrib/browser-plugin/pk-plugin-install.c:533
#, c-format
msgid "Install %s now"
msgstr "%s à¬à ବରàତàତମାନ ସàଥାପନ à¬à¬°à¬¨àତà"
#. TRANSLATORS: the version of the package
-#: ../contrib/browser-plugin/pk-plugin-install.c:532
+#: ../contrib/browser-plugin/pk-plugin-install.c:536
msgid "Version"
msgstr "ସà¬à¬¸àà¬à¬°à¬£"
#. TRANSLATORS: noting found, so can't install
-#: ../contrib/browser-plugin/pk-plugin-install.c:537
+#: ../contrib/browser-plugin/pk-plugin-install.c:541
msgid "No packages found for your system"
msgstr "à¬à¬ªà¬£à¬àଠତନàତàର ପାà¬à¬ à¬àଣସି ପààାà¬àଠମିଳିଲା ନାହିà¬"
#. TRANSLATORS: package is being installed
-#: ../contrib/browser-plugin/pk-plugin-install.c:542
+#: ../contrib/browser-plugin/pk-plugin-install.c:546
msgid "Installing..."
msgstr "ସàଥାପନ à¬à¬°àà¬
à¬à¬¿..."
#. TRANSLATORS: downloading repo data so we can search
-#: ../contrib/command-not-found/pk-command-not-found.c:357
+#: ../contrib/command-not-found/pk-command-not-found.c:365
msgid "Downloading details about the software sources."
msgstr "ସଫàà¬à±àର à¬à¬¤àସà¬àଡ଼ିଠବିଷàରà ବିବରଣàà¬àଡ଼ିà¬à à¬à¬¹à¬°à¬£ à¬à¬°àà¬
à¬à¬¿à¥¤"
#. TRANSLATORS: downloading file lists so we can search
-#: ../contrib/command-not-found/pk-command-not-found.c:361
+#: ../contrib/command-not-found/pk-command-not-found.c:369
msgid "Downloading filelists (this may take some time to complete)."
msgstr "ଫାà¬à¬² ତାଲିà¬à¬¾à¬àଡ଼ିà¬à à¬à¬¹à¬°à¬£ à¬à¬°àà¬
à¬à¬¿ (ସମàପàରàଣàଣ ହàବା ପାà¬à¬ à¬à¬¹à¬¾ à¬à¬¿à¬à¬¿ ସମà ନàà¬à¬ªà¬¾à¬°à)।"
#. TRANSLATORS: waiting for native lock
-#: ../contrib/command-not-found/pk-command-not-found.c:365
+#: ../contrib/command-not-found/pk-command-not-found.c:373
msgid "Waiting for package manager lock."
msgstr "ପààାà¬àଠପରିà¬à¬¾à¬³à¬à¬àà¬à à¬
ପàà¬àଷା à¬à¬°à¬¿à¬
à¬à¬¿à¥¤"
#. TRANSLATORS: loading package cache so we can search
-#: ../contrib/command-not-found/pk-command-not-found.c:369
+#: ../contrib/command-not-found/pk-command-not-found.c:377
msgid "Loading list of packages."
msgstr "ପààାà¬àଠତାଲିà¬à¬¾à¬àଡ଼ିà¬à à¬à¬¹à¬°à¬£ à¬à¬°àà¬
à¬à¬¿à¥¤"
#. TRANSLATORS: we failed to find the package, this shouldn't happen
-#: ../contrib/command-not-found/pk-command-not-found.c:413
+#: ../contrib/command-not-found/pk-command-not-found.c:423
msgid "Failed to search for file"
msgstr "ଫାà¬à¬² ସନàଧାନ à¬à¬°à¬¿à¬¬à¬¾à¬°à ବିଫଳ"
+#. TRANSLATORS: we failed to launch the executable, the error follows
+#: ../contrib/command-not-found/pk-command-not-found.c:562
+msgid "Failed to launch:"
+msgstr "à¬à¬°à¬®àଠà¬à¬°à¬¿à¬¬à¬¾à¬°à ବିଫଳ:"
+
#. TRANSLATORS: we failed to install the package
-#: ../contrib/command-not-found/pk-command-not-found.c:554
+#: ../contrib/command-not-found/pk-command-not-found.c:590
msgid "Failed to install packages"
msgstr "ପààାà¬àà¬à¬àଡ଼ିà¬à ସàଥାପନ à¬à¬°à¬¿à¬¬à¬¾à¬°à ବିଫଳ"
#. TRANSLATORS: tool that gets called when the command is not found
-#: ../contrib/command-not-found/pk-command-not-found.c:632
+#: ../contrib/command-not-found/pk-command-not-found.c:669
msgid "PackageKit Command Not Found"
msgstr "PackageKit ନିରàଦàଦàଶ ମିଳିଲା ନାହିà¬"
#. TRANSLATORS: the prefix of all the output telling the user why it's not executing
-#: ../contrib/command-not-found/pk-command-not-found.c:660
+#: ../contrib/command-not-found/pk-command-not-found.c:699
msgid "Command not found."
msgstr "ନିରàଦàଦàଶ ମିଳିଲା ନାହିà¬à¥¤"
#. TRANSLATORS: tell the user what we think the command is
-#: ../contrib/command-not-found/pk-command-not-found.c:667
+#: ../contrib/command-not-found/pk-command-not-found.c:706
msgid "Similar command is:"
msgstr "à¬à¬à¬¾à¬ªàରà¬à¬¾à¬° ନିରàଦàଦàଶ:"
#. TRANSLATORS: Ask the user if we should run the similar command
-#: ../contrib/command-not-found/pk-command-not-found.c:676
+#: ../contrib/command-not-found/pk-command-not-found.c:716
msgid "Run similar command:"
msgstr "à¬à¬à¬¾ ପàରà¬à¬¾à¬° ନିରàଦàଦàଶ à¬à¬²à¬¾à¬¨àତà:"
#. TRANSLATORS: show the user a list of commands that they could have meant
#. TRANSLATORS: show the user a list of commands we could run
-#: ../contrib/command-not-found/pk-command-not-found.c:688
-#: ../contrib/command-not-found/pk-command-not-found.c:697
+#: ../contrib/command-not-found/pk-command-not-found.c:730
+#: ../contrib/command-not-found/pk-command-not-found.c:739
msgid "Similar commands are:"
msgstr "à¬à¬à¬¾ ପàରà¬à¬¾à¬° ନିରàଦàଦàଶà¬àଡ଼ିଠହàà¬à¬à¬¿:"
#. TRANSLATORS: ask the user to choose a file to run
-#: ../contrib/command-not-found/pk-command-not-found.c:704
+#: ../contrib/command-not-found/pk-command-not-found.c:746
msgid "Please choose a command to run"
msgstr "ଦàାà¬à¬°à¬¿ à¬à¬²à¬¾à¬à¬¬à¬¾ ପାà¬à¬ à¬àà¬à¬¿à¬ ନିରàଦàଦàଶ ବାà¬à¬¨àତà"
#. TRANSLATORS: tell the user what package provides the command
-#: ../contrib/command-not-found/pk-command-not-found.c:720
+#: ../contrib/command-not-found/pk-command-not-found.c:766
msgid "The package providing this file is:"
msgstr "à¬à¬¹à¬¿ ଫାà¬à¬² ପàରଦାନ à¬à¬°à¬¿à¬¥à¬¿à¬¬à¬¾ ପààାà¬àà¬à¬à¬¿ ହàà¬à¬à¬¿:"
#. TRANSLATORS: as the user if we want to install a package to provide the command
-#: ../contrib/command-not-found/pk-command-not-found.c:725
+#: ../contrib/command-not-found/pk-command-not-found.c:771
#, c-format
msgid "Install package '%s' to provide command '%s'?"
msgstr "ନିରàଦàଦàଶ '%s'à¬à ପàରଦାନ à¬à¬°à¬¿à¬¬à¬¾ ପାà¬à¬ ପààାà¬àଠ'%s'à¬à ସàଥାପନ à¬à¬°à¬¿à¬¬à à¬à¬¿?"
#. TRANSLATORS: Show the user a list of packages that provide this command
-#: ../contrib/command-not-found/pk-command-not-found.c:743
+#: ../contrib/command-not-found/pk-command-not-found.c:795
msgid "Packages providing this file are:"
msgstr "à¬à¬¹à¬¿ ଫାà¬à¬² ପàରଦାନ à¬à¬°à¬¿à¬¥à¬¿à¬¬à¬¾ ପààାà¬àà¬à¬àଡ଼ିଠହàà¬à¬à¬¿:"
#. TRANSLATORS: Show the user a list of packages that they can install to provide this command
-#: ../contrib/command-not-found/pk-command-not-found.c:753
+#: ../contrib/command-not-found/pk-command-not-found.c:805
msgid "Suitable packages are:"
msgstr "à¬à¬ªà¬¯àà¬àତ ପààାà¬àà¬à¬àଡ଼ିଠହàà¬à¬à¬¿:"
#. get selection
#. TRANSLATORS: ask the user to choose a file to install
-#: ../contrib/command-not-found/pk-command-not-found.c:762
+#: ../contrib/command-not-found/pk-command-not-found.c:814
msgid "Please choose a package to install"
msgstr "ସàଥାପନ à¬à¬°à¬¿à¬¬à¬¾ ପାà¬à¬ ଦàାà¬à¬°à¬¿ à¬àà¬à¬¿à¬ ପààାà¬àଠବାà¬à¬¨àତà"
@@ -769,183 +786,183 @@ msgid "Failed to find the package %s, or already installed: %s"
msgstr "ପààାà¬àଠ%s à¬à à¬àà¬à¬¿à¬ªà¬¾à¬à¬¬à¬¾à¬°à à¬
ସଫଳ, à¬
ଥବା ପàରàବରà ସàଥାପିତ ହàà¬à¬à¬¿: %s"
#. command line argument, simulate what would be done, but don't actually do it
-#: ../contrib/debuginfo-install/pk-debuginfo-install.c:514
+#: ../contrib/debuginfo-install/pk-debuginfo-install.c:521
msgid "Don't actually install any packages, only simulate what would be installed"
msgstr "ପàରà¬àତରà à¬àଣସି ପààାà¬àà¬à¬àଡ଼ିà¬à ସàଥାପନ à¬à¬°à¬¿à¬¨à¬¥à¬¾à¬, à¬àବଳ ଯାହାà¬à ସàଥାପନ à¬à¬°à¬¿à¬¬à¬¾ à¬à¬à¬¿à¬¤ ତାହାà¬à ସà¬àରିà à¬à¬°à¬¨àତà"
#. command line argument, do we skip packages that depend on the ones specified
-#: ../contrib/debuginfo-install/pk-debuginfo-install.c:517
+#: ../contrib/debuginfo-install/pk-debuginfo-install.c:524
msgid "Do not install dependencies of the core packages"
msgstr "ମàà¬àà ପààାà¬àà¬à¬àଡ଼ିà¬à¬° ନିରàà¬à¬°à¬à¬àଡ଼ିà¬à ସàଥାପନ à¬à¬°à¬¨àତà ନାହିà¬"
#. command line argument, do we operate quietly
-#: ../contrib/debuginfo-install/pk-debuginfo-install.c:520
+#: ../contrib/debuginfo-install/pk-debuginfo-install.c:527
msgid "Do not display information or progress"
msgstr "ସàà¬à¬¨à¬¾ à¬
ଥବା à¬à¬¨àନତିà¬à ଦରàଶାନàତà ନାହିà¬"
#. TRANSLATORS: tool that gets called when the command is not found
-#: ../contrib/debuginfo-install/pk-debuginfo-install.c:535
+#: ../contrib/debuginfo-install/pk-debuginfo-install.c:545
msgid "PackageKit Debuginfo Installer"
msgstr "PackageKit ତàରàà¬à¬¿ ନିବାରଣ ସàà¬à¬¨à¬¾ ସàଥାପà¬"
#. TRANSLATORS: the use needs to specify a list of package names on the command line
-#: ../contrib/debuginfo-install/pk-debuginfo-install.c:550
+#: ../contrib/debuginfo-install/pk-debuginfo-install.c:560
#, c-format
msgid "ERROR: Specify package names to install."
msgstr "ତàରàà¬à¬¿: ସàଥାପନ à¬à¬°à¬¿à¬¬à¬¾à¬à ଥିବା ପààାà¬àଠନାମà¬àଡ଼ିà¬à à¬à¬²àଲàଠà¬à¬°à¬¨àତà।"
#. TRANSLATORS: we are getting the list of repositories
-#: ../contrib/debuginfo-install/pk-debuginfo-install.c:579
+#: ../contrib/debuginfo-install/pk-debuginfo-install.c:596
#, c-format
msgid "Getting sources list"
msgstr "à¬à¬¤àସà¬àଡ଼ିà¬à¬° ତାଲିà¬à¬¾ à¬àରହଣ à¬à¬°àà¬
à¬à¬¿"
#. TRANSLATORS: operation was not successful
-#: ../contrib/debuginfo-install/pk-debuginfo-install.c:589
-#: ../contrib/debuginfo-install/pk-debuginfo-install.c:664
-#: ../contrib/debuginfo-install/pk-debuginfo-install.c:748
-#: ../contrib/debuginfo-install/pk-debuginfo-install.c:792
-#: ../contrib/debuginfo-install/pk-debuginfo-install.c:859
-#: ../contrib/debuginfo-install/pk-debuginfo-install.c:903
+#: ../contrib/debuginfo-install/pk-debuginfo-install.c:606
+#: ../contrib/debuginfo-install/pk-debuginfo-install.c:681
+#: ../contrib/debuginfo-install/pk-debuginfo-install.c:765
+#: ../contrib/debuginfo-install/pk-debuginfo-install.c:809
+#: ../contrib/debuginfo-install/pk-debuginfo-install.c:876
+#: ../contrib/debuginfo-install/pk-debuginfo-install.c:920
msgid "FAILED."
msgstr "FAILED."
#. TRANSLATORS: all completed 100%
-#: ../contrib/debuginfo-install/pk-debuginfo-install.c:604
-#: ../contrib/debuginfo-install/pk-debuginfo-install.c:644
-#: ../contrib/debuginfo-install/pk-debuginfo-install.c:679
-#: ../contrib/debuginfo-install/pk-debuginfo-install.c:763
-#: ../contrib/debuginfo-install/pk-debuginfo-install.c:807
-#: ../contrib/debuginfo-install/pk-debuginfo-install.c:874
-#: ../contrib/debuginfo-install/pk-debuginfo-install.c:918
+#: ../contrib/debuginfo-install/pk-debuginfo-install.c:621
+#: ../contrib/debuginfo-install/pk-debuginfo-install.c:661
+#: ../contrib/debuginfo-install/pk-debuginfo-install.c:696
+#: ../contrib/debuginfo-install/pk-debuginfo-install.c:780
+#: ../contrib/debuginfo-install/pk-debuginfo-install.c:824
+#: ../contrib/debuginfo-install/pk-debuginfo-install.c:891
+#: ../contrib/debuginfo-install/pk-debuginfo-install.c:935
#, c-format
msgid "OK."
msgstr "OK."
#. TRANSLATORS: tell the user what we found
-#: ../contrib/debuginfo-install/pk-debuginfo-install.c:607
+#: ../contrib/debuginfo-install/pk-debuginfo-install.c:624
#, c-format
msgid "Found %i enabled and %i disabled sources."
msgstr "%i ସà¬àରିà à¬à¬¬à¬ %i ନିଷàà¬àରିà à¬à¬¤àସà¬àଡ଼ିà¬à ପାà¬à¬à¬¿à¥¤"
#. TRANSLATORS: we're finding repositories that match out pattern
-#: ../contrib/debuginfo-install/pk-debuginfo-install.c:614
+#: ../contrib/debuginfo-install/pk-debuginfo-install.c:631
#, c-format
msgid "Finding debugging sources"
msgstr "ତàରàà¬à¬¿ ନିବାରଣ à¬à¬¤àସà¬àଡ଼ିà¬à ପାà¬à¬
à¬à¬¿"
#. TRANSLATORS: tell the user what we found
-#: ../contrib/debuginfo-install/pk-debuginfo-install.c:647
+#: ../contrib/debuginfo-install/pk-debuginfo-install.c:664
#, c-format
msgid "Found %i disabled debuginfo repos."
msgstr "%i ନିଷàà¬àରିà ତàରàà¬à¬¿ ନିବାରଣ à¬à¬¤àସ ସà¬à¬àରହଳà ମିଳିà¬à¬¿à¥¤"
#. TRANSLATORS: we're now enabling all the debug sources we found
-#: ../contrib/debuginfo-install/pk-debuginfo-install.c:654
+#: ../contrib/debuginfo-install/pk-debuginfo-install.c:671
#, c-format
msgid "Enabling debugging sources"
msgstr "ତàରàà¬à¬¿à¬¨à¬¿à¬¬à¬¾à¬°à¬£ à¬à¬¤àସà¬àଡ଼ିà¬à ସà¬àରିà à¬à¬°àà¬
à¬à¬¿"
#. TRANSLATORS: tell the user how many we enabled
-#: ../contrib/debuginfo-install/pk-debuginfo-install.c:682
+#: ../contrib/debuginfo-install/pk-debuginfo-install.c:699
#, c-format
msgid "Enabled %i debugging sources."
msgstr "%i ତàରàà¬à¬¿à¬¨à¬¿à¬¬à¬¾à¬°à¬£ à¬à¬¤àସà¬àଡ଼ିà¬à ସà¬àରିà à¬à¬°à¬¿à¬
à¬à¬¿à¥¤"
#. TRANSLATORS: we're now finding packages that match in all the repos
-#: ../contrib/debuginfo-install/pk-debuginfo-install.c:689
+#: ../contrib/debuginfo-install/pk-debuginfo-install.c:706
#, c-format
msgid "Finding debugging packages"
msgstr "ତàରàà¬à¬¿ ନିବାରଣ ପààାà¬àà¬à¬àଡ଼ିà¬à à¬àà¬àà¬
à¬à¬¿"
#. TRANSLATORS: we couldn't find the package name, non-fatal
-#: ../contrib/debuginfo-install/pk-debuginfo-install.c:701
+#: ../contrib/debuginfo-install/pk-debuginfo-install.c:718
#, c-format
msgid "Failed to find the package %s: %s"
msgstr "ପààାà¬àଠ%s à¬à à¬àà¬à¬¿à¬¬à¬¾à¬°à ବିଫଳ: %s"
#. TRANSLATORS: we couldn't find the debuginfo package name, non-fatal
-#: ../contrib/debuginfo-install/pk-debuginfo-install.c:724
+#: ../contrib/debuginfo-install/pk-debuginfo-install.c:741
#, c-format
msgid "Failed to find the debuginfo package %s: %s"
msgstr "ତàରàà¬à¬¿à¬¨à¬¿à¬¬à¬¾à¬°à¬£ ପààାà¬àଠ%sà¬à à¬àà¬à¬¿à¬¬à¬¾à¬°à ବିଫଳ: %s"
#. TRANSLATORS: no debuginfo packages could be found to be installed
-#: ../contrib/debuginfo-install/pk-debuginfo-install.c:752
+#: ../contrib/debuginfo-install/pk-debuginfo-install.c:769
#, c-format
msgid "Found no packages to install."
msgstr "ସàଥାପନ à¬à¬°à¬¿à¬¬à¬¾ à¬àଣସି ପààାà¬àଠମିଳିଲା ନାହିà¬à¥¤"
#. TRANSLATORS: tell the user we found some packages, and then list them
-#: ../contrib/debuginfo-install/pk-debuginfo-install.c:766
+#: ../contrib/debuginfo-install/pk-debuginfo-install.c:783
#, c-format
msgid "Found %i packages:"
msgstr "%i ପààାà¬àà¬à¬àଡ଼ିଠମିଳିଲା:"
#. TRANSLATORS: tell the user we are searching for deps
-#: ../contrib/debuginfo-install/pk-debuginfo-install.c:782
+#: ../contrib/debuginfo-install/pk-debuginfo-install.c:799
#, c-format
msgid "Finding packages that depend on these packages"
msgstr "à¬à¬¹à¬¿ ପààାà¬àà¬à¬àଡ଼ିଠà¬à¬ªà¬°à ନିରàà¬à¬° à¬à¬°àଥିବା ପààାà¬àà¬à¬àଡ଼ିà¬à à¬àà¬àà¬
à¬à¬¿"
#. TRANSLATORS: could not install, detailed error follows
-#: ../contrib/debuginfo-install/pk-debuginfo-install.c:795
+#: ../contrib/debuginfo-install/pk-debuginfo-install.c:812
#, c-format
msgid "Could not find dependant packages: %s"
msgstr "ନିରàà¬à¬°à¬ ପààାà¬àà¬à¬àଡ଼ିà¬à à¬àà¬à¬¿ ପାà¬à¬²à¬¾ ନାହିà¬: %s"
#. TRANSLATORS: tell the user we found some more packages
-#: ../contrib/debuginfo-install/pk-debuginfo-install.c:811
+#: ../contrib/debuginfo-install/pk-debuginfo-install.c:828
#, c-format
msgid "Found %i extra packages."
msgstr "%i à¬
ତିରିà¬àତ ପààାà¬àà¬à¬àଡ଼ିà¬à à¬àà¬à¬¿à¬ªà¬¾à¬à¬²à¬¾à¥¤"
#. TRANSLATORS: tell the user we found some more packages
-#: ../contrib/debuginfo-install/pk-debuginfo-install.c:815
+#: ../contrib/debuginfo-install/pk-debuginfo-install.c:832
#, c-format
msgid "No extra packages required."
msgstr "à¬àଣସି à¬
ତିରିà¬àତ ପààାà¬àଠà¬à¬¬à¬¶ààଠନାହିà¬à¥¤"
#. TRANSLATORS: tell the user we found some packages (and deps), and then list them
-#: ../contrib/debuginfo-install/pk-debuginfo-install.c:824
+#: ../contrib/debuginfo-install/pk-debuginfo-install.c:841
#, c-format
msgid "Found %i packages to install:"
msgstr "ସàଥାପନ à¬à¬°à¬¿à¬¬à¬¾ ପାà¬à¬ %i ପààାà¬àà¬à¬àଡ଼ିଠମିଳିଲା:"
#. TRANSLATORS: simulate mode is a testing mode where we quit before the action
-#: ../contrib/debuginfo-install/pk-debuginfo-install.c:837
+#: ../contrib/debuginfo-install/pk-debuginfo-install.c:854
#, c-format
msgid "Not installing packages in simulate mode"
msgstr "ପààାà¬àà¬à¬àଡ଼ିà¬à ସà¬àରିà à¬
ବସàଥାରà ସàଥାପନ à¬à¬°àନାହିà¬"
#. TRANSLATORS: we are now installing the debuginfo packages we found earlier
#. TRANSLATORS: transaction state, installing packages
-#: ../contrib/debuginfo-install/pk-debuginfo-install.c:849
-#: ../lib/packagekit-glib2/pk-console-shared.c:270
+#: ../contrib/debuginfo-install/pk-debuginfo-install.c:866
+#: ../lib/packagekit-glib2/pk-console-shared.c:282
#, c-format
msgid "Installing packages"
msgstr "ପààାà¬àà¬à¬àଡ଼ିà¬à ସàଥାପନ à¬à¬°àà¬
à¬à¬¿"
#. TRANSLATORS: could not install, detailed error follows
-#: ../contrib/debuginfo-install/pk-debuginfo-install.c:862
+#: ../contrib/debuginfo-install/pk-debuginfo-install.c:879
#, c-format
msgid "Could not install packages: %s"
msgstr "ପààାà¬àà¬à¬àଡ଼ିà¬à ସàଥାପନ à¬à¬°à¬¿à¬ªà¬¾à¬°à¬¿à¬²à¬¾ ନାହିà¬: %s"
#. TRANSLATORS: we are now disabling all debuginfo repos we previously enabled
-#: ../contrib/debuginfo-install/pk-debuginfo-install.c:894
+#: ../contrib/debuginfo-install/pk-debuginfo-install.c:911
#, c-format
msgid "Disabling sources previously enabled"
msgstr "ପàରàବରà ସà¬àରିà à¬à¬¤àସà¬àଡ଼ିà¬à ନିଷàà¬àରିà à¬à¬°àà¬
à¬à¬¿"
#. TRANSLATORS: no debuginfo packages could be found to be installed, detailed error follows
-#: ../contrib/debuginfo-install/pk-debuginfo-install.c:906
+#: ../contrib/debuginfo-install/pk-debuginfo-install.c:923
#, c-format
msgid "Could not disable the debugging sources: %s"
msgstr "ତàରàà¬à¬¿ ନିବାରଣ à¬à¬¤àସà¬àଡ଼ିà¬à ନିଷàà¬àରିà à¬à¬°à¬¿à¬ªà¬¾à¬°à¬¿à¬²à¬¾ ନାହିà¬: %s"
#. TRANSLATORS: we disabled all the debugging repos that we enabled before
-#: ../contrib/debuginfo-install/pk-debuginfo-install.c:921
+#: ../contrib/debuginfo-install/pk-debuginfo-install.c:938
#, c-format
msgid "Disabled %i debugging sources."
msgstr "%i ତàରàà¬à¬¿ ନିବାରଣ à¬à¬¤àସà¬àଡ଼ିà¬à ନିଷàà¬àରିà à¬à¬°à¬¿à¬¥à¬¾à¬à¥¤"
@@ -1048,604 +1065,604 @@ msgstr "PackageKit ପààାà¬àଠତାଲିà¬à¬¾"
msgid "PackageKit Service Pack"
msgstr "PackageKit ସରàà¬à¬¿à¬¸ ପààାà¬"
-#: ../lib/packagekit-glib2/pk-console-shared.c:55
+#: ../lib/packagekit-glib2/pk-console-shared.c:59
#, c-format
msgid "Please enter a number from 1 to %i: "
msgstr "ଦàାà¬à¬°à¬¿ 1 ରà %i à¬à¬¿à¬¤à¬°à ଥିବା à¬àà¬à¬¿à¬ ସà¬à¬ààାà¬à à¬à¬°à¬£ à¬à¬°à¬¨àତà: "
#. TRANSLATORS: more than one package could be found that matched, to follow is a list of possible packages
-#: ../lib/packagekit-glib2/pk-console-shared.c:177
+#: ../lib/packagekit-glib2/pk-console-shared.c:183
msgid "More than one package matches:"
msgstr "à¬àà¬à¬¿à¬à¬°à à¬
ଧିଠପààାà¬àଠମàଳ à¬à¬¾à¬à¬à¬¿:"
#. TRANSLATORS: This finds out which package in the list to use
-#: ../lib/packagekit-glib2/pk-console-shared.c:186
+#: ../lib/packagekit-glib2/pk-console-shared.c:196
msgid "Please choose the correct package: "
msgstr "ଦàାà¬à¬°à¬¿ ସଠିଠପààାà¬àଠବାà¬à¬¨àତà: "
#. TRANSLATORS: This is when the transaction status is not known
-#: ../lib/packagekit-glib2/pk-console-shared.c:238
+#: ../lib/packagekit-glib2/pk-console-shared.c:250
msgid "Unknown state"
msgstr "à¬
à¬à¬£à¬¾ ସàଥିତି"
#. TRANSLATORS: transaction state, the daemon is in the process of starting
-#: ../lib/packagekit-glib2/pk-console-shared.c:242
+#: ../lib/packagekit-glib2/pk-console-shared.c:254
msgid "Starting"
msgstr "à¬à¬°à¬®àଠà¬à¬°àà¬
à¬à¬¿"
#. TRANSLATORS: transaction state, the transaction is waiting for another to complete
-#: ../lib/packagekit-glib2/pk-console-shared.c:246
+#: ../lib/packagekit-glib2/pk-console-shared.c:258
msgid "Waiting in queue"
msgstr "ଧାଡ଼ିରà à¬
ପàà¬àଷା à¬à¬°à¬¿à¬
à¬à¬¿"
#. TRANSLATORS: transaction state, just started
-#: ../lib/packagekit-glib2/pk-console-shared.c:250
+#: ../lib/packagekit-glib2/pk-console-shared.c:262
msgid "Running"
msgstr "à¬à¬¾à¬²àà¬
à¬à¬¿"
#. TRANSLATORS: transaction state, is querying data
-#: ../lib/packagekit-glib2/pk-console-shared.c:254
+#: ../lib/packagekit-glib2/pk-console-shared.c:266
msgid "Querying"
msgstr "à¬
ନàସନàଧାନ à¬à¬°àà¬
à¬à¬¿"
#. TRANSLATORS: transaction state, getting data from a server
-#: ../lib/packagekit-glib2/pk-console-shared.c:258
+#: ../lib/packagekit-glib2/pk-console-shared.c:270
msgid "Getting information"
msgstr "ସàà¬à¬¨à¬¾ à¬àରହଣ à¬à¬°àà¬
à¬à¬¿"
#. TRANSLATORS: transaction state, removing packages
-#: ../lib/packagekit-glib2/pk-console-shared.c:262
+#: ../lib/packagekit-glib2/pk-console-shared.c:274
msgid "Removing packages"
msgstr "ପààାà¬àà¬à¬àଡ଼ିà¬à à¬à¬¾à¬¢à¬¼àà¬
à¬à¬¿"
#. TRANSLATORS: transaction state, downloading package files
#. TRANSLATORS: The role of the transaction, in present tense
-#: ../lib/packagekit-glib2/pk-console-shared.c:266
-#: ../lib/packagekit-glib2/pk-console-shared.c:644
+#: ../lib/packagekit-glib2/pk-console-shared.c:278
+#: ../lib/packagekit-glib2/pk-console-shared.c:656
msgid "Downloading packages"
msgstr "ପààାà¬àଠà¬à¬¹à¬°à¬£ à¬à¬°àà¬
à¬à¬¿"
#. TRANSLATORS: transaction state, refreshing internal lists
-#: ../lib/packagekit-glib2/pk-console-shared.c:274
+#: ../lib/packagekit-glib2/pk-console-shared.c:286
msgid "Refreshing software list"
msgstr "ସଫàà¬à±àର ତାଲିà¬à¬¾à¬à ସତàଠà¬à¬°àà¬
à¬à¬¿"
#. TRANSLATORS: transaction state, installing updates
-#: ../lib/packagekit-glib2/pk-console-shared.c:278
+#: ../lib/packagekit-glib2/pk-console-shared.c:290
msgid "Installing updates"
msgstr "à¬
ଦààତନà¬àଡ଼ିà¬à ସàଥାପନ à¬à¬°àà¬
à¬à¬¿"
#. TRANSLATORS: transaction state, removing old packages, and cleaning config files
-#: ../lib/packagekit-glib2/pk-console-shared.c:282
+#: ../lib/packagekit-glib2/pk-console-shared.c:294
msgid "Cleaning up packages"
msgstr "ପààାà¬àà¬à¬àଡ଼ିà¬à ସଫା à¬à¬°àà¬
à¬à¬¿"
#. TRANSLATORS: transaction state, obsoleting old packages
-#: ../lib/packagekit-glib2/pk-console-shared.c:286
+#: ../lib/packagekit-glib2/pk-console-shared.c:298
msgid "Obsoleting packages"
msgstr "ପààାà¬àà¬à¬àଡ଼ିà¬à ପàରତààାà¬à¬¾à¬¨ à¬à¬°àà¬
à¬à¬¿"
#. TRANSLATORS: transaction state, checking the transaction before we do it
-#: ../lib/packagekit-glib2/pk-console-shared.c:290
+#: ../lib/packagekit-glib2/pk-console-shared.c:302
msgid "Resolving dependencies"
msgstr "ନିରàà¬à¬°à¬¤à¬¾à¬àଡ଼ିà¬à ସମାଧାନ à¬à¬°àà¬
à¬à¬¿"
#. TRANSLATORS: transaction state, checking if we have all the security keys for the operation
-#: ../lib/packagekit-glib2/pk-console-shared.c:294
+#: ../lib/packagekit-glib2/pk-console-shared.c:306
msgid "Checking signatures"
msgstr "ହସàତାà¬àଷରà¬àଡ଼ିà¬à ଯାà¬àà¬à¬à¬°àà¬
à¬à¬¿"
#. TRANSLATORS: transaction state, when we return to a previous system state
#. TRANSLATORS: The role of the transaction, in present tense
-#: ../lib/packagekit-glib2/pk-console-shared.c:298
-#: ../lib/packagekit-glib2/pk-console-shared.c:604
+#: ../lib/packagekit-glib2/pk-console-shared.c:310
+#: ../lib/packagekit-glib2/pk-console-shared.c:616
msgid "Rolling back"
msgstr "ପà¬à¬à à¬à¬¡à¬¼àà¬
à¬à¬¿"
#. TRANSLATORS: transaction state, when we're doing a test transaction
-#: ../lib/packagekit-glib2/pk-console-shared.c:302
+#: ../lib/packagekit-glib2/pk-console-shared.c:314
msgid "Testing changes"
msgstr "ପରିବରàତàତନà¬àଡ଼ିà¬à ପରàà¬àଷଣ à¬à¬°àà¬
à¬à¬¿"
#. TRANSLATORS: transaction state, when we're writing to the system package database
-#: ../lib/packagekit-glib2/pk-console-shared.c:306
+#: ../lib/packagekit-glib2/pk-console-shared.c:318
msgid "Committing changes"
msgstr "ସମରàପଣ ପରିବରàତିତ"
#. TRANSLATORS: transaction state, requesting data from a server
-#: ../lib/packagekit-glib2/pk-console-shared.c:310
+#: ../lib/packagekit-glib2/pk-console-shared.c:322
msgid "Requesting data"
msgstr "ତଥàà à¬
ନàରàଧ à¬à¬°àà¬
à¬à¬¿"
#. TRANSLATORS: transaction state, all done!
-#: ../lib/packagekit-glib2/pk-console-shared.c:314
+#: ../lib/packagekit-glib2/pk-console-shared.c:326
msgid "Finished"
msgstr "ସମàପନàନ à¬à¬°àà¬
à¬à¬¿"
#. TRANSLATORS: transaction state, in the process of cancelling
-#: ../lib/packagekit-glib2/pk-console-shared.c:318
+#: ../lib/packagekit-glib2/pk-console-shared.c:330
msgid "Cancelling"
msgstr "ବାତିଲ à¬à¬°àà¬
à¬à¬¿"
#. TRANSLATORS: transaction state, downloading metadata
-#: ../lib/packagekit-glib2/pk-console-shared.c:322
+#: ../lib/packagekit-glib2/pk-console-shared.c:334
msgid "Downloading repository information"
msgstr "ସà¬à¬àରହାଳà ସàà¬à¬¨à¬¾ à¬à¬¹à¬°à¬£ à¬à¬°àà¬
à¬à¬¿"
#. TRANSLATORS: transaction state, downloading metadata
-#: ../lib/packagekit-glib2/pk-console-shared.c:326
+#: ../lib/packagekit-glib2/pk-console-shared.c:338
msgid "Downloading list of packages"
msgstr "ପààାà¬àଠତାଲିà¬à¬¾à¬àଡ଼ିà¬à à¬à¬¹à¬°à¬£ à¬à¬°àà¬
à¬à¬¿"
#. TRANSLATORS: transaction state, downloading metadata
-#: ../lib/packagekit-glib2/pk-console-shared.c:330
+#: ../lib/packagekit-glib2/pk-console-shared.c:342
msgid "Downloading file lists"
msgstr "ଫାà¬à¬² ତାଲିà¬à¬¾ à¬à¬¹à¬°à¬£ à¬à¬°àà¬
à¬à¬¿"
#. TRANSLATORS: transaction state, downloading metadata
-#: ../lib/packagekit-glib2/pk-console-shared.c:334
+#: ../lib/packagekit-glib2/pk-console-shared.c:346
msgid "Downloading lists of changes"
msgstr "ପରିବରàତàତନ ତାଲିà¬à¬¾à¬àଡ଼ିà¬à à¬à¬¹à¬°à¬£ à¬à¬°àà¬
à¬à¬¿"
#. TRANSLATORS: transaction state, downloading metadata
-#: ../lib/packagekit-glib2/pk-console-shared.c:338
+#: ../lib/packagekit-glib2/pk-console-shared.c:350
msgid "Downloading groups"
msgstr "ସମàହà¬à à¬à¬¹à¬°à¬£ à¬à¬°àà¬
à¬à¬¿"
#. TRANSLATORS: transaction state, downloading metadata
-#: ../lib/packagekit-glib2/pk-console-shared.c:342
+#: ../lib/packagekit-glib2/pk-console-shared.c:354
msgid "Downloading update information"
msgstr "à¬
ଦààତନ ସàà¬à¬¨à¬¾ à¬à¬¹à¬°à¬£ à¬à¬°àà¬
à¬à¬¿"
#. TRANSLATORS: transaction state, repackaging delta files
-#: ../lib/packagekit-glib2/pk-console-shared.c:346
+#: ../lib/packagekit-glib2/pk-console-shared.c:358
msgid "Repackaging files"
msgstr "ଫାà¬à¬²à¬àଡ଼ିଠପàନà¬à¬ªààାà¬àଠà¬à¬°àà¬
à¬à¬¿"
#. TRANSLATORS: transaction state, loading databases
-#: ../lib/packagekit-glib2/pk-console-shared.c:350
+#: ../lib/packagekit-glib2/pk-console-shared.c:362
msgid "Loading cache"
msgstr "à¬ààାଶà ଧà¬à¬°à¬£ à¬à¬°àà¬
à¬à¬¿"
#. TRANSLATORS: transaction state, scanning for running processes
-#: ../lib/packagekit-glib2/pk-console-shared.c:354
+#: ../lib/packagekit-glib2/pk-console-shared.c:366
msgid "Scanning applications"
msgstr "ପàରààà¬à¬àଡ଼ିà¬à à¬àରମବàà¬àଷଣ à¬à¬°àà¬
à¬à¬¿"
#. TRANSLATORS: transaction state, generating a list of packages installed on the system
-#: ../lib/packagekit-glib2/pk-console-shared.c:358
+#: ../lib/packagekit-glib2/pk-console-shared.c:370
msgid "Generating package lists"
msgstr "ପààାà¬àଠତାଲିà¬à¬¾ ସàଷàà¬à¬¿ à¬à¬°àà¬
à¬à¬¿"
#. TRANSLATORS: transaction state, when we're waiting for the native tools to exit
-#: ../lib/packagekit-glib2/pk-console-shared.c:362
+#: ../lib/packagekit-glib2/pk-console-shared.c:374
msgid "Waiting for package manager lock"
msgstr "ପààାà¬àଠପରିà¬à¬¾à¬³à¬à¬àà¬à à¬
ପàà¬àଷା à¬à¬°à¬¿à¬
à¬à¬¿à¥¤"
#. TRANSLATORS: transaction state, waiting for user to type in a password
-#: ../lib/packagekit-glib2/pk-console-shared.c:366
+#: ../lib/packagekit-glib2/pk-console-shared.c:378
msgid "Waiting for authentication"
msgstr "ବàଧିà¬à¬°à¬£ ପାà¬à¬ à¬
ପàà¬àଷା à¬à¬°à¬¿à¬
à¬à¬¿"
#. TRANSLATORS: transaction state, we are updating the list of processes
-#: ../lib/packagekit-glib2/pk-console-shared.c:370
+#: ../lib/packagekit-glib2/pk-console-shared.c:382
msgid "Updating running applications"
msgstr "à¬à¬¾à¬²àଥିବା ପàରààà¬à¬àଡ଼ିà¬à à¬
ଦààତନ à¬à¬°àà¬
à¬à¬¿"
#. TRANSLATORS: transaction state, we are checking executable files currently in use
-#: ../lib/packagekit-glib2/pk-console-shared.c:374
+#: ../lib/packagekit-glib2/pk-console-shared.c:386
msgid "Checking applications in use"
msgstr "ବààବହାରରà ଥିବା ପàରààà¬à¬àଡ଼ିà¬à ଯାà¬àà¬à¬à¬°àà¬
à¬à¬¿"
#. TRANSLATORS: transaction state, we are checking for libraries currently in use
-#: ../lib/packagekit-glib2/pk-console-shared.c:378
+#: ../lib/packagekit-glib2/pk-console-shared.c:390
msgid "Checking libraries in use"
msgstr "ବààବହାରରà ଥିବା ଲାà¬à¬¬àରàରàà¬àଡ଼ିà¬à ଯାà¬àà¬à¬à¬°àà¬
à¬à¬¿"
#. TRANSLATORS: transaction state, we are copying package files before or after the transaction
-#: ../lib/packagekit-glib2/pk-console-shared.c:382
+#: ../lib/packagekit-glib2/pk-console-shared.c:394
msgid "Copying files"
msgstr "ଫାà¬à¬²à¬àଡ଼ିà¬à ନà¬à¬² à¬à¬°àà¬
à¬à¬¿"
#. TRANSLATORS: The type of update
-#: ../lib/packagekit-glib2/pk-console-shared.c:400
+#: ../lib/packagekit-glib2/pk-console-shared.c:412
msgid "Trivial"
msgstr "à¬
ଧମ"
#. TRANSLATORS: The type of update
-#: ../lib/packagekit-glib2/pk-console-shared.c:404
+#: ../lib/packagekit-glib2/pk-console-shared.c:416
msgid "Normal"
msgstr "ସାଧାରଣ"
#. TRANSLATORS: The type of update
-#: ../lib/packagekit-glib2/pk-console-shared.c:408
+#: ../lib/packagekit-glib2/pk-console-shared.c:420
msgid "Important"
msgstr "à¬àରàତàବପàରàଣàଣ"
#. TRANSLATORS: The type of update
-#: ../lib/packagekit-glib2/pk-console-shared.c:412
+#: ../lib/packagekit-glib2/pk-console-shared.c:424
msgid "Security"
msgstr "ସàରà¬àଷା"
#. TRANSLATORS: The type of update
-#: ../lib/packagekit-glib2/pk-console-shared.c:416
+#: ../lib/packagekit-glib2/pk-console-shared.c:428
msgid "Bug fix "
msgstr "ତàରàà¬à¬¿ ନିବାରଣ"
#. TRANSLATORS: The type of update
-#: ../lib/packagekit-glib2/pk-console-shared.c:420
+#: ../lib/packagekit-glib2/pk-console-shared.c:432
msgid "Enhancement"
msgstr "ବàଦàଧି"
#. TRANSLATORS: The type of update
-#: ../lib/packagekit-glib2/pk-console-shared.c:424
+#: ../lib/packagekit-glib2/pk-console-shared.c:436
msgid "Blocked"
msgstr "à¬
ବରàଧିତ"
#. TRANSLATORS: The state of a package
#. TRANSLATORS: The action of the package, in past tense
-#: ../lib/packagekit-glib2/pk-console-shared.c:429
-#: ../lib/packagekit-glib2/pk-console-shared.c:502
+#: ../lib/packagekit-glib2/pk-console-shared.c:441
+#: ../lib/packagekit-glib2/pk-console-shared.c:514
msgid "Installed"
msgstr "ସàଥାପିତ"
#. TRANSLATORS: The state of a package, i.e. not installed
-#: ../lib/packagekit-glib2/pk-console-shared.c:434
+#: ../lib/packagekit-glib2/pk-console-shared.c:446
msgid "Available"
msgstr "à¬à¬ªà¬²à¬¬àଧ"
#. TRANSLATORS: The action of the package, in present tense
-#: ../lib/packagekit-glib2/pk-console-shared.c:452
+#: ../lib/packagekit-glib2/pk-console-shared.c:464
msgid "Downloading"
msgstr "à¬à¬¹à¬°à¬£ à¬à¬°àà¬
à¬à¬¿"
#. TRANSLATORS: The action of the package, in present tense
-#: ../lib/packagekit-glib2/pk-console-shared.c:456
+#: ../lib/packagekit-glib2/pk-console-shared.c:468
msgid "Updating"
msgstr "à¬
ଦààତନ à¬à¬°àà¬
à¬à¬¿"
#. TRANSLATORS: The action of the package, in present tense
#. TRANSLATORS: The role of the transaction, in present tense
-#: ../lib/packagekit-glib2/pk-console-shared.c:460
-#: ../lib/packagekit-glib2/pk-console-shared.c:580
+#: ../lib/packagekit-glib2/pk-console-shared.c:472
+#: ../lib/packagekit-glib2/pk-console-shared.c:592
msgid "Installing"
msgstr "ସàଥାପନ à¬à¬°àà¬
à¬à¬¿"
#. TRANSLATORS: The action of the package, in present tense
#. TRANSLATORS: The role of the transaction, in present tense
-#: ../lib/packagekit-glib2/pk-console-shared.c:464
-#: ../lib/packagekit-glib2/pk-console-shared.c:576
+#: ../lib/packagekit-glib2/pk-console-shared.c:476
+#: ../lib/packagekit-glib2/pk-console-shared.c:588
msgid "Removing"
msgstr "à¬à¬¾à¬¢à¬¼àà¬
à¬à¬¿"
#. TRANSLATORS: The action of the package, in present tense
-#: ../lib/packagekit-glib2/pk-console-shared.c:468
+#: ../lib/packagekit-glib2/pk-console-shared.c:480
msgid "Cleaning up"
msgstr "ପରିଷàà¬à¬¾à¬° à¬à¬°à¬¾ ହàà¬à¬à¬¿"
#. TRANSLATORS: The action of the package, in present tense
-#: ../lib/packagekit-glib2/pk-console-shared.c:472
+#: ../lib/packagekit-glib2/pk-console-shared.c:484
msgid "Obsoleting"
msgstr "à¬
à¬à¬³ à¬à¬°àà¬
à¬à¬¿"
#. TRANSLATORS: The action of the package, in present tense
-#: ../lib/packagekit-glib2/pk-console-shared.c:476
+#: ../lib/packagekit-glib2/pk-console-shared.c:488
msgid "Reinstalling"
msgstr "ପàନଠସàଥାପନ à¬à¬°àà¬
à¬à¬¿"
#. TRANSLATORS: The action of the package, in past tense
-#: ../lib/packagekit-glib2/pk-console-shared.c:494
+#: ../lib/packagekit-glib2/pk-console-shared.c:506
msgid "Downloaded"
msgstr "à¬à¬¹à¬°à¬£ ହàà¬à¬à¬¿"
#. TRANSLATORS: The action of the package, in past tense
-#: ../lib/packagekit-glib2/pk-console-shared.c:506
+#: ../lib/packagekit-glib2/pk-console-shared.c:518
msgid "Removed"
msgstr "à¬à¬¢à¬¼à¬¾à¬¯à¬¾à¬à¬à¬¿"
#. TRANSLATORS: The action of the package, in past tense
-#: ../lib/packagekit-glib2/pk-console-shared.c:510
+#: ../lib/packagekit-glib2/pk-console-shared.c:522
msgid "Cleaned up"
msgstr "ସଫା ହàà¬à¬à¬¿"
#. TRANSLATORS: The action of the package, in past tense
-#: ../lib/packagekit-glib2/pk-console-shared.c:514
+#: ../lib/packagekit-glib2/pk-console-shared.c:526
msgid "Obsoleted"
msgstr "à¬
à¬à¬³ ହàà¬à¬à¬¿"
#. TRANSLATORS: The action of the package, in past tense
-#: ../lib/packagekit-glib2/pk-console-shared.c:518
+#: ../lib/packagekit-glib2/pk-console-shared.c:530
msgid "Reinstalled"
msgstr "ପàନଠସàଥାପିତ"
#. TRANSLATORS: The role of the transaction, in present tense
-#: ../lib/packagekit-glib2/pk-console-shared.c:536
+#: ../lib/packagekit-glib2/pk-console-shared.c:548
msgid "Unknown role type"
msgstr "à¬
à¬à¬£à¬¾ à¬àମିà¬à¬¾ ପàରà¬à¬¾à¬°"
#. TRANSLATORS: The role of the transaction, in present tense
-#: ../lib/packagekit-glib2/pk-console-shared.c:540
+#: ../lib/packagekit-glib2/pk-console-shared.c:552
msgid "Getting dependencies"
msgstr "ନିରàà¬à¬°à¬¤à¬¾à¬àଡ଼ିà¬à à¬àରହଣ à¬à¬°àà¬
à¬à¬¿"
#. TRANSLATORS: The role of the transaction, in present tense
-#: ../lib/packagekit-glib2/pk-console-shared.c:544
+#: ../lib/packagekit-glib2/pk-console-shared.c:556
msgid "Getting update details"
msgstr "à¬
ଦààତନ ବିବରଣàà¬àଡ଼ିà¬à à¬àରହଣ à¬à¬°àà¬
à¬à¬¿"
#. TRANSLATORS: The role of the transaction, in present tense
-#: ../lib/packagekit-glib2/pk-console-shared.c:548
+#: ../lib/packagekit-glib2/pk-console-shared.c:560
msgid "Getting details"
msgstr "ବିବରଣàà¬àଡ଼ିà¬à à¬àରହଣ à¬à¬°àà¬
à¬à¬¿"
#. TRANSLATORS: The role of the transaction, in present tense
-#: ../lib/packagekit-glib2/pk-console-shared.c:552
+#: ../lib/packagekit-glib2/pk-console-shared.c:564
msgid "Getting requires"
msgstr "à¬à¬¬à¬¶ààà¬à¬¤à¬¾à¬àଡ଼ିà¬à à¬àରହଣ à¬à¬°àà¬
à¬à¬¿"
#. TRANSLATORS: The role of the transaction, in present tense
-#: ../lib/packagekit-glib2/pk-console-shared.c:556
+#: ../lib/packagekit-glib2/pk-console-shared.c:568
msgid "Getting updates"
msgstr "à¬
ଦààତନà¬àଡ଼ିà¬à à¬àରହଣ à¬à¬°àà¬
à¬à¬¿"
#. TRANSLATORS: The role of the transaction, in present tense
-#: ../lib/packagekit-glib2/pk-console-shared.c:560
+#: ../lib/packagekit-glib2/pk-console-shared.c:572
msgid "Searching by details"
msgstr "ବିବରଣà ଦàà±à¬¾à¬°à¬¾ ସନàଧାନ à¬à¬°àà¬
à¬à¬¿"
#. TRANSLATORS: The role of the transaction, in present tense
-#: ../lib/packagekit-glib2/pk-console-shared.c:564
+#: ../lib/packagekit-glib2/pk-console-shared.c:576
msgid "Searching by file"
msgstr "ଫାà¬à¬² ଦàà±à¬¾à¬°à¬¾ ସନàଧାନ à¬à¬°àà¬
à¬à¬¿"
#. TRANSLATORS: The role of the transaction, in present tense
-#: ../lib/packagekit-glib2/pk-console-shared.c:568
+#: ../lib/packagekit-glib2/pk-console-shared.c:580
msgid "Searching groups"
msgstr "ଶàରàଣàà¬àଡ଼ିà¬à ସନàଧାନ à¬à¬°àà¬
à¬à¬¿"
#. TRANSLATORS: The role of the transaction, in present tense
-#: ../lib/packagekit-glib2/pk-console-shared.c:572
+#: ../lib/packagekit-glib2/pk-console-shared.c:584
msgid "Searching by name"
msgstr "ନାମ ଦàà±à¬¾à¬°à¬¾ ସନàଧାନ à¬à¬°àà¬
à¬à¬¿"
#. TRANSLATORS: The role of the transaction, in present tense
-#: ../lib/packagekit-glib2/pk-console-shared.c:584
+#: ../lib/packagekit-glib2/pk-console-shared.c:596
msgid "Installing files"
msgstr "ଫାà¬à¬²à¬àଡ଼ିà¬à ସàଥାପନ à¬à¬°àà¬
à¬à¬¿"
#. TRANSLATORS: The role of the transaction, in present tense
-#: ../lib/packagekit-glib2/pk-console-shared.c:588
+#: ../lib/packagekit-glib2/pk-console-shared.c:600
msgid "Refreshing cache"
msgstr "à¬ààାଶàà¬à ସତàଠà¬à¬°àà¬
à¬à¬¿"
#. TRANSLATORS: The role of the transaction, in present tense
-#: ../lib/packagekit-glib2/pk-console-shared.c:592
+#: ../lib/packagekit-glib2/pk-console-shared.c:604
msgid "Updating packages"
msgstr "ପààାà¬àà¬à¬àଡ଼ିà¬à à¬
ଦààତନ à¬à¬°àà¬
à¬à¬¿"
#. TRANSLATORS: The role of the transaction, in present tense
-#: ../lib/packagekit-glib2/pk-console-shared.c:596
+#: ../lib/packagekit-glib2/pk-console-shared.c:608
msgid "Updating system"
msgstr "ତନàତàରà¬à à¬
ଦààତନ à¬à¬°àà¬
à¬à¬¿"
#. TRANSLATORS: The role of the transaction, in present tense
-#: ../lib/packagekit-glib2/pk-console-shared.c:600
+#: ../lib/packagekit-glib2/pk-console-shared.c:612
msgid "Canceling"
msgstr "ବାତିଲ à¬à¬°àà¬
à¬à¬¿"
#. TRANSLATORS: The role of the transaction, in present tense
-#: ../lib/packagekit-glib2/pk-console-shared.c:608
+#: ../lib/packagekit-glib2/pk-console-shared.c:620
msgid "Getting repositories"
msgstr "ସà¬à¬àରହାଳàà¬àଡ଼ିà¬à à¬àରହଣ à¬à¬°àà¬
à¬à¬¿"
#. TRANSLATORS: The role of the transaction, in present tense
-#: ../lib/packagekit-glib2/pk-console-shared.c:612
+#: ../lib/packagekit-glib2/pk-console-shared.c:624
msgid "Enabling repository"
msgstr "ସà¬à¬àରହାଳàà¬à ସà¬àରà à¬à¬°àà¬
à¬à¬¿"
#. TRANSLATORS: The role of the transaction, in present tense
-#: ../lib/packagekit-glib2/pk-console-shared.c:616
+#: ../lib/packagekit-glib2/pk-console-shared.c:628
msgid "Setting data"
msgstr "ତଥàà ବିନààାସ à¬à¬°àà¬
à¬à¬¿"
#. TRANSLATORS: The role of the transaction, in present tense
-#: ../lib/packagekit-glib2/pk-console-shared.c:620
+#: ../lib/packagekit-glib2/pk-console-shared.c:632
msgid "Resolving"
msgstr "ସମାଧାନ à¬à¬°àà¬
à¬à¬¿"
#. TRANSLATORS: The role of the transaction, in present tense
-#: ../lib/packagekit-glib2/pk-console-shared.c:624
+#: ../lib/packagekit-glib2/pk-console-shared.c:636
msgid "Getting file list"
msgstr "ଫାà¬à¬² ତାଲିà¬à¬¾ à¬àରହଣ à¬à¬°àà¬
à¬à¬¿"
#. TRANSLATORS: The role of the transaction, in present tense
-#: ../lib/packagekit-glib2/pk-console-shared.c:628
+#: ../lib/packagekit-glib2/pk-console-shared.c:640
msgid "Getting provides"
msgstr "ପàରଦାତାମାନà¬àà¬à à¬àରହଣ à¬à¬°àà¬
à¬à¬¿"
#. TRANSLATORS: The role of the transaction, in present tense
-#: ../lib/packagekit-glib2/pk-console-shared.c:632
+#: ../lib/packagekit-glib2/pk-console-shared.c:644
msgid "Installing signature"
msgstr "ହସàତାà¬àଷରà¬àଡ଼ିà¬à ସàଥାପନ à¬à¬°àà¬
à¬à¬¿"
#. TRANSLATORS: The role of the transaction, in present tense
-#: ../lib/packagekit-glib2/pk-console-shared.c:636
+#: ../lib/packagekit-glib2/pk-console-shared.c:648
msgid "Getting packages"
msgstr "ପààାà¬àà¬à¬àଡ଼ିà¬à à¬àରହଣ à¬à¬°àà¬
à¬à¬¿"
#. TRANSLATORS: The role of the transaction, in present tense
-#: ../lib/packagekit-glib2/pk-console-shared.c:640
+#: ../lib/packagekit-glib2/pk-console-shared.c:652
msgid "Accepting EULA"
msgstr "EULA à¬à à¬àରହଣ à¬à¬°àà¬
à¬à¬¿"
#. TRANSLATORS: The role of the transaction, in present tense
-#: ../lib/packagekit-glib2/pk-console-shared.c:648
+#: ../lib/packagekit-glib2/pk-console-shared.c:660
msgid "Getting upgrades"
msgstr "à¬à¬¨àନàନà¬àଡ଼ିà¬à à¬àରହଣ à¬à¬°àà¬
à¬à¬¿"
#. TRANSLATORS: The role of the transaction, in present tense
-#: ../lib/packagekit-glib2/pk-console-shared.c:652
+#: ../lib/packagekit-glib2/pk-console-shared.c:664
msgid "Getting categories"
msgstr "ବିà¬à¬¾à¬à¬àଡ଼ିà¬à à¬àରହଣ à¬à¬°àà¬
à¬à¬¿"
#. TRANSLATORS: The role of the transaction, in present tense
-#: ../lib/packagekit-glib2/pk-console-shared.c:656
+#: ../lib/packagekit-glib2/pk-console-shared.c:668
msgid "Getting transactions"
msgstr "à¬à¬¾à¬°à¬¬à¬¾à¬°à¬àଡ଼ିà¬à à¬àରହଣ à¬à¬°àà¬
à¬à¬¿"
#. TRANSLATORS: The role of the transaction, in present tense
-#: ../lib/packagekit-glib2/pk-console-shared.c:660
-#: ../lib/packagekit-glib2/pk-console-shared.c:664
+#: ../lib/packagekit-glib2/pk-console-shared.c:672
+#: ../lib/packagekit-glib2/pk-console-shared.c:676
msgid "Simulating install"
msgstr "ସàଥାପନ à¬àରିàାà¬à à¬à¬°à¬®àଠà¬à¬°àà¬
à¬à¬¿"
#. TRANSLATORS: The role of the transaction, in present tense
-#: ../lib/packagekit-glib2/pk-console-shared.c:668
+#: ../lib/packagekit-glib2/pk-console-shared.c:680
msgid "Simulating remove"
msgstr "à¬à¬¾à¬¢à¬¼à¬¿à¬¬à¬¾ à¬à¬°à¬®àଠà¬à¬°àà¬
à¬à¬¿"
#. TRANSLATORS: The role of the transaction, in present tense
-#: ../lib/packagekit-glib2/pk-console-shared.c:672
+#: ../lib/packagekit-glib2/pk-console-shared.c:684
msgid "Simulating update"
msgstr "à¬
ଦààତନà¬àଡ଼ିà¬à à¬à¬°à¬®àଠà¬à¬°àà¬
à¬à¬¿"
#. TRANSLATORS: ask the user if they are comfortable installing insecure packages
-#: ../lib/packagekit-glib2/pk-task-text.c:64
+#: ../lib/packagekit-glib2/pk-task-text.c:69
msgid "Do you want to allow installing of unsigned software?"
msgstr "ହସàତାà¬àଷର ହàà¬à¬¨à¬¥à¬¿à¬¬à¬¾ ସଫàà¬à±àରà¬à ସàଥାପନ à¬à¬°à¬¿à¬¬à¬¾ ପାà¬à¬ à¬
ନàମତି ଦàବାà¬à à¬à¬¾à¬¹àà¬à¬à¬¨àତି à¬à¬¿?"
#. TRANSLATORS: tell the user we've not done anything
-#: ../lib/packagekit-glib2/pk-task-text.c:69
+#: ../lib/packagekit-glib2/pk-task-text.c:74
msgid "The unsigned software will not be installed."
msgstr "ହସàତାà¬àଷର ହàà¬à¬¨à¬¥à¬¿à¬¬à¬¾ ସଫàà¬à±àରà¬à ସàଥାପନ à¬à¬°à¬¾à¬¹àବ ନାହିà¬à¥¤"
#. TRANSLATORS: the package repository is signed by a key that is not recognised
-#: ../lib/packagekit-glib2/pk-task-text.c:102
+#: ../lib/packagekit-glib2/pk-task-text.c:123
msgid "Software source signature required"
msgstr "ସଫàà¬à±àର à¬à¬¤àସ ହସàତାà¬àଷର à¬à¬¬à¬¶ààà¬"
#. TRANSLATORS: the package repository name
-#: ../lib/packagekit-glib2/pk-task-text.c:108
+#: ../lib/packagekit-glib2/pk-task-text.c:129
msgid "Software source name"
msgstr "ସଫààà±àର à¬à¬¤àସ ନାମ"
#. TRANSLATORS: the key URL
-#: ../lib/packagekit-glib2/pk-task-text.c:111
+#: ../lib/packagekit-glib2/pk-task-text.c:132
msgid "Key URL"
msgstr "ମàà¬àà URL"
#. TRANSLATORS: the username of the key
-#: ../lib/packagekit-glib2/pk-task-text.c:114
+#: ../lib/packagekit-glib2/pk-task-text.c:135
msgid "Key user"
msgstr "ମହତàତàà±à¬ªàରàଣàଣ à¬à¬¾à¬³à¬"
#. TRANSLATORS: the key ID, usually a few hex digits
-#: ../lib/packagekit-glib2/pk-task-text.c:117
+#: ../lib/packagekit-glib2/pk-task-text.c:138
msgid "Key ID"
msgstr "ମହତàତàà±à¬ªàରàଣàଣ ID"
#. TRANSLATORS: the key fingerprint, again, yet more hex
-#: ../lib/packagekit-glib2/pk-task-text.c:120
+#: ../lib/packagekit-glib2/pk-task-text.c:141
msgid "Key fingerprint"
msgstr "ମହତàତàà±à¬ªàରàଣàଣ à¬
à¬àà¬àଳି à¬à¬¿à¬¹àନ"
#. TRANSLATORS: the timestamp (a bit like a machine readable time)
-#: ../lib/packagekit-glib2/pk-task-text.c:123
+#: ../lib/packagekit-glib2/pk-task-text.c:144
msgid "Key Timestamp"
msgstr "ମହତàତàà±à¬ªàରàଣàଣ à¬à¬¾à¬à¬®à¬·àà¬à¬¾à¬®àପ"
#. TRANSLATORS: ask the user if they want to import
-#: ../lib/packagekit-glib2/pk-task-text.c:129
+#: ../lib/packagekit-glib2/pk-task-text.c:157
msgid "Do you accept this signature?"
msgstr "à¬à¬ªà¬£ à¬à¬¹à¬¿ ହସàତାà¬àଷରà¬à à¬àରହଣ à¬à¬°à¬¿à¬¬à à¬à¬¿?"
#. TRANSLATORS: tell the user we've not done anything
-#: ../lib/packagekit-glib2/pk-task-text.c:134
+#: ../lib/packagekit-glib2/pk-task-text.c:162
msgid "The signature was not accepted."
msgstr "à¬à¬¹à¬¿ ହସàତାà¬àଷରà¬à à¬àରହଣ à¬à¬°à¬¾à¬¯à¬¾à¬à¬¨à¬¾à¬¹à¬¿à¬à¥¤"
#. TRANSLATORS: this is another name for a software licence that has to be read before installing
-#: ../lib/packagekit-glib2/pk-task-text.c:169
+#: ../lib/packagekit-glib2/pk-task-text.c:205
msgid "End user licence agreement required"
msgstr "à¬à¬¾à¬³à¬ à¬
ନàମତି ପତàର à¬à¬¬à¬¶ààà¬"
#. TRANSLATORS: the EULA text itself (long and boring)
-#: ../lib/packagekit-glib2/pk-task-text.c:178
+#: ../lib/packagekit-glib2/pk-task-text.c:214
msgid "Agreement"
msgstr "ବàà¬à¬¾à¬®à¬£à¬¾ ପତàର"
#. TRANSLATORS: ask the user if they've read and accepted the EULA
-#: ../lib/packagekit-glib2/pk-task-text.c:184
+#: ../lib/packagekit-glib2/pk-task-text.c:223
msgid "Do you accept this agreement?"
msgstr "à¬à¬ªà¬£ à¬à¬¹à¬¿ ବàà¬à¬¾à¬®à¬£à¬¾ ପତàରà¬à à¬àରହଣ à¬à¬°à¬¿à¬¬à à¬à¬¿?"
#. TRANSLATORS: tell the user we've not done anything
-#: ../lib/packagekit-glib2/pk-task-text.c:189
+#: ../lib/packagekit-glib2/pk-task-text.c:228
msgid "The agreement was not accepted."
msgstr "à¬à¬¹à¬¿ ବàà¬à¬¾à¬®à¬£à¬¾ ପତàରà¬à à¬àରହଣ à¬à¬°à¬¾à¬¯à¬¾à¬à¬¨à¬¾à¬¹à¬¿à¬à¥¤"
#. TRANSLATORS: the user needs to change media inserted into the computer
-#: ../lib/packagekit-glib2/pk-task-text.c:219
+#: ../lib/packagekit-glib2/pk-task-text.c:267
msgid "Media change required"
msgstr "ମàଡିଠପରିବରàତàତନ à¬à¬¬à¬¶ààà¬"
#. TRANSLATORS: the type, e.g. DVD, CD, etc
-#: ../lib/packagekit-glib2/pk-task-text.c:222
+#: ../lib/packagekit-glib2/pk-task-text.c:270
msgid "Media type"
msgstr "ମàଡିଠପàରà¬à¬¾à¬°"
#. TRANSLATORS: the media label, usually like 'disk-1of3'
-#: ../lib/packagekit-glib2/pk-task-text.c:225
+#: ../lib/packagekit-glib2/pk-task-text.c:273
msgid "Media label"
msgstr "ମàଡିଠନାମପà¬à¬¿"
#. TRANSLATORS: the media description, usually like 'Fedora 12 disk 5'
-#: ../lib/packagekit-glib2/pk-task-text.c:228
+#: ../lib/packagekit-glib2/pk-task-text.c:276
msgid "Text"
msgstr "ପାଠàà"
#. TRANSLATORS: ask the user to insert the media
-#: ../lib/packagekit-glib2/pk-task-text.c:232
+#: ../lib/packagekit-glib2/pk-task-text.c:282
msgid "Please insert the correct media"
msgstr "ଦàାà¬à¬°à¬¿ ସଠିଠମàଡିà¬à¬à ବାà¬à¬¨àତà"
#. TRANSLATORS: tell the user we've not done anything as they are lazy
-#: ../lib/packagekit-glib2/pk-task-text.c:237
+#: ../lib/packagekit-glib2/pk-task-text.c:287
msgid "The correct media was not inserted."
msgstr "ସଠିଠମàଡିà¬à¬à à¬à¬°àତàତି à¬à¬°à¬¾à¬¯à¬¾à¬à¬¨à¬¾à¬¹à¬¿à¬à¥¤"
#. TRANSLATORS: When processing, we might have to remove other dependencies
-#: ../lib/packagekit-glib2/pk-task-text.c:252
+#: ../lib/packagekit-glib2/pk-task-text.c:302
msgid "The following packages have to be removed:"
msgstr "ନିମàନଲିà¬à¬¿à¬¤ ପààାà¬àà¬à¬àଡ଼ିà¬à à¬à¬¾à¬¢à¬¼à¬¿à¬¬à¬¾à¬à ହàବ:"
#. TRANSLATORS: When processing, we might have to install other dependencies
-#: ../lib/packagekit-glib2/pk-task-text.c:257
+#: ../lib/packagekit-glib2/pk-task-text.c:307
msgid "The following packages have to be installed:"
msgstr "ନିମàନଲିà¬à¬¿à¬¤ ପààାà¬àà¬à¬àଡ଼ିà¬à ସàଥାପନ à¬à¬°à¬¿à¬¬à¬¾à¬à ହàବ:"
#. TRANSLATORS: When processing, we might have to update other dependencies
-#: ../lib/packagekit-glib2/pk-task-text.c:262
+#: ../lib/packagekit-glib2/pk-task-text.c:312
msgid "The following packages have to be updated:"
msgstr "ନିମàନଲିà¬à¬¿à¬¤ ପààାà¬àà¬à¬àଡ଼ିà¬à à¬
ଦààତନ à¬à¬°à¬¿à¬¬à¬¾à¬à ହàବ:"
#. TRANSLATORS: When processing, we might have to reinstall other dependencies
-#: ../lib/packagekit-glib2/pk-task-text.c:267
+#: ../lib/packagekit-glib2/pk-task-text.c:317
msgid "The following packages have to be reinstalled:"
msgstr "ନିମàନଲିà¬à¬¿à¬¤ ପààାà¬àà¬à¬àଡ଼ିà¬à ପàନଠସàଥାପନ à¬à¬°à¬¿à¬¬à¬¾à¬à ହàବ:"
#. TRANSLATORS: When processing, we might have to downgrade other dependencies
-#: ../lib/packagekit-glib2/pk-task-text.c:272
+#: ../lib/packagekit-glib2/pk-task-text.c:322
msgid "The following packages have to be downgraded:"
msgstr "ନିମàନଲିà¬à¬¿à¬¤ ପààାà¬àà¬à¬àଡ଼ିà¬à ପଦ à¬
ବନତି à¬à¬°à¬¿à¬¬à¬¾à¬à ହàବ:"
#. TRANSLATORS: ask the user if the proposed changes are okay
-#: ../lib/packagekit-glib2/pk-task-text.c:331
+#: ../lib/packagekit-glib2/pk-task-text.c:382
msgid "Proceed with changes?"
msgstr "ପରିବରàତàତନà¬àଡ଼ିଠସହିତ à¬
à¬àରସର ହàବà à¬à¬¿?"
#. TRANSLATORS: tell the user we didn't do anything
-#: ../lib/packagekit-glib2/pk-task-text.c:336
+#: ../lib/packagekit-glib2/pk-task-text.c:387
msgid "The transaction did not proceed."
msgstr "à¬à¬¾à¬°à¬¬à¬¾à¬° à¬
à¬àରସର ହàà¬à¬¨à¬¥à¬¿à¬²à¬¾à¥¤"
commit 0d6d07546225d04e05cd4bcc8bd35733013599f7
Author: Richard Hughes <richard at hughsie.com>
Date: Fri Nov 13 20:07:45 2009 +0000
Revert "Python Backend: Consider the stdin/stdout encoding converting the"
This reverts commit e39cb1df0d1d5c0acd3b6251020104dcc5842480.
diff --git a/lib/python/packagekit/backend.py b/lib/python/packagekit/backend.py
index e76f6da..9993e72 100644
--- a/lib/python/packagekit/backend.py
+++ b/lib/python/packagekit/backend.py
@@ -21,7 +21,6 @@
#
# imports
-import locale
import sys
import codecs
import traceback
@@ -32,9 +31,11 @@ from enums import *
PACKAGE_IDS_DELIM = '&'
FILENAME_DELIM = '|'
-STDOUT_ENCODING = sys.stdout.encoding or sys.getfilesystemencoding()
-FS_ENCODING = sys.getfilesystemencoding()
-DEFAULT_ENCODING = locale.getpreferredencoding()
+def _to_unicode(txt, encoding='utf-8'):
+ if isinstance(txt, basestring):
+ if not isinstance(txt, unicode):
+ txt = unicode(txt, encoding, errors='replace')
+ return txt
# Classes
@@ -62,14 +63,14 @@ class PackageKitBaseBackend:
try:
self.lang = os.environ['LANG']
except KeyError, e:
- self._send("Error: No LANG envp")
+ print "Error: No LANG envp"
# try to get NETWORK state
try:
if os.environ['NETWORK'] == 'TRUE':
self.has_network = True
except KeyError, e:
- self._send("Error: No NETWORK envp")
+ print "Error: No NETWORK envp"
# try to get BACKGROUND state
try:
@@ -78,13 +79,6 @@ class PackageKitBaseBackend:
except KeyError, e:
print "Error: No BACKGROUND envp"
- def _send(self, message):
- '''Send the given message to stdout'''
- if not isinstance(message, unicode):
- message = unicode(message, DEFAULT_ENCODING, "replace")
- sys.stdout.write(message.encode(STDOUT_ENCODING, "replace") + "\n")
- sys.stdout.flush()
-
def doLock(self):
''' Generic locking, overide and extend in child class'''
self._locked = True
@@ -102,10 +96,11 @@ class PackageKitBaseBackend:
@param percent: Progress percentage (int preferred)
'''
if percent == None:
- self._send("no-percentage-updates")
+ print "no-percentage-updates"
elif percent == 0 or percent > self.percentage_old:
- self._send("percentage\t%i" % (percent))
+ print "percentage\t%i" % (percent)
self.percentage_old = percent
+ sys.stdout.flush()
def sub_percentage(self, percent=None):
'''
@@ -113,8 +108,9 @@ class PackageKitBaseBackend:
@param percent: subprogress percentage (int preferred)
'''
if percent == 0 or percent > self.sub_percentage_old:
- self._send("subpercentage\t%i" % (percent))
+ print "subpercentage\t%i" % (percent)
self.sub_percentage_old = percent
+ sys.stdout.flush()
def error(self, err, description, exit=True):
'''
@@ -128,9 +124,11 @@ class PackageKitBaseBackend:
self.unLock()
# this should be fast now
- self._send("error\t%s\t%s" % (err, description))
+ print "error\t%s\t%s" % (err, description)
+ sys.stdout.flush()
if exit:
- self._send("finished")
+ print "finished"
+ sys.stdout.flush()
sys.exit(1)
def message(self, typ, msg):
@@ -138,7 +136,8 @@ class PackageKitBaseBackend:
send 'message' signal
@param typ: MESSAGE_BROKEN_MIRROR
'''
- self._send("message\t%s\t%s" % (typ, msg))
+ print "message\t%s\t%s" % (typ, msg)
+ sys.stdout.flush()
def package(self, package_id, status, summary):
'''
@@ -147,7 +146,8 @@ class PackageKitBaseBackend:
@param package_id: The package ID name, e.g. openoffice-clipart;2.6.22;ppc64;fedora
@param summary: The package Summary
'''
- self._send("package\t%s\t%s\t%s" % (status, package_id, summary))
+ print >> sys.stdout, "package\t%s\t%s\t%s" % (status, package_id, summary)
+ sys.stdout.flush()
def media_change_required(self, mtype, id, text):
'''
@@ -156,7 +156,8 @@ class PackageKitBaseBackend:
@param id: the localised label of the media
@param text: the localised text describing the media
'''
- self._send("media-change-required\t%s\t%s\t%s" % (mtype, id, text))
+ print >> sys.stdout, "media-change-required\t%s\t%s\t%s" % (mtype, id, text)
+ sys.stdout.flush()
def distro_upgrade(self, dtype, name, summary):
'''
@@ -165,14 +166,16 @@ class PackageKitBaseBackend:
@param name: The distro name, e.g. "fedora-9"
@param summary: The localised distribution name and description
'''
- self._send("distro-upgrade\t%s\t%s\t%s" % (dtype, name, summary))
+ print >> sys.stdout, "distro-upgrade\t%s\t%s\t%s" % (dtype, name, summary)
+ sys.stdout.flush()
def status(self, state):
'''
send 'status' signal
@param state: STATUS_DOWNLOAD, STATUS_INSTALL, STATUS_UPDATE, STATUS_REMOVE, STATUS_WAIT
'''
- self._send("status\t%s" % (state))
+ print "status\t%s" % (state)
+ sys.stdout.flush()
def repo_detail(self, repoid, name, state):
'''
@@ -180,15 +183,16 @@ class PackageKitBaseBackend:
@param repoid: The repo id tag
@param state: false is repo is disabled else true.
'''
- self._send("repo-detail\t%s\t%s\t%s" % (repoid, name,
- _bool_to_text(state)))
+ print >> sys.stdout, "repo-detail\t%s\t%s\t%s" % (repoid, name, _bool_to_text(state))
+ sys.stdout.flush()
def data(self, data):
'''
send 'data' signal:
@param data: The current worked on package
'''
- self._send("data\t%s" % (data))
+ print "data\t%s" % (data)
+ sys.stdout.flush()
def details(self, package_id, package_license, group, desc, url, bytes):
'''
@@ -200,16 +204,16 @@ class PackageKitBaseBackend:
@param url: The upstream project homepage
@param bytes: The size of the package, in bytes
'''
- self._send("details\t%s\t%s\t%s\t%s\t%s\t%ld" % (package_id,
- package_license, group,
- desc, url, bytes))
+ print >> sys.stdout, "details\t%s\t%s\t%s\t%s\t%s\t%ld" % (package_id, package_license, group, desc, url, bytes)
+ sys.stdout.flush()
def files(self, package_id, file_list):
'''
Send 'files' signal
@param file_list: List of the files in the package, separated by ';'
'''
- self._send("files\t%s\t%s" % (package_id, file_list))
+ print >> sys.stdout, "files\t%s\t%s" % (package_id, file_list)
+ sys.stdout.flush()
def category(self, parent_id, cat_id, name, summary, icon):
'''
@@ -220,14 +224,15 @@ class PackageKitBaseBackend:
summery : a summary of the category in current locale.
icon : an icon name to represent the category
'''
- self._send("category\t%s\t%s\t%s\t%s\t%s" % (parent_id, cat_id, name,
- summary, icon))
+ print >> sys.stdout,"category\t%s\t%s\t%s\t%s\t%s" % (parent_id, cat_id, name, summary, icon)
+ sys.stdout.flush()
def finished(self):
'''
Send 'finished' signal
'''
- self._send("finished")
+ print >> sys.stdout, "finished"
+ sys.stdout.flush()
def update_detail(self, package_id, updates, obsoletes, vendor_url, bugzilla_url, cve_url, restart, update_text, changelog, state, issued, updated):
'''
@@ -245,10 +250,8 @@ class PackageKitBaseBackend:
@param issued:
@param updated:
'''
- self._send("updatedetail\t%s\t%s\t%s\t%s\t%s\t%s\t%s\t%s\t%s\t%s\t%s\t"
- "%s" % (package_id, updates, obsoletes, vendor_url,
- bugzilla_url, cve_url, restart, update_text,
- changelog, state, issued, updated))
+ print >> sys.stdout, "updatedetail\t%s\t%s\t%s\t%s\t%s\t%s\t%s\t%s\t%s\t%s\t%s\t%s" % (package_id, updates, obsoletes, vendor_url, bugzilla_url, cve_url, restart, update_text, changelog, state, issued, updated)
+ sys.stdout.flush()
def require_restart(self, restart_type, details):
'''
@@ -256,7 +259,8 @@ class PackageKitBaseBackend:
@param restart_type: RESTART_SYSTEM, RESTART_APPLICATION, RESTART_SESSION
@param details: Optional details about the restart
'''
- self._send("requirerestart\t%s\t%s" % (restart_type, details))
+ print "requirerestart\t%s\t%s" % (restart_type, details)
+ sys.stdout.flush()
def allow_cancel(self, allow):
'''
@@ -267,7 +271,8 @@ class PackageKitBaseBackend:
data = 'true'
else:
data = 'false'
- self._send("allow-cancel\t%s" % (data))
+ print "allow-cancel\t%s" % (data)
+ sys.stdout.flush()
def repo_signature_required(self, package_id, repo_name, key_url, key_userid, key_id, key_fingerprint, key_timestamp, sig_type):
'''
@@ -281,9 +286,10 @@ class PackageKitBaseBackend:
@param key_timestamp: Key timestamp
@param sig_type: Key type (GPG)
'''
- self._send("repo-signature-required\t%s\t%s\t%s\t%s\t%s\t%s\t%s\t%s" % \
- (package_id, repo_name, key_url, key_userid, key_id,
- key_fingerprint, key_timestamp, sig_type))
+ print "repo-signature-required\t%s\t%s\t%s\t%s\t%s\t%s\t%s\t%s" % (
+ package_id, repo_name, key_url, key_userid, key_id, key_fingerprint, key_timestamp, sig_type
+ )
+ sys.stdout.flush()
#
# Backend Action Methods
@@ -535,7 +541,6 @@ class PackageKitBaseBackend:
self.dispatch_command(cmd, args)
def dispatch_command(self, cmd, args):
- args = [arg.decode(FS_ENCODING) for arg in args]
if cmd == 'download-packages':
directory = args[0]
package_ids = args[1].split(PACKAGE_IDS_DELIM)
@@ -624,7 +629,7 @@ class PackageKitBaseBackend:
self.finished()
elif cmd == 'search-details':
options = args[0]
- values = args[1]
+ values = _to_unicode(args[1])
self.search_details(options, values)
self.finished()
elif cmd == 'search-file':
@@ -639,7 +644,7 @@ class PackageKitBaseBackend:
self.finished()
elif cmd == 'search-name':
options = args[0]
- values = args[1]
+ values = _to_unicode(args[1])
self.search_name(options, values)
self.finished()
elif cmd == 'signature-install':
@@ -658,7 +663,7 @@ class PackageKitBaseBackend:
elif cmd == 'what-provides':
filters = args[0]
provides_type = args[1]
- values = args[2]
+ values = _to_unicode(args[2])
self.what_provides(filters, provides_type, values)
self.finished()
elif cmd == 'set-locale':
commit 30bb5ef9bcad3f7ecc48c0018bf2e19a3a3564c4
Author: Richard Hughes <richard at hughsie.com>
Date: Fri Nov 13 19:05:21 2009 +0000
yum: format the package_id for printing when we print an error
diff --git a/backends/yum/yumBackend.py b/backends/yum/yumBackend.py
index 99912dd..e1e3bc2 100755
--- a/backends/yum/yumBackend.py
+++ b/backends/yum/yumBackend.py
@@ -2134,7 +2134,8 @@ class PackageKitYumBackend(PackageKitBaseBackend, PackagekitPackage):
if pkg:
self._show_details_pkg(pkg)
else:
- self.error(ERROR_PACKAGE_NOT_FOUND, 'Package %s was not found' % package_id)
+ self.message(MESSAGE_COULD_NOT_FIND_PACKAGE, 'Package %s was not found' % _format_package_id(package_id))
+ continue
def _show_details_pkg(self, pkg):
@@ -2468,7 +2469,7 @@ class PackageKitYumBackend(PackageKitBaseBackend, PackagekitPackage):
for package_id in package_ids:
pkg, inst = self._findPackage(package_id)
if pkg == None:
- self.message(MESSAGE_COULD_NOT_FIND_PACKAGE, "could not find %s" % package_id)
+ self.message(MESSAGE_COULD_NOT_FIND_PACKAGE, "could not find %s" % _format_package_id(package_id))
continue
update = self._get_updated(pkg)
obsolete = self._get_obsoleted(pkg.name)
commit 161e9e9fc54565b6960703c07be5916c6efbb834
Author: Richard Hughes <richard at hughsie.com>
Date: Fri Nov 13 16:37:09 2009 +0000
trivial: fix a Glib warning when the background boolean is left unset by the client
diff --git a/src/pk-backend-spawn.c b/src/pk-backend-spawn.c
index cc27fde..e419a5d 100644
--- a/src/pk-backend-spawn.c
+++ b/src/pk-backend-spawn.c
@@ -678,7 +678,7 @@ pk_backend_spawn_helper_va_list (PkBackendSpawn *backend_spawn, const gchar *exe
gchar *filename;
gchar **argv;
gchar **envp;
- gboolean background;
+ PkTristate background;
#if PK_BUILD_LOCAL
const gchar *directory;
#endif
@@ -720,7 +720,7 @@ pk_backend_spawn_helper_va_list (PkBackendSpawn *backend_spawn, const gchar *exe
/* copy idle setting from backend to PkSpawn instance */
g_object_get (backend_spawn->priv->backend, "background", &background, NULL);
- g_object_set (backend_spawn->priv->spawn, "background", background, NULL);
+ g_object_set (backend_spawn->priv->spawn, "background", (background == PK_TRISTATE_TRUE), NULL);
backend_spawn->priv->finished = FALSE;
envp = pk_backend_spawn_get_envp (backend_spawn);
commit 29a0d51f0b5d3aca82e4f38be6ce97bcd49d6e54
Author: Sebastian Heinlein <devel at glatzor.de>
Date: Fri Nov 13 08:08:28 2009 +0100
APT: Fix a typo which broke RemovePackages
diff --git a/backends/apt/aptBackend.py b/backends/apt/aptBackend.py
index 63214f0..a3ce251 100755
--- a/backends/apt/aptBackend.py
+++ b/backends/apt/aptBackend.py
@@ -950,7 +950,7 @@ class PackageKitAptBackend(PackageKitBaseBackend):
pkgs = self._mark_for_removal(ids)
# Error out if the installation would the installation or upgrade of
# other packages
- if self._cache.inst_count:
+ if self._cache.install_count:
installed = [pkg.name for pkg in self._cache.getChanges() if \
pkg.markedInstall or pkg.markedUpgrade]
self.error(ERROR_DEP_RESOLUTION_FAILED,
commit ede9b5ddd7b653e253c7af2b841c2dee0d6faf9e
Author: Sebastian Heinlein <devel at glatzor.de>
Date: Fri Nov 13 08:07:35 2009 +0100
APT: Add support for removing obsoleted dependencies in RemovePackages
diff --git a/backends/apt/aptBackend.py b/backends/apt/aptBackend.py
index a5e0ce5..63214f0 100755
--- a/backends/apt/aptBackend.py
+++ b/backends/apt/aptBackend.py
@@ -944,6 +944,9 @@ class PackageKitAptBackend(PackageKitBaseBackend):
self.allow_cancel(False)
self.percentage(0)
self._check_init(prange=(0,10))
+ if auto_remove:
+ auto_removables = [pkg.name for pkg in self._cache \
+ if pkg.isAutoRemovable]
pkgs = self._mark_for_removal(ids)
# Error out if the installation would the installation or upgrade of
# other packages
@@ -961,6 +964,11 @@ class PackageKitAptBackend(PackageKitBaseBackend):
self.error(ERROR_DEP_RESOLUTION_FAILED,
"The following packages would have also to be removed: "
"%s" % " ".join(dependencies))
+ # Check for no longer required dependencies which should be removed too
+ if auto_remove:
+ for pkg in self._cache:
+ if pkg.isAutoRemovable and pkg.name not in auto_removables:
+ pkg.markDelete(False)
#FIXME: Should support only_trusted
self._commit_changes(fetch_range=(10,10), install_range=(10,90))
self._open_cache(prange=(90,99))
commit afcc409446f381dd5726d1d774eb6f8ca964e92f
Author: kkrothap <kkrothap at fedoraproject.org>
Date: Thu Nov 12 12:22:08 2009 +0000
Sending translation for Telugu
diff --git a/po/te.po b/po/te.po
index 365b7c3..5ce192c 100644
--- a/po/te.po
+++ b/po/te.po
@@ -7,8 +7,8 @@ msgid ""
msgstr ""
"Project-Id-Version: packagekit.master.te\n"
"Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2009-09-25 08:37+0000\n"
-"PO-Revision-Date: 2009-09-25 16:05+0530\n"
+"POT-Creation-Date: 2009-11-12 03:45+0000\n"
+"PO-Revision-Date: 2009-11-12 12:54+0530\n"
"Last-Translator: Krishna Babu K <kkrothap at redhat.com>\n"
"Language-Team: Telugu <en at li.org>\n"
"MIME-Version: 1.0\n"
@@ -23,117 +23,118 @@ msgstr ""
"\n"
"\n"
"\n"
+"\n"
#. TRANSLATORS: this is an atomic transaction
-#: ../client/pk-console.c:143
+#: ../client/pk-console.c:173
msgid "Transaction"
msgstr "à°µà±à°¯à°µà°¹à°¾à°°à°®à±"
#. TRANSLATORS: this is the time the transaction was started in system timezone
-#: ../client/pk-console.c:145
+#: ../client/pk-console.c:175
msgid "System time"
msgstr "సిసà±à°à°®à± సమయà°"
#. TRANSLATORS: this is if the transaction succeeded or not
-#: ../client/pk-console.c:147
+#: ../client/pk-console.c:177
msgid "Succeeded"
msgstr "సఫలమà±à°à°¦à°¿"
-#: ../client/pk-console.c:147
+#: ../client/pk-console.c:177
msgid "True"
msgstr "సతà±à°¯à°®à±"
-#: ../client/pk-console.c:147
+#: ../client/pk-console.c:177
msgid "False"
msgstr "à°
సతà±à°¯à°®à±"
#. TRANSLATORS: this is the transactions role, e.g. "update-system"
#. TRANSLATORS: the trasaction role, e.g. update-system
-#: ../client/pk-console.c:149 ../src/pk-polkit-action-lookup.c:336
+#: ../client/pk-console.c:179 ../src/pk-polkit-action-lookup.c:336
msgid "Role"
msgstr "పాతà±à°°"
#. TRANSLATORS: this is The duration of the transaction
-#: ../client/pk-console.c:154
+#: ../client/pk-console.c:184
msgid "Duration"
msgstr "నిడివి"
-#: ../client/pk-console.c:154
+#: ../client/pk-console.c:184
msgid "(seconds)"
msgstr "(à°¸à±à°à°¨à±à°²à±)"
#. TRANSLATORS: this is The command line used to do the action
#. TRANSLATORS: the command line of the thing that wants the authentication
-#: ../client/pk-console.c:158 ../src/pk-polkit-action-lookup.c:350
+#: ../client/pk-console.c:188 ../src/pk-polkit-action-lookup.c:350
msgid "Command line"
msgstr "à°à°¦à±à°¶ వరà±à°¸"
#. TRANSLATORS: this is the user ID of the user that started the action
-#: ../client/pk-console.c:160
+#: ../client/pk-console.c:190
msgid "User ID"
msgstr "వినియà±à°à°¦à°¾à°°à°¿ ID"
#. TRANSLATORS: this is the username, e.g. hughsie
-#: ../client/pk-console.c:167
+#: ../client/pk-console.c:197
msgid "Username"
msgstr "వినియà±à°à°¦à°¾à°°à°¿à°¨à°¾à°®à°®à±"
#. TRANSLATORS: this is the users real name, e.g. "Richard Hughes"
-#: ../client/pk-console.c:171
+#: ../client/pk-console.c:201
msgid "Real name"
msgstr "వాసà±à°¤à°µ నామమà±"
-#: ../client/pk-console.c:179
+#: ../client/pk-console.c:209
msgid "Affected packages:"
msgstr "à°ªà±à°°à°à°¾à°µà°¿à°¤ à°¸à°à°à°²à°¨à°¾à°²à±:"
-#: ../client/pk-console.c:181
+#: ../client/pk-console.c:211
msgid "Affected packages: None"
msgstr "à°ªà±à°°à°à°¾à°µà°¿à°¤ à°¸à°à°à°²à°¨à°¾à°²à±: à°à°¦à±à°à°¾à°¦à±"
#. TRANSLATORS: this is the distro, e.g. Fedora 10
-#: ../client/pk-console.c:201
+#: ../client/pk-console.c:246
msgid "Distribution"
msgstr "à°ªà°à°ªà°¿à°£à°¿"
#. TRANSLATORS: this is type of update, stable or testing
-#: ../client/pk-console.c:203
+#: ../client/pk-console.c:248
msgid "Type"
msgstr "à°°à°à°®à±"
#. TRANSLATORS: this is any summary text describing the upgrade
#. TRANSLATORS: this is the summary of the group
-#: ../client/pk-console.c:205 ../client/pk-console.c:226
+#: ../client/pk-console.c:250 ../client/pk-console.c:289
msgid "Summary"
msgstr "à°¸à°à°à±à°·à°¿à°ªà±à°¤ సమాà°à°¾à°°à°®à±"
#. TRANSLATORS: this is the group category name
-#: ../client/pk-console.c:215
+#: ../client/pk-console.c:278
msgid "Category"
msgstr "వరà±à°à°®à±"
#. TRANSLATORS: this is group identifier
-#: ../client/pk-console.c:217
+#: ../client/pk-console.c:280
msgid "ID"
msgstr "ID"
#. TRANSLATORS: this is the parent group
-#: ../client/pk-console.c:220
+#: ../client/pk-console.c:283
msgid "Parent"
msgstr "మాతà±à°°à±à°"
#. TRANSLATORS: this is the name of the parent group
-#: ../client/pk-console.c:223
+#: ../client/pk-console.c:286
msgid "Name"
msgstr "నామమà±"
#. TRANSLATORS: this is preferred icon for the group
-#: ../client/pk-console.c:229
+#: ../client/pk-console.c:292
msgid "Icon"
msgstr "à°ªà±à°°à°¤à°¿à°®"
#. TRANSLATORS: this is a header for the package that can be updated
-#: ../client/pk-console.c:243
+#: ../client/pk-console.c:338
msgid "Details about the update:"
msgstr "నవà±à°à°°à°£ à°à±à°°à°¿à°à°à°¿ సమాà°à°¾à°°à°®à±:"
@@ -141,8 +142,8 @@ msgstr "నవà±à°à°°à°£ à°à±à°°à°¿à°à°à°¿ సమాà°à°¾à°°à°®à±:"
#. TRANSLATORS: the package that is not signed by a known key
#. TRANSLATORS: the package name that was trying to be installed
#. TRANSLATORS: title, the names of the packages that the method is processing
-#: ../client/pk-console.c:249 ../lib/packagekit-glib2/pk-task-text.c:105
-#: ../lib/packagekit-glib2/pk-task-text.c:172
+#: ../client/pk-console.c:344 ../lib/packagekit-glib2/pk-task-text.c:126
+#: ../lib/packagekit-glib2/pk-task-text.c:208
#: ../src/pk-polkit-action-lookup.c:361
msgid "Package"
msgid_plural "Packages"
@@ -150,148 +151,148 @@ msgstr[0] "à°¸à°à°à°²à°¨à°®à±"
msgstr[1] "à°¸à°à°à°²à°¨à°®à±à°²à±"
#. TRANSLATORS: details about the update, any packages that this update updates
-#: ../client/pk-console.c:252
+#: ../client/pk-console.c:347
msgid "Updates"
msgstr "నవà±à°à°°à°£à°²à±"
#. TRANSLATORS: details about the update, any packages that this update obsoletes
-#: ../client/pk-console.c:256
+#: ../client/pk-console.c:351
msgid "Obsoletes"
msgstr "à°¤à±à°²à°à°¿à°à°à°¿à°¨à°µà°¿"
#. TRANSLATORS: details about the update, the vendor URLs
#. TRANSLATORS: the vendor (e.g. vmware) that is providing the EULA
-#: ../client/pk-console.c:260 ../lib/packagekit-glib2/pk-task-text.c:175
+#: ../client/pk-console.c:355 ../lib/packagekit-glib2/pk-task-text.c:211
msgid "Vendor"
msgstr "à°
à°®à±à°®à°à°à°¦à°¾à°°à±"
#. TRANSLATORS: details about the update, the bugzilla URLs
-#: ../client/pk-console.c:264
+#: ../client/pk-console.c:359
msgid "Bugzilla"
msgstr "à°¬à°à±âà°à°¿à°²à±à°²à°¾"
#. TRANSLATORS: details about the update, the CVE URLs
-#: ../client/pk-console.c:268
+#: ../client/pk-console.c:363
msgid "CVE"
msgstr "CVE"
#. TRANSLATORS: details about the update, if the package requires a restart
-#: ../client/pk-console.c:272
+#: ../client/pk-console.c:367
msgid "Restart"
msgstr "à°ªà±à°¨à°à°ªà±à°°à°¾à°°à°à°à°®à±"
#. TRANSLATORS: details about the update, any description of the update
-#: ../client/pk-console.c:276
+#: ../client/pk-console.c:371
msgid "Update text"
msgstr "పాఠమౠనవà±à°à°°à°¿à°à°à±à°®à±"
#. TRANSLATORS: details about the update, the changelog for the package
-#: ../client/pk-console.c:280
+#: ../client/pk-console.c:375
msgid "Changes"
msgstr "మారà±à°ªà±à°²à±"
#. TRANSLATORS: details about the update, the ongoing state of the update
-#: ../client/pk-console.c:284
+#: ../client/pk-console.c:379
msgid "State"
msgstr "à°¸à±à°¥à°¿à°¤à°¿"
#. TRANSLATORS: details about the update, date the update was issued
-#: ../client/pk-console.c:289
+#: ../client/pk-console.c:383
msgid "Issued"
msgstr "విడà±à°¦à°²à±à°¨"
#. TRANSLATORS: details about the update, date the update was updated
#. TRANSLATORS: The action of the package, in past tense
-#: ../client/pk-console.c:294 ../lib/packagekit-glib2/pk-console-shared.c:498
+#: ../client/pk-console.c:387 ../lib/packagekit-glib2/pk-console-shared.c:510
msgid "Updated"
msgstr "నవà±à°à°°à°¿à°à°à°¿à°¨"
#. TRANSLATORS: if the repo is enabled
-#: ../client/pk-console.c:312
+#: ../client/pk-console.c:423
msgid "Enabled"
msgstr "à°à±à°¤à°¨à°ªà°°à°à°¿à°¨"
#. TRANSLATORS: if the repo is disabled
-#: ../client/pk-console.c:315
+#: ../client/pk-console.c:426
msgid "Disabled"
msgstr "à°
à°à±à°¤à°¨à°ªà°°à°à°¿à°¨"
#. TRANSLATORS: a package requires the system to be restarted
-#: ../client/pk-console.c:337
+#: ../client/pk-console.c:460
msgid "System restart required by:"
msgstr "సిసà±à°à°®à± à°ªà±à°¨à°à°ªà±à°°à°¾à°°à°à°à°®à± à°
వసరమà±à°à°¦à°¿:"
#. TRANSLATORS: a package requires the session to be restarted
-#: ../client/pk-console.c:340
+#: ../client/pk-console.c:463
msgid "Session restart required:"
msgstr "విà°à°¾à°à°®à±(à°¸à±à°·à°¨à±) à°ªà±à°¨à°à°ªà±à°°à°¾à°°à°à°à°®à± à°
వసరమà±à°à°¦à°¿:"
#. TRANSLATORS: a package requires the system to be restarted due to a security update
-#: ../client/pk-console.c:343
+#: ../client/pk-console.c:466
msgid "System restart (security) required by:"
msgstr "సిసà±à°à°®à± à°ªà±à°¨à°à°ªà±à°°à°¾à°°à°à°à°®à± (à°°à°à±à°·à°£) à°
వసరమà±à°à°¦à°¿:"
#. TRANSLATORS: a package requires the session to be restarted due to a security update
-#: ../client/pk-console.c:346
+#: ../client/pk-console.c:469
msgid "Session restart (security) required:"
msgstr "విà°à°¾à°à°®à±(à°¸à±à°·à°¨à±) à°ªà±à°¨à°à°ªà±à°°à°¾à°°à°à°à°®à± (à°°à°à±à°·à°£) à°
వసరమà±à°à°¦à°¿:"
#. TRANSLATORS: a package requires the application to be restarted
-#: ../client/pk-console.c:349
+#: ../client/pk-console.c:472
msgid "Application restart required by:"
msgstr "à°
à°¨à±à°µà°°à±à°¤à°¨à°®à± à°ªà±à°¨à°à°ªà±à°°à°¾à°°à°à°à°®à± à°
వసరమà±à°à°¦à°¿:"
#. TRANSLATORS: This a list of details about the package
-#: ../client/pk-console.c:366
+#: ../client/pk-console.c:505
msgid "Package description"
msgstr "à°¸à°à°à°²à°¨à°®à± వివరణ"
#. TRANSLATORS: This a message (like a little note that may be of interest) from the transaction
-#: ../client/pk-console.c:384
+#: ../client/pk-console.c:536
msgid "Message:"
msgstr "à°¸à°à°¦à±à°¶à°®à±:"
#. TRANSLATORS: This where the package has no files
-#: ../client/pk-console.c:398
+#: ../client/pk-console.c:557
msgid "No files"
msgstr "దసà±à°¤à±à°°à°®à±à°²à± à°²à±à°µà±"
#. TRANSLATORS: This a list files contained in the package
-#: ../client/pk-console.c:403
+#: ../client/pk-console.c:562
msgid "Package files"
msgstr "à°¸à°à°à°²à°¨à°®à± దసà±à°¤à±à°°à°®à±à°²à±"
#. TRANSLATORS: we failed to get any results, which is pretty fatal in my book
-#: ../client/pk-console.c:475
+#: ../client/pk-console.c:636
msgid "Fatal error"
msgstr "à°ªà±à°°à°®à°¾à°¦à°à°°à°®à±à°¨ à°¦à±à°·à°®à±"
#. TRANSLATORS: the transaction failed in a way we could not expect
-#: ../client/pk-console.c:484
-#: ../contrib/command-not-found/pk-command-not-found.c:422
-#: ../contrib/command-not-found/pk-command-not-found.c:563
+#: ../client/pk-console.c:645
+#: ../contrib/command-not-found/pk-command-not-found.c:432
+#: ../contrib/command-not-found/pk-command-not-found.c:599
msgid "The transaction failed"
msgstr "బదిలà±à°à°°à°£ విఫలమà±à°à°¦à°¿"
#. TRANSLATORS: a package needs to restart their system
-#: ../client/pk-console.c:552
+#: ../client/pk-console.c:713
msgid "Please restart the computer to complete the update."
msgstr "ఠనవà±à°à°°à°£ à°ªà±à°°à±à°¤à°à±à°à°à± దయà°à±à°¸à°¿ à°à°à°ªà±à°¯à±à°à°°à± à°ªà±à°¨à°à°ªà±à°°à°¾à°°à°à°à°¿à°à°à±à°®à±."
#. TRANSLATORS: a package needs to restart the session
-#: ../client/pk-console.c:555
+#: ../client/pk-console.c:716
msgid "Please logout and login to complete the update."
msgstr "ఠనవà±à°à°°à°£ à°ªà±à°°à±à°¤à°à±à°à°à± దయà°à±à°¸à°¿ లాà°à±à°
à°µà±à°à± మరియౠలాà°à°¿à°¨à±à°
à°µà±à°µà±à°®à±"
#. TRANSLATORS: a package needs to restart their system (due to security)
-#: ../client/pk-console.c:558
+#: ../client/pk-console.c:719
msgid ""
"Please restart the computer to complete the update as important security "
"updates have been installed."
msgstr "à°®à±à°à±à°¯à°®à±à°¨ నవà±à°à°°à°£à°²à± à°¸à°à°¸à±à°¥à°¾à°ªà°¿à°à°à°¬à°¡à°¿à°¨à°µà°¿ à°à°¾à°µà±à°¨ దయà°à±à°¸à°¿ నవà±à°à°°à°£ à°ªà±à°°à±à°¤à°¿à°à±à°¯à±à°à°à± à°à°à°ªà±à°¯à±à°à°°à± à°ªà±à°¨à°à°ªà±à°°à°¾à°°à°à°à°¿à°à°à±à°®à±."
#. TRANSLATORS: a package needs to restart the session (due to security)
-#: ../client/pk-console.c:561
+#: ../client/pk-console.c:722
msgid ""
"Please logout and login to complete the update as important security updates "
"have been installed."
@@ -300,19 +301,19 @@ msgstr ""
"à°
à°µà±à°µà°à°¡à°¿."
#. TRANSLATORS: There was an error getting the list of files for the package. The detailed error follows
-#: ../client/pk-console.c:584
+#: ../client/pk-console.c:745
#, c-format
msgid "This tool could not find any available package: %s"
msgstr "ఠసాధనమౠà°
à°à°¦à±à°¬à°¾à°à±à°²à± à°µà±à°¨à±à°¨ యౠసà°à°à°²à°¨à°®à±à°²à°¨à± à°à°¨à±à°à±à°¨à°²à±à°à°ªà±à°¯à°¿à°à°¦à°¿: %s"
#. TRANSLATORS: There was an error getting the list of files for the package. The detailed error follows
-#: ../client/pk-console.c:612
+#: ../client/pk-console.c:773
#, c-format
msgid "This tool could not find the installed package: %s"
msgstr "ఠసాధనమౠసà°à°¸à±à°¥à°¾à°ªà°¿à°¤ à°¸à°à°à°²à°¨à°®à±à°²à°¨à± à°à°¨à±à°à±à°¨à°²à±à°à°ªà±à°¯à°¿à°à°¦à°¿: %s"
#. TRANSLATORS: There was an error getting the list of files for the package. The detailed error follows
-#: ../client/pk-console.c:640 ../client/pk-console.c:668
+#: ../client/pk-console.c:801 ../client/pk-console.c:829
#, c-format
msgid "This tool could not find the package: %s"
msgstr "ఠసాధనమౠపà±à°¯à°¾à°à±à°à±à°¨à± à°à°¨à±à°à±à°¨à°²à±à° à°ªà±à°¯à°¿à°à°¦à°¿: %s"
@@ -321,170 +322,181 @@ msgstr "ఠసాధనమౠపà±à°¯à°¾à°à±à°à±à°¨à± à°à°¨à±à°à±à°¨
#. TRANSLATORS: There was an error getting the dependencies for the package. The detailed error follows
#. TRANSLATORS: There was an error getting the details about the package. The detailed error follows
#. TRANSLATORS: The package name was not found in any software sources. The detailed error follows
-#: ../client/pk-console.c:696 ../client/pk-console.c:724
-#: ../client/pk-console.c:752 ../client/pk-console.c:780
-#: ../client/pk-console.c:808
+#: ../client/pk-console.c:857 ../client/pk-console.c:885
+#: ../client/pk-console.c:913 ../client/pk-console.c:941
+#: ../client/pk-console.c:969
#, c-format
msgid "This tool could not find all the packages: %s"
msgstr "ఠసాధనమౠà°
à°¨à±à°¨à°¿ à°¸à°à°à°²à°¨à°®à±à°²à°¨à± à°à°¨à±à°à±à°¨à°²à±à° à°ªà±à°¯à°¿à°à°¦à°¿: %s"
#. TRANSLATORS: This is when the daemon crashed, and we are up shit creek without a paddle
-#: ../client/pk-console.c:837
+#: ../client/pk-console.c:998
msgid "The daemon crashed mid-transaction!"
msgstr "à°µà±à°¯à°µà°¹à°¾à°°à°®à±-మదà±à°¯à°²à± à°¡à±à°®à±à°¨à± à°à±à°ªà±à°ªà°à±à°²à°¿à°¨à°¦à°¿!"
#. TRANSLATORS: This is the header to the --help menu
-#: ../client/pk-console.c:871
+#: ../client/pk-console.c:1032
msgid "PackageKit Console Interface"
msgstr "à°ªà±à°¯à°¾à°à±à°à±à°à°¿à°à± à°à°¨à±à°¸à±à°²à± à°à°à°à°°à±à°«à±à°¸à±"
#. these are commands we can use with pkcon
-#: ../client/pk-console.c:873
+#: ../client/pk-console.c:1034
msgid "Subcommands:"
msgstr "à°à°ªà°à°¦à±à°¶à°®à±à°²à±:"
#. TRANSLATORS: we keep a database updated with the time that an action was last executed
-#: ../client/pk-console.c:952
+#: ../client/pk-console.c:1113
msgid "Failed to get the time since this action was last completed"
msgstr "à° à°à°°à±à°¯ à°à°à°°à±à°¨ à°ªà±à°°à±à°¤à±à°¨ à°à°¾à°°à°£à°®à±à°à°¾ సమయమà±à°¨à± à°ªà±à°à°¦à±à°à°²à± విఫలమà±à°à°¦à°¿"
#. TRANSLATORS: command line argument, if we should show debugging information
#. TRANSLATORS: if we should show debugging data
-#: ../client/pk-console.c:987 ../client/pk-generate-pack.c:223
-#: ../client/pk-monitor.c:276
-#: ../contrib/command-not-found/pk-command-not-found.c:616
-#: ../contrib/debuginfo-install/pk-debuginfo-install.c:511
+#: ../client/pk-console.c:1150 ../client/pk-generate-pack.c:223
+#: ../client/pk-monitor.c:281
+#: ../contrib/command-not-found/pk-command-not-found.c:653
+#: ../contrib/debuginfo-install/pk-debuginfo-install.c:518
#: ../contrib/device-rebind/pk-device-rebind.c:293 ../src/pk-main.c:211
msgid "Show extra debugging information"
msgstr "à°
దనపౠడà±à°¬à°à±à°à°¿à°à°à± సమాà°à°¾à°°à°®à±à°¨à± à°à±à°ªà±à°®à±"
#. TRANSLATORS: command line argument, just show the version string
-#: ../client/pk-console.c:990 ../client/pk-monitor.c:278
+#: ../client/pk-console.c:1153 ../client/pk-monitor.c:283
msgid "Show the program version and exit"
msgstr "à°ªà±à°°à±à°à±à°°à°¾à°®à± వరà±à°·à°¨à±âనౠà°à±à°ªà±à°®à± మరియౠనిషà±à°à±à°°à°®à°¿à°à°à±à°®à±"
#. TRANSLATORS: command line argument, use a filter to narrow down results
-#: ../client/pk-console.c:993
+#: ../client/pk-console.c:1156
msgid "Set the filter, e.g. installed"
msgstr "వడపà±à°¤(à°«à°¿à°²à±à°à°°à±) à°
మరà±à°à±à°®à±, à°.దా. à°¸à°à°¸à±à°¥à°¾à°ªà°¿à°à°à°¿à°¨"
#. TRANSLATORS: command line argument, work asynchronously
-#: ../client/pk-console.c:996
+#: ../client/pk-console.c:1159
msgid "Exit without waiting for actions to complete"
msgstr "à°ªà±à°°à±à°¤à°µà°µà°²à°¸à°¿à°¨ à°à°°à±à°¯à°² à°à±à°°à°à± à°µà±à°à°¿à°µà±à°à°¡à°à±à°à°¡à°¾ నిషà±à°à±à°°à°®à°¿à°à°à±à°®à±"
+#. command line argument, do we ask questions
+#: ../client/pk-console.c:1162
+#: ../contrib/debuginfo-install/pk-debuginfo-install.c:530
+msgid "Install the packages without asking for confirmation"
+msgstr "నిరà±à°§à°¾à°°à°£ à°à±à°°à°à± à°
à°¡à±à°à°à±à°à°¡à°¾ à°ªà±à°¯à°¾à°à±à°à±à°²à°¨à± à°¸à°à°¸à±à°¥à°¾à°ªà°¿à°à°à±à°®à±"
+
+#. TRANSLATORS: command line argument, this command is not a priority
+#: ../client/pk-console.c:1165
+msgid "Run the command using idle network bandwidth and also using less power"
+msgstr "à°¸à±à°¥à°¿à°°à°®à±à°¨ à°¨à±à°à±à°µà°°à±à°à± à°¬à±à°¯à°¾à°à°¡à±âవిడà±à°¤à±à°¨à± మరియౠతà°à±à°à±à°µ à°¶à°à±à°¤à°¿à°¨à°¿ à°µà±à°ªà°¯à±à°à°¿à°à°à°¿ à°à°¦à±à°¶à°®à±à°¨à± నడà±à°ªà±à°®à±"
+
#. TRANSLATORS: we failed to contact the daemon
-#: ../client/pk-console.c:1022
+#: ../client/pk-console.c:1191
msgid "Failed to contact PackageKit"
msgstr "à°ªà±à°¯à°¾à°à±à°à±à°à°¿à°à±âనౠసà°à°ªà±à°°à°¦à°¿à°à°à±à°à°à± విఫలమà±à°à°¦à°¿"
#. TRANSLATORS: The user specified an incorrect filter
-#: ../client/pk-console.c:1074
+#: ../client/pk-console.c:1247
msgid "The filter specified was invalid"
msgstr "à°¤à±à°²à±à°ªà°¬à°¡à°¿à°¨ వడపà±à°¤(à°«à°¿à°²à±à°à°°à±) à°à±à°²à±à°²à°¨à°¿à°¦à°¿"
#. TRANSLATORS: a search type can be name, details, file, etc
-#: ../client/pk-console.c:1093
+#: ../client/pk-console.c:1266
msgid "A search type is required, e.g. name"
msgstr "à°à° à°¶à±à°§à°¨ à°°à°à°®à± à°
వసరమà±à°à°¦à°¿, à°.దా. నామమà±"
#. TRANSLATORS: the user needs to provide a search term
-#: ../client/pk-console.c:1100 ../client/pk-console.c:1112
-#: ../client/pk-console.c:1124 ../client/pk-console.c:1136
+#: ../client/pk-console.c:1273 ../client/pk-console.c:1285
+#: ../client/pk-console.c:1297 ../client/pk-console.c:1309
msgid "A search term is required"
msgstr "à°à° à°¶à±à°§à°¨ పదమౠà°
వసరమà±à°à°¦à°¿"
#. TRANSLATORS: the search type was provided, but invalid
-#: ../client/pk-console.c:1146
+#: ../client/pk-console.c:1319
msgid "Invalid search type"
msgstr "à°à±à°²à±à°²à°¨à°¿ à°¸à±à°§à°¨ à°°à°à°®à±"
#. TRANSLATORS: the user did not specify what they wanted to install
-#: ../client/pk-console.c:1152
+#: ../client/pk-console.c:1325
msgid "A package name to install is required"
msgstr "à°¸à°à°¸à±à°¥à°¾à°ªà°¿à°à°à±à°à°à± à°µà±à° à°ªà±à°¯à°¾à°à±à°à± నామమౠà°
వసరమà±à°à°¦à°¿"
#. TRANSLATORS: the user did not specify what they wanted to install
-#: ../client/pk-console.c:1161
+#: ../client/pk-console.c:1334
msgid "A filename to install is required"
msgstr "à°¸à°à°¸à±à°¥à°¾à°ªà°¿à°à°à±à°à°à± à°µà±à° దసà±à°¤à±à°°à°®à±à°¨à°¾à°®à°®à± à°
వసరమà±à°à°¦à°¿"
#. TRANSLATORS: geeky error, 99.9999% of users won't see this
-#: ../client/pk-console.c:1173
+#: ../client/pk-console.c:1346
msgid "A type, key_id and package_id are required"
msgstr "à°à° à°°à°à°®à±, key_id మరియౠpackage_id à°
వసరమà±à°à°¦à°¿"
#. TRANSLATORS: the user did not specify what they wanted to remove
-#: ../client/pk-console.c:1184
+#: ../client/pk-console.c:1357
msgid "A package name to remove is required"
msgstr "à°¤à±à°²à°à°¿à°à°à±à°à°à± à°¸à°à°à°²à°¨à°®à± నామమౠà°
వసరమà±à°à°¦à°¿"
#. TRANSLATORS: the user did not specify anything about what to download or where
-#: ../client/pk-console.c:1193
+#: ../client/pk-console.c:1366
msgid "A destination directory and the package names to download are required"
msgstr "à°¡à±à°¨à±à°²à±à°¡à± à°à±à°¯à±à°à°à± à°à°®à±à°¯ à°¡à±à°°à±à°à±à°à°°à± మరియౠసà°à°à°²à°¨à°®à± నామమà±à°²à± à°
వసరమà±"
#. TRANSLATORS: the directory does not exist, so we can't continue
-#: ../client/pk-console.c:1200
+#: ../client/pk-console.c:1373
msgid "Directory not found"
msgstr "à°¡à±à°°à±à°à±à°à°°à± à°à°¨à°¬à°¡à°²à±à°¦à±"
#. TRANSLATORS: geeky error, 99.9999% of users won't see this
-#: ../client/pk-console.c:1209
+#: ../client/pk-console.c:1382
msgid "A licence identifier (eula-id) is required"
msgstr "à°à° à°²à±à°¸à±à°¨à±à°¸à± à°à±à°°à±à°¤à°¿à°à°ªà±à°¦à°¾à°°à°¿ (eula-id) à°
వసరమà±à°à°¦à°¿"
#. TRANSLATORS: geeky error, 99.9999% of users won't see this
-#: ../client/pk-console.c:1220
+#: ../client/pk-console.c:1393
msgid "A transaction identifier (tid) is required"
msgstr "à°µà±à°¯à°µà°¹à°¾à°°à°ªà± à°à±à°°à±à°¤à°¿à°à°ªà±à°¦à°¾à°°à°¿ (tid) à°
వసరమà±à°à°¦à°¿"
#. TRANSLATORS: The user did not specify a package name
-#: ../client/pk-console.c:1241
+#: ../client/pk-console.c:1414
msgid "A package name to resolve is required"
msgstr "పరిషà±à°à°°à°¿à°à°à±à°à°à± à°à° à°ªà±à°¯à°¾à°à±à°à± నామమౠà°
వసరమà±"
#. TRANSLATORS: The user did not specify a repository (software source) name
-#: ../client/pk-console.c:1252 ../client/pk-console.c:1263
+#: ../client/pk-console.c:1425 ../client/pk-console.c:1436
msgid "A repository name is required"
msgstr "à°à° à°°à°¿à°ªà±à°à°¿à°à°°à± నామమౠà°
వసరమà±à°à°¦à°¿"
#. TRANSLATORS: The user didn't provide any data
-#: ../client/pk-console.c:1274
+#: ../client/pk-console.c:1447
msgid "A repo name, parameter and value are required"
msgstr "à°à° à°°à±à°ªà± నామమà±, పారామితి మరియౠవిలà±à°µ à°
వసరమà±à°à°¦à°¿"
#. TRANSLATORS: The user didn't specify what action to use
-#: ../client/pk-console.c:1291
+#: ../client/pk-console.c:1464
msgid "An action, e.g. 'update-system' is required"
msgstr "à°à°°à±à°¯, à°.దా. update-system à°
వసరమà±"
#. TRANSLATORS: The user specified an invalid action
-#: ../client/pk-console.c:1298
+#: ../client/pk-console.c:1471
msgid "A correct role is required"
msgstr "à°à° సరà±à°¨ పాతà±à°° à°
వసరమà±"
#. TRANSLATORS: The user did not provide a package name
#. TRANSLATORS: This is when the user fails to supply the package name
-#: ../client/pk-console.c:1308 ../client/pk-console.c:1323
-#: ../client/pk-console.c:1332 ../client/pk-console.c:1352
-#: ../client/pk-console.c:1361 ../client/pk-generate-pack.c:287
+#: ../client/pk-console.c:1481 ../client/pk-console.c:1496
+#: ../client/pk-console.c:1505 ../client/pk-console.c:1525
+#: ../client/pk-console.c:1534 ../client/pk-generate-pack.c:287
msgid "A package name is required"
msgstr "à°¸à°à°à°²à°¨à°®à± నామమౠà°
వసరమà±à°à°¦à°¿"
#. TRANSLATORS: each package "provides" certain things, e.g. mime(gstreamer-decoder-mp3), the user didn't specify it
-#: ../client/pk-console.c:1341
+#: ../client/pk-console.c:1514
msgid "A package provide string is required"
msgstr "à°¸à°à°à°²à°¨à°®à± à°
à°à°¦à°¿à°à°à± పదబà°à°¦à°®à±(à°¸à±à°à±à°°à°¿à°à°à±) à°
వసరమà±à°à°¦à°¿"
#. TRANSLATORS: The user tried to use an unsupported option on the command line
-#: ../client/pk-console.c:1421
+#: ../client/pk-console.c:1594
#, c-format
msgid "Option '%s' is not supported"
msgstr "à°à°à±à°à°¿à°à°®à± '%s' మదà±à°¦à°¤à±à°¯à°¬à°¡à°¦à±"
#. TRANSLATORS: Generic failure of what they asked to do
-#: ../client/pk-console.c:1431
+#: ../client/pk-console.c:1604
msgid "Command failed"
msgstr "à°à°¦à±à°¶à°®à± విఫలమà±à°à°¦à°¿"
@@ -594,155 +606,160 @@ msgstr "à°¸à±à°µà°¾ పాà°à± à°¸à±à°·à±à°à°¿à°à°à°¬à°¡à°¿à°à°¦à°¿ '%s
msgid "Failed to create '%s': %s"
msgstr "'%s' à°¸à±à°·à±à°à°¿à°à°à±à°à°à± విఫలమà±à°à°¦à°¿: %s"
-#: ../client/pk-monitor.c:206
+#: ../client/pk-monitor.c:211
msgid "Failed to get daemon state"
msgstr "à°¡à±à°®à±à°¨à± à°¸à±à°¥à°¿à°¤à°¿à°¨à°¿ à°ªà±à°à°¦à±à°à°à± విఫలమà±à°à°¦à°¿"
#. TRANSLATORS: this is a program that monitors PackageKit
-#: ../client/pk-monitor.c:294
+#: ../client/pk-monitor.c:299
msgid "PackageKit Monitor"
msgstr "PackageKit పరà±à°¯à°µà±à°à±à°·à°à°¿"
#. TRANSLATORS: when we are getting data from the daemon
-#: ../contrib/browser-plugin/pk-plugin-install.c:491
+#: ../contrib/browser-plugin/pk-plugin-install.c:495
msgid "Getting package information..."
msgstr "à°¸à°à°à°²à°¨à°®à± సమాà°à°¾à°°à°®à±à°¨à± à°ªà±à°à°¦à±à°à±à°¨à±à°¨à°¦à°¿..."
#. TRANSLATORS: run an applicaiton
-#: ../contrib/browser-plugin/pk-plugin-install.c:497
+#: ../contrib/browser-plugin/pk-plugin-install.c:501
#, c-format
msgid "Run %s"
msgstr "%s నడà±à°ªà±"
#. TRANSLATORS: show the installed version of a package
-#: ../contrib/browser-plugin/pk-plugin-install.c:503
+#: ../contrib/browser-plugin/pk-plugin-install.c:507
msgid "Installed version"
msgstr "à°¸à°à°¸à±à°¥à°¾à°ªà°¿à°à°à°¿à°¨ వరà±à°·à°¨à±"
#. TRANSLATORS: run the application now
-#: ../contrib/browser-plugin/pk-plugin-install.c:511
+#: ../contrib/browser-plugin/pk-plugin-install.c:515
#, c-format
msgid "Run version %s now"
msgstr "వరà±à°·à°¨à± %s యిపà±à°ªà±à°¡à± నడà±à°ªà±à°®à±"
#. TRANSLATORS: run the application now
-#: ../contrib/browser-plugin/pk-plugin-install.c:517
+#: ../contrib/browser-plugin/pk-plugin-install.c:521
msgid "Run now"
msgstr "à°à°ªà±à°ªà±à°¡à± నడà±à°ªà±à°®à±"
#. TRANSLATORS: update to a new version of the package
-#: ../contrib/browser-plugin/pk-plugin-install.c:523
+#: ../contrib/browser-plugin/pk-plugin-install.c:527
#, c-format
msgid "Update to version %s"
msgstr "వరà±à°·à°¨à± %sà°à± నవà±à°à°°à°¿à°à°à±à°®à±"
#. TRANSLATORS: To install a package
-#: ../contrib/browser-plugin/pk-plugin-install.c:529
+#: ../contrib/browser-plugin/pk-plugin-install.c:533
#, c-format
msgid "Install %s now"
msgstr "%s యిపà±à°ªà±à°¡à± à°¸à°à°¸à±à°¥à°¾à°ªà°¿à°à°à±à°®à±"
#. TRANSLATORS: the version of the package
-#: ../contrib/browser-plugin/pk-plugin-install.c:532
+#: ../contrib/browser-plugin/pk-plugin-install.c:536
msgid "Version"
msgstr "వరà±à°·à°¨à±"
#. TRANSLATORS: noting found, so can't install
-#: ../contrib/browser-plugin/pk-plugin-install.c:537
+#: ../contrib/browser-plugin/pk-plugin-install.c:541
msgid "No packages found for your system"
msgstr "మౠసిసà±à°à°®à± à°à±à°°à°à± à°à°à±à°µà°à°à°¿ à°¸à°à°à°²à°¨à°¾à°²à± à°à°¨à°¬à°¡à°²à±à°¦à±"
#. TRANSLATORS: package is being installed
-#: ../contrib/browser-plugin/pk-plugin-install.c:542
+#: ../contrib/browser-plugin/pk-plugin-install.c:546
msgid "Installing..."
msgstr "à°¸à°à°¸à±à°¥à°¾à°ªà°¿à°à°à±à°à±à°¨à±à°¨à°¦à°¿..."
#. TRANSLATORS: downloading repo data so we can search
-#: ../contrib/command-not-found/pk-command-not-found.c:357
+#: ../contrib/command-not-found/pk-command-not-found.c:365
msgid "Downloading details about the software sources."
msgstr "సాఫà±à°à±à°µà±à°°à± à°®à±à°²à°¾à°² à°à±à°°à°¿à°à°à°¿ à°¡à±à°¨à±à°²à±à°¡à°¿à°à°à± వివరమà±à°²à±."
#. TRANSLATORS: downloading file lists so we can search
-#: ../contrib/command-not-found/pk-command-not-found.c:361
+#: ../contrib/command-not-found/pk-command-not-found.c:369
msgid "Downloading filelists (this may take some time to complete)."
msgstr "దసà±à°¤à±à°°à°®à±à°²à°à°¾à°¬à°¿à°¤à°¾à°¨à± à°¡à±à°¨à±à°²à±à°¡à±à°à±à°¸à±à°¤à±à°¨à±à°¨à°¦à°¿ (à°ªà±à°°à±à°¤à°¿à°à±à°¯à±à°à°à± యిది à°à±à°à°¤ సమయఠతà±à°¸à±à°à±à°¨à°µà°à±à°à±)"
#. TRANSLATORS: waiting for native lock
-#: ../contrib/command-not-found/pk-command-not-found.c:365
+#: ../contrib/command-not-found/pk-command-not-found.c:373
msgid "Waiting for package manager lock."
msgstr "à°¸à°à°à°²à°¨à°®à± నిరà±à°µà°¾à°¹à°¿à° లాà°à± à°à±à°°à°à± à°µà±à°à°¿à°µà±à°à°¦à°¿."
#. TRANSLATORS: loading package cache so we can search
-#: ../contrib/command-not-found/pk-command-not-found.c:369
+#: ../contrib/command-not-found/pk-command-not-found.c:377
msgid "Loading list of packages."
msgstr "à°¸à°à°à°²à°¨à°¾à°² à°à°¾à°¬à°¿à°¤à°¾à°¨à± à°²à±à°¡à±à°à±à°¸à±à°¤à±à°à°¦à°¿."
#. TRANSLATORS: we failed to find the package, this shouldn't happen
-#: ../contrib/command-not-found/pk-command-not-found.c:413
+#: ../contrib/command-not-found/pk-command-not-found.c:423
msgid "Failed to search for file"
msgstr "దసà±à°¤à±à°°à°®à±à°¨à± à°¶à±à°§à°¿à°à°à±à°à°²à± విఫలమà±à°à°¦à°¿"
+#. TRANSLATORS: we failed to launch the executable, the error follows
+#: ../contrib/command-not-found/pk-command-not-found.c:562
+msgid "Failed to launch:"
+msgstr "à°à°°à°à°à°¿à°à°à±à°à°²à± విఫలమà±à°à°¦à°¿:"
+
#. TRANSLATORS: we failed to install the package
-#: ../contrib/command-not-found/pk-command-not-found.c:554
+#: ../contrib/command-not-found/pk-command-not-found.c:590
msgid "Failed to install packages"
msgstr "à°¸à°à°à°²à°¨à°®à±à°²à°¨à± à°¸à°à°¸à±à°¥à°¾à°ªà°¿à°à°à±à°à°²à± విఫలమà±à°à°¦à°¿"
#. TRANSLATORS: tool that gets called when the command is not found
-#: ../contrib/command-not-found/pk-command-not-found.c:632
+#: ../contrib/command-not-found/pk-command-not-found.c:669
msgid "PackageKit Command Not Found"
msgstr "PackageKit à°à°¦à±à°¶à°®à± à°à°¨à°¬à°¡à°²à±à°¦à±"
#. TRANSLATORS: the prefix of all the output telling the user why it's not executing
-#: ../contrib/command-not-found/pk-command-not-found.c:660
+#: ../contrib/command-not-found/pk-command-not-found.c:699
msgid "Command not found."
msgstr "à°à°¦à±à°¶à°®à± à°à°¨à°¬à°¡à°²à±à°¦à±"
#. TRANSLATORS: tell the user what we think the command is
-#: ../contrib/command-not-found/pk-command-not-found.c:667
+#: ../contrib/command-not-found/pk-command-not-found.c:706
msgid "Similar command is:"
msgstr "à°
à°à±à°µà°à°à°¿ à°à°¦à±à°¶à°®à±:"
#. TRANSLATORS: Ask the user if we should run the similar command
-#: ../contrib/command-not-found/pk-command-not-found.c:676
+#: ../contrib/command-not-found/pk-command-not-found.c:716
msgid "Run similar command:"
msgstr "à°
à°à±à°µà°à°à°¿ à°à°¦à±à°¶à°®à±à°¨à± నడà±à°ªà±à°®à±:"
#. TRANSLATORS: show the user a list of commands that they could have meant
#. TRANSLATORS: show the user a list of commands we could run
-#: ../contrib/command-not-found/pk-command-not-found.c:688
-#: ../contrib/command-not-found/pk-command-not-found.c:697
+#: ../contrib/command-not-found/pk-command-not-found.c:730
+#: ../contrib/command-not-found/pk-command-not-found.c:739
msgid "Similar commands are:"
msgstr "à°à°à±à°¤à±à°°à± à°à°¦à±à°¶à°®à±à°²à±:"
#. TRANSLATORS: ask the user to choose a file to run
-#: ../contrib/command-not-found/pk-command-not-found.c:704
+#: ../contrib/command-not-found/pk-command-not-found.c:746
msgid "Please choose a command to run"
msgstr "నడà±à°ªà±à°à°à± దయà°à±à°¸à°¿ à°à°¦à±à°¶à°®à±à°¨à± à°¯à±à°à°à±à°à±à°¨à±à°®à±"
#. TRANSLATORS: tell the user what package provides the command
-#: ../contrib/command-not-found/pk-command-not-found.c:720
+#: ../contrib/command-not-found/pk-command-not-found.c:766
msgid "The package providing this file is:"
msgstr "à°¸à°à°à°²à°¨à°®à± à°
à°à°¦à°¿à°à°à±à°à±à°¨à±à°¨ ఠదసà±à°¤à±à°°à°®à±:"
#. TRANSLATORS: as the user if we want to install a package to provide the command
-#: ../contrib/command-not-found/pk-command-not-found.c:725
+#: ../contrib/command-not-found/pk-command-not-found.c:771
#, c-format
msgid "Install package '%s' to provide command '%s'?"
msgstr "à°¸à°à°à°²à°¨à°®à± '%s'నౠà°à°¦à±à°¶à°®à± '%s' à°
à°à°¦à°¿à°µà±à°µà±à°à°à± à°¸à°à°¸à±à°¥à°¾à°ªà°¿à°à°à°¾à°²à°¾?"
#. TRANSLATORS: Show the user a list of packages that provide this command
-#: ../contrib/command-not-found/pk-command-not-found.c:743
+#: ../contrib/command-not-found/pk-command-not-found.c:795
msgid "Packages providing this file are:"
msgstr "ఠదసà±à°¤à±à°°à°®à±à°¨à± à°
à°à°¦à°¿à°à°à± à°¸à°à°à°²à°¨à°®à±à°²à±:"
#. TRANSLATORS: Show the user a list of packages that they can install to provide this command
-#: ../contrib/command-not-found/pk-command-not-found.c:753
+#: ../contrib/command-not-found/pk-command-not-found.c:805
msgid "Suitable packages are:"
msgstr "సరితà±à°à± à°¸à°à°à°²à°¨à°®à±à°²à±:"
#. get selection
#. TRANSLATORS: ask the user to choose a file to install
-#: ../contrib/command-not-found/pk-command-not-found.c:762
+#: ../contrib/command-not-found/pk-command-not-found.c:814
msgid "Please choose a package to install"
msgstr "à°¸à°à°¸à±à°¥à°¾à°ªà°¿à°à°à±à°à°à± దయà°à±à°¸à°¿ à°¸à°à°à°²à°¨à°®à±à°¨à± à°¯à±à°à°à±à°à±à°¨à±à°®à±"
@@ -758,183 +775,183 @@ msgid "Failed to find the package %s, or already installed: %s"
msgstr "à°¸à°à°à°²à°¨à°®à± %s à°à°¨à±à°à±à°¨à±à°à°à± విఫలమà±à°à°¦à°¿, à°²à±à°¦à°¾ యిపà±à°ªà°à°¿à°à± à°¸à°à°¸à±à°¥à°¾à°ªà°¿à°à°à°¬à°¡à°¿à°à°¦à°¿: %s"
#. command line argument, simulate what would be done, but don't actually do it
-#: ../contrib/debuginfo-install/pk-debuginfo-install.c:514
+#: ../contrib/debuginfo-install/pk-debuginfo-install.c:521
msgid "Don't actually install any packages, only simulate what would be installed"
msgstr "యధారà±à°§à°à°à°¾ à°¯à±à°à±à°µà°à°à°¿ à°ªà±à°¯à°¾à°à±à°à±à°²à°¨à± à°¸à°à°¸à±à°¥à°¾à°ªà°¿à°à°à°¦à±, à°¸à°à°¸à±à°¥à°¾à°ªà°¿à°à°à°¿à°¨à°à±à°²à± à°à±à°°à°®à°¿à°à°ªà°à±à°¸à±à°¤à±à°à°¦à°¿"
#. command line argument, do we skip packages that depend on the ones specified
-#: ../contrib/debuginfo-install/pk-debuginfo-install.c:517
+#: ../contrib/debuginfo-install/pk-debuginfo-install.c:524
msgid "Do not install dependencies of the core packages"
msgstr "à°ªà±à°°à°¾à°§à°®à°¿à° à°ªà±à°¯à°¾à°à±à°à±à°²à°¯à±à°à±à° à°à°§à°¾à°°à°®à±à°²à°¨à± à°¸à°à°¸à±à°¥à°¾à°ªà°¿à°à°à°µà°¦à±à°¦à±"
#. command line argument, do we operate quietly
-#: ../contrib/debuginfo-install/pk-debuginfo-install.c:520
+#: ../contrib/debuginfo-install/pk-debuginfo-install.c:527
msgid "Do not display information or progress"
msgstr "సమాà°à°¾à°°à°®à±à°à°¾à°¨à°¿ à°²à±à°¦à°¾ à°ªà±à°°à±à°à°¤à°¿à°à°¾à°¨à°¿ à°ªà±à°°à°¦à°°à±à°¶à°¿à°à°à°µà°¦à±à°¦à±"
#. TRANSLATORS: tool that gets called when the command is not found
-#: ../contrib/debuginfo-install/pk-debuginfo-install.c:535
+#: ../contrib/debuginfo-install/pk-debuginfo-install.c:545
msgid "PackageKit Debuginfo Installer"
msgstr "à°ªà±à°¯à°¾à°à±à°à±à°à°¿à°à± à°¡à±à°¬à°à±âసమాà°à°¾à°°à° à°¸à°à°¸à±à°¥à°¾à°ªà°¿à°"
#. TRANSLATORS: the use needs to specify a list of package names on the command line
-#: ../contrib/debuginfo-install/pk-debuginfo-install.c:550
+#: ../contrib/debuginfo-install/pk-debuginfo-install.c:560
#, c-format
msgid "ERROR: Specify package names to install."
msgstr "à°¦à±à°·à°®à±: à°¸à°à°¸à±à°¥à°¾à°ªà°¿à°à°à±à°à°à± à°ªà±à°¯à°¾à°à±à°à± నామమà±à°²à°¨à± à°¤à±à°²à±à°ªà±à°®à±."
#. TRANSLATORS: we are getting the list of repositories
-#: ../contrib/debuginfo-install/pk-debuginfo-install.c:579
+#: ../contrib/debuginfo-install/pk-debuginfo-install.c:596
#, c-format
msgid "Getting sources list"
msgstr "à°®à±à°²à°®à±à°² à°à°¾à°¬à°¿à°¤à°¾à°¨à± à°ªà±à°à°¦à±à°à±à°¨à±à°¨à°¦à°¿"
#. TRANSLATORS: operation was not successful
-#: ../contrib/debuginfo-install/pk-debuginfo-install.c:589
-#: ../contrib/debuginfo-install/pk-debuginfo-install.c:664
-#: ../contrib/debuginfo-install/pk-debuginfo-install.c:748
-#: ../contrib/debuginfo-install/pk-debuginfo-install.c:792
-#: ../contrib/debuginfo-install/pk-debuginfo-install.c:859
-#: ../contrib/debuginfo-install/pk-debuginfo-install.c:903
+#: ../contrib/debuginfo-install/pk-debuginfo-install.c:606
+#: ../contrib/debuginfo-install/pk-debuginfo-install.c:681
+#: ../contrib/debuginfo-install/pk-debuginfo-install.c:765
+#: ../contrib/debuginfo-install/pk-debuginfo-install.c:809
+#: ../contrib/debuginfo-install/pk-debuginfo-install.c:876
+#: ../contrib/debuginfo-install/pk-debuginfo-install.c:920
msgid "FAILED."
msgstr "విఫలమà±à°à°¦à°¿."
#. TRANSLATORS: all completed 100%
-#: ../contrib/debuginfo-install/pk-debuginfo-install.c:604
-#: ../contrib/debuginfo-install/pk-debuginfo-install.c:644
-#: ../contrib/debuginfo-install/pk-debuginfo-install.c:679
-#: ../contrib/debuginfo-install/pk-debuginfo-install.c:763
-#: ../contrib/debuginfo-install/pk-debuginfo-install.c:807
-#: ../contrib/debuginfo-install/pk-debuginfo-install.c:874
-#: ../contrib/debuginfo-install/pk-debuginfo-install.c:918
+#: ../contrib/debuginfo-install/pk-debuginfo-install.c:621
+#: ../contrib/debuginfo-install/pk-debuginfo-install.c:661
+#: ../contrib/debuginfo-install/pk-debuginfo-install.c:696
+#: ../contrib/debuginfo-install/pk-debuginfo-install.c:780
+#: ../contrib/debuginfo-install/pk-debuginfo-install.c:824
+#: ../contrib/debuginfo-install/pk-debuginfo-install.c:891
+#: ../contrib/debuginfo-install/pk-debuginfo-install.c:935
#, c-format
msgid "OK."
msgstr "సరà±."
#. TRANSLATORS: tell the user what we found
-#: ../contrib/debuginfo-install/pk-debuginfo-install.c:607
+#: ../contrib/debuginfo-install/pk-debuginfo-install.c:624
#, c-format
msgid "Found %i enabled and %i disabled sources."
msgstr "%i à°à±à°¤à°¨à°ªà°°à°à°¿à°¨ మరియౠ%i à°
à°à±à°¤à°¨à°ªà°°à°à°¿à°¨ à°®à±à°²à°®à±à°²à°¨à± à°à°¨à±à°à±à°¨à±à°¨à°¦à°¿."
#. TRANSLATORS: we're finding repositories that match out pattern
-#: ../contrib/debuginfo-install/pk-debuginfo-install.c:614
+#: ../contrib/debuginfo-install/pk-debuginfo-install.c:631
#, c-format
msgid "Finding debugging sources"
msgstr "à°¡à±à°¬à°à±à°à°¿à°à°à± à°®à±à°²à°®à±à°²à°¨à± à°à°¨à±à°à±à°¨à±à°à±à°¨à±à°¨à°¦à°¿"
#. TRANSLATORS: tell the user what we found
-#: ../contrib/debuginfo-install/pk-debuginfo-install.c:647
+#: ../contrib/debuginfo-install/pk-debuginfo-install.c:664
#, c-format
msgid "Found %i disabled debuginfo repos."
msgstr "%i à°
à°à±à°¤à°¨à°ªà°°à°à°¿à°¨ à°¡à±à°¬à°à±âసమాà°à°¾à°° à°°à±à°ªà±à°²à°¨à± à°à°¨à±à°à±à°¨à±à°¨à°¦à°¿."
#. TRANSLATORS: we're now enabling all the debug sources we found
-#: ../contrib/debuginfo-install/pk-debuginfo-install.c:654
+#: ../contrib/debuginfo-install/pk-debuginfo-install.c:671
#, c-format
msgid "Enabling debugging sources"
msgstr "à°¡à±à°¬à°à±à°à°¿à°à°à± à°®à±à°²à°®à±à°²à°¨à± à°à±à°¤à°¨à°ªà°°à°à±à°à±à°¨à±à°¨à°¦à°¿"
#. TRANSLATORS: tell the user how many we enabled
-#: ../contrib/debuginfo-install/pk-debuginfo-install.c:682
+#: ../contrib/debuginfo-install/pk-debuginfo-install.c:699
#, c-format
msgid "Enabled %i debugging sources."
msgstr "%i à°¡à±à°¬à°à±à°à°¿à°à°à± à°®à±à°²à°®à±à°²à°¨à± à°à±à°¤à°¨à°ªà°°à°à°¿à°¨à°¦à°¿."
#. TRANSLATORS: we're now finding packages that match in all the repos
-#: ../contrib/debuginfo-install/pk-debuginfo-install.c:689
+#: ../contrib/debuginfo-install/pk-debuginfo-install.c:706
#, c-format
msgid "Finding debugging packages"
msgstr "à°¡à±à°¬à°à±à°à°¿à°à°à± à°¸à°à°à°²à°¨à°®à±à°²à°¨à± à°à°¨à±à°à±à°¨à±à°à±à°¨à±à°¨à°¦à°¿"
#. TRANSLATORS: we couldn't find the package name, non-fatal
-#: ../contrib/debuginfo-install/pk-debuginfo-install.c:701
+#: ../contrib/debuginfo-install/pk-debuginfo-install.c:718
#, c-format
msgid "Failed to find the package %s: %s"
msgstr "à°¸à°à°à°²à°¨à°®à± %s à°à°¨à±à°à±à°¨à±à°à°²à± విఫలమà±à°à°¦à°¿: %s"
#. TRANSLATORS: we couldn't find the debuginfo package name, non-fatal
-#: ../contrib/debuginfo-install/pk-debuginfo-install.c:724
+#: ../contrib/debuginfo-install/pk-debuginfo-install.c:741
#, c-format
msgid "Failed to find the debuginfo package %s: %s"
msgstr "à°¡à°¿à°¬à°à±âసమాà°à°¾à°°à° à°¸à°à°à°²à°¨à°®à± %s à°à°¨à±à°à±à°¨à±à°à°²à± విఫలమà±à°à°¦à°¿: %s"
#. TRANSLATORS: no debuginfo packages could be found to be installed
-#: ../contrib/debuginfo-install/pk-debuginfo-install.c:752
+#: ../contrib/debuginfo-install/pk-debuginfo-install.c:769
#, c-format
msgid "Found no packages to install."
msgstr "à°¸à°à°¸à±à°¥à°¾à°ªà°¿à°à°à±à°à°à± à° à°¸à°à°à°²à°¨à°®à±à°²à± à°à°¨à°¬à°¡à°²à±à°¦à±."
#. TRANSLATORS: tell the user we found some packages, and then list them
-#: ../contrib/debuginfo-install/pk-debuginfo-install.c:766
+#: ../contrib/debuginfo-install/pk-debuginfo-install.c:783
#, c-format
msgid "Found %i packages:"
msgstr "%i à°¸à°à°à°²à°¨à°®à±à°²à± à°à°¨à°¬à°¡à°¿à°¨à°µà°¿:"
#. TRANSLATORS: tell the user we are searching for deps
-#: ../contrib/debuginfo-install/pk-debuginfo-install.c:782
+#: ../contrib/debuginfo-install/pk-debuginfo-install.c:799
#, c-format
msgid "Finding packages that depend on these packages"
msgstr "à° à°¸à°à°à°²à°¨à°®à±à°²à°ªà± à°à°§à°¾à°°à°ªà°¡à°¿à°¨ à°¸à°à°à°²à°¨à°®à±à°²à°¨à± à°à°¨à±à°à±à°¨à±à°à±à°¨à±à°¨à°¦à°¿"
#. TRANSLATORS: could not install, detailed error follows
-#: ../contrib/debuginfo-install/pk-debuginfo-install.c:795
+#: ../contrib/debuginfo-install/pk-debuginfo-install.c:812
#, c-format
msgid "Could not find dependant packages: %s"
msgstr "à°à°§à°¾à°° à°¸à°à°à°²à°¨à°®à±à°²à°¨à± à°à°¨à±à°à±à°¨à°²à±à° à°ªà±à°¯à°¿à°à°¦à°¿: %s"
#. TRANSLATORS: tell the user we found some more packages
-#: ../contrib/debuginfo-install/pk-debuginfo-install.c:811
+#: ../contrib/debuginfo-install/pk-debuginfo-install.c:828
#, c-format
msgid "Found %i extra packages."
msgstr "%i à°
దనపౠపà±à°¯à°¾à°à±à°à±à°²à°¨à± à°à°¨à±à°à±à°¨à±à°¨à°¦à°¿."
#. TRANSLATORS: tell the user we found some more packages
-#: ../contrib/debuginfo-install/pk-debuginfo-install.c:815
+#: ../contrib/debuginfo-install/pk-debuginfo-install.c:832
#, c-format
msgid "No extra packages required."
msgstr "à° à°
దనపౠసà°à°à°²à°¨à°®à±à°²à± à°
వసరమà±à°²à±à°¦à±."
#. TRANSLATORS: tell the user we found some packages (and deps), and then list them
-#: ../contrib/debuginfo-install/pk-debuginfo-install.c:824
+#: ../contrib/debuginfo-install/pk-debuginfo-install.c:841
#, c-format
msgid "Found %i packages to install:"
msgstr "à°¸à°à°¸à±à°¥à°¾à°ªà°¿à°à°à±à°à°à± %i à°¸à°à°à°²à°¨à°®à±à°²à°¨à± à°à°¨à±à°à±à°¨à±à°¨à°¦à°¿:"
#. TRANSLATORS: simulate mode is a testing mode where we quit before the action
-#: ../contrib/debuginfo-install/pk-debuginfo-install.c:837
+#: ../contrib/debuginfo-install/pk-debuginfo-install.c:854
#, c-format
msgid "Not installing packages in simulate mode"
msgstr "à°à±à°°à°®à°¿à°à°ªà± à°°à±à°¤à°¿à°²à± à°¸à°à°à°²à°¨à°®à±à°²à°¨à± à°¸à°à°¸à±à°¥à°¾à°ªà°¿à°à°à±à°à°²à±à°¦à±"
#. TRANSLATORS: we are now installing the debuginfo packages we found earlier
#. TRANSLATORS: transaction state, installing packages
-#: ../contrib/debuginfo-install/pk-debuginfo-install.c:849
-#: ../lib/packagekit-glib2/pk-console-shared.c:270
+#: ../contrib/debuginfo-install/pk-debuginfo-install.c:866
+#: ../lib/packagekit-glib2/pk-console-shared.c:282
#, c-format
msgid "Installing packages"
msgstr "à°¸à°à°à°²à°¨à°¾à°²à°¨à± à°¸à°à°¸à±à°¥à°¾à°ªà°¿à°à°à±à°à±à°¨à±à°¨à°¦à°¿"
#. TRANSLATORS: could not install, detailed error follows
-#: ../contrib/debuginfo-install/pk-debuginfo-install.c:862
+#: ../contrib/debuginfo-install/pk-debuginfo-install.c:879
#, c-format
msgid "Could not install packages: %s"
msgstr "à°¸à°à°à°²à°¨à°®à±à°²à°¨à± à°¸à°à°¸à±à°¥à°¾à°ªà°¿à°à°à°²à±à° à°ªà±à°¯à°¿à°à°¦à°¿: %s"
#. TRANSLATORS: we are now disabling all debuginfo repos we previously enabled
-#: ../contrib/debuginfo-install/pk-debuginfo-install.c:894
+#: ../contrib/debuginfo-install/pk-debuginfo-install.c:911
#, c-format
msgid "Disabling sources previously enabled"
msgstr "à°à°¤à°à°²à± à°à±à°¤à°¨à°ªà°°à°à°¿à°¨ à°®à±à°²à°®à±à°²à°¨à± à°
à°à±à°¤à°¨à°ªà°°à°à±à°à±à°¨à±à°¨à°¦à°¿"
#. TRANSLATORS: no debuginfo packages could be found to be installed, detailed error follows
-#: ../contrib/debuginfo-install/pk-debuginfo-install.c:906
+#: ../contrib/debuginfo-install/pk-debuginfo-install.c:923
#, c-format
msgid "Could not disable the debugging sources: %s"
msgstr "à°¡à±à°¬à°à±à°à°¿à°à°à± à°®à±à°²à°®à±à°²à°¨à± à°
à°à±à°¤à°¨à°ªà°°à°à°²à±à° à°ªà±à°¯à°¿à°à°¦à°¿: %s"
#. TRANSLATORS: we disabled all the debugging repos that we enabled before
-#: ../contrib/debuginfo-install/pk-debuginfo-install.c:921
+#: ../contrib/debuginfo-install/pk-debuginfo-install.c:938
#, c-format
msgid "Disabled %i debugging sources."
msgstr "à°
à°à±à°¤à°¨à°ªà°°à°à°¿à°¨ %i à°¡à±à°¬à°à±à°à°¿à°à°à± à°®à±à°²à°®à±à°²à±."
@@ -1037,604 +1054,604 @@ msgstr "PackageKit à°¸à°à°à°²à°¨à°®à± à°à°¾à°¬à°¿à°¤à°¾"
msgid "PackageKit Service Pack"
msgstr "PackageKit à°¸à±à°µà°¾ పాà°à±"
-#: ../lib/packagekit-glib2/pk-console-shared.c:55
+#: ../lib/packagekit-glib2/pk-console-shared.c:59
#, c-format
msgid "Please enter a number from 1 to %i: "
msgstr "దయà°à±à°¸à°¿ à°¸à°à°à±à°¯à°¨à± 1 à°¨à±à°à°¡à°¿ %ià°à± à°ªà±à°°à°µà±à°¶à°ªà±à°à±à°à±à°®à±: "
#. TRANSLATORS: more than one package could be found that matched, to follow is a list of possible packages
-#: ../lib/packagekit-glib2/pk-console-shared.c:177
+#: ../lib/packagekit-glib2/pk-console-shared.c:183
msgid "More than one package matches:"
msgstr "à°à°à°à°¿à°à°¨à±à°¨à°¾ à°¯à±à°à±à°à±à°µ à°¸à°à°à°²à°¨à°®à± సరితà±à°à°¿à°¨à°¦à°¿:"
#. TRANSLATORS: This finds out which package in the list to use
-#: ../lib/packagekit-glib2/pk-console-shared.c:186
+#: ../lib/packagekit-glib2/pk-console-shared.c:196
msgid "Please choose the correct package: "
msgstr "దయà°à±à°¸à°¿ సరà±à°¨ à°¸à°à°à°²à°¨à°®à±à°¨à± à°¯à±à°à°à±à°à±à°¨à±à°®à±: "
#. TRANSLATORS: This is when the transaction status is not known
-#: ../lib/packagekit-glib2/pk-console-shared.c:238
+#: ../lib/packagekit-glib2/pk-console-shared.c:250
msgid "Unknown state"
msgstr "à°¤à±à°²à°¿à°¯à°¨à°¿ à°¸à±à°¥à°¿à°¤à°¿"
#. TRANSLATORS: transaction state, the daemon is in the process of starting
-#: ../lib/packagekit-glib2/pk-console-shared.c:242
+#: ../lib/packagekit-glib2/pk-console-shared.c:254
msgid "Starting"
msgstr "à°ªà±à°°à°¾à°°à°à°à°¿à°à°à±à°à±à°¨à±à°¨à°¦à°¿"
#. TRANSLATORS: transaction state, the transaction is waiting for another to complete
-#: ../lib/packagekit-glib2/pk-console-shared.c:246
+#: ../lib/packagekit-glib2/pk-console-shared.c:258
msgid "Waiting in queue"
msgstr "à°à±à°¯à±à°¨à°à°¦à± à°µà±à°à°¿à°µà±à°à°¦à°¿"
#. TRANSLATORS: transaction state, just started
-#: ../lib/packagekit-glib2/pk-console-shared.c:250
+#: ../lib/packagekit-glib2/pk-console-shared.c:262
msgid "Running"
msgstr "నడà±à°¸à±à°¤à±à°¨à±à°¨à°¦à°¿"
#. TRANSLATORS: transaction state, is querying data
-#: ../lib/packagekit-glib2/pk-console-shared.c:254
+#: ../lib/packagekit-glib2/pk-console-shared.c:266
msgid "Querying"
msgstr "à°à±à°µà°°à±à°à±à°¸à±à°¤à±à°¨à±à°¨à°¦à°¿"
#. TRANSLATORS: transaction state, getting data from a server
-#: ../lib/packagekit-glib2/pk-console-shared.c:258
+#: ../lib/packagekit-glib2/pk-console-shared.c:270
msgid "Getting information"
msgstr "సమాà°à°¾à°°à°®à±à°¨à± à°ªà±à°à°¦à±à°à±à°¨à±à°¨à°¦à°¿"
#. TRANSLATORS: transaction state, removing packages
-#: ../lib/packagekit-glib2/pk-console-shared.c:262
+#: ../lib/packagekit-glib2/pk-console-shared.c:274
msgid "Removing packages"
msgstr "à°ªà±à°¯à°¾à°à±à°à±à°²à°¨à± à°¤à±à°¸à°¿à°µà±à°¯à±à°à±à°¨à±à°¨à°¦à°¿"
#. TRANSLATORS: transaction state, downloading package files
#. TRANSLATORS: The role of the transaction, in present tense
-#: ../lib/packagekit-glib2/pk-console-shared.c:266
-#: ../lib/packagekit-glib2/pk-console-shared.c:644
+#: ../lib/packagekit-glib2/pk-console-shared.c:278
+#: ../lib/packagekit-glib2/pk-console-shared.c:656
msgid "Downloading packages"
msgstr "à°¸à°à°à°²à°¨à°¾à°²à°¨à± à°¡à±à°¨à±à°²à±à°¡à± à°à±à°¯à±à°à±à°¨à±à°¨à°¦à°¿"
#. TRANSLATORS: transaction state, refreshing internal lists
-#: ../lib/packagekit-glib2/pk-console-shared.c:274
+#: ../lib/packagekit-glib2/pk-console-shared.c:286
msgid "Refreshing software list"
msgstr "సాఫà±à°à±à°µà±à°°à± à°à°¾à°¬à°¿à°¤à°¾à°¨à± తాà°à°¾à°ªà°°à±à°à±à°à±à°¨à±à°¨à°¦à°¿"
#. TRANSLATORS: transaction state, installing updates
-#: ../lib/packagekit-glib2/pk-console-shared.c:278
+#: ../lib/packagekit-glib2/pk-console-shared.c:290
msgid "Installing updates"
msgstr "నవà±à°à°°à°£à°²à°¨à± à°¸à°à°¸à±à°¥à°¾à°ªà°¿à°à°à±à°à±à°¨à±à°¨à°¦à°¿"
#. TRANSLATORS: transaction state, removing old packages, and cleaning config files
-#: ../lib/packagekit-glib2/pk-console-shared.c:282
+#: ../lib/packagekit-glib2/pk-console-shared.c:294
msgid "Cleaning up packages"
msgstr "à°¸à°à°à°²à°¨à°¾à°²à°¨à± à°¶à±à°à±à°°à°ªà°°à°à±à°à±à°¨à±à°¨à°¦à°¿ à°à±à°¯à±à°à±à°¨à±à°¨à°¦à°¿"
#. TRANSLATORS: transaction state, obsoleting old packages
-#: ../lib/packagekit-glib2/pk-console-shared.c:286
+#: ../lib/packagekit-glib2/pk-console-shared.c:298
msgid "Obsoleting packages"
msgstr "à°¸à°à°à°²à°¨à°¾à°²à°¨à± à°¤à±à°¸à°¿à°µà±à°¯à±à°à±à°¨à±à°¨à°¦à°¿"
#. TRANSLATORS: transaction state, checking the transaction before we do it
-#: ../lib/packagekit-glib2/pk-console-shared.c:290
+#: ../lib/packagekit-glib2/pk-console-shared.c:302
msgid "Resolving dependencies"
msgstr "à°à°§à°¾à°°à°¾à°²à°¨à± పరిషà±à°à°°à°¿à°à°à±à°à±à°¨à±à°¨à°¦à°¿"
#. TRANSLATORS: transaction state, checking if we have all the security keys for the operation
-#: ../lib/packagekit-glib2/pk-console-shared.c:294
+#: ../lib/packagekit-glib2/pk-console-shared.c:306
msgid "Checking signatures"
msgstr "à°¸à°à°¤à°à°¾à°²à°¨à± పరిశà±à°²à°¿à°à°à±à°à±à°¨à±à°¨à°¦à°¿"
#. TRANSLATORS: transaction state, when we return to a previous system state
#. TRANSLATORS: The role of the transaction, in present tense
-#: ../lib/packagekit-glib2/pk-console-shared.c:298
-#: ../lib/packagekit-glib2/pk-console-shared.c:604
+#: ../lib/packagekit-glib2/pk-console-shared.c:310
+#: ../lib/packagekit-glib2/pk-console-shared.c:616
msgid "Rolling back"
msgstr "à°µà±à°¨à±à°à°à± à°¤à±à°à±à°à±à°à±à°¨à±à°¨à°¦à°¿"
#. TRANSLATORS: transaction state, when we're doing a test transaction
-#: ../lib/packagekit-glib2/pk-console-shared.c:302
+#: ../lib/packagekit-glib2/pk-console-shared.c:314
msgid "Testing changes"
msgstr "మారà±à°ªà±à°²à°¨à± పరిశà±à°²à°¿à°à°à±à°à±à°¨à±à°¨à°¦à°¿"
#. TRANSLATORS: transaction state, when we're writing to the system package database
-#: ../lib/packagekit-glib2/pk-console-shared.c:306
+#: ../lib/packagekit-glib2/pk-console-shared.c:318
msgid "Committing changes"
msgstr "మారà±à°ªà±à°²à°¨à± à°
à°ªà±à°ªà°à°¿à°à°à±à°¤à±à°à°¦à°¿"
#. TRANSLATORS: transaction state, requesting data from a server
-#: ../lib/packagekit-glib2/pk-console-shared.c:310
+#: ../lib/packagekit-glib2/pk-console-shared.c:322
msgid "Requesting data"
msgstr "à°¡à°¾à°à°¾à°¨à± à°
à°à±à°¯à°°à±à°§à°¿à°à°à±à°à±à°¨à±à°¨à°¦à°¿"
#. TRANSLATORS: transaction state, all done!
-#: ../lib/packagekit-glib2/pk-console-shared.c:314
+#: ../lib/packagekit-glib2/pk-console-shared.c:326
msgid "Finished"
msgstr "à°ªà±à°°à±à°¤à±à°¨à°¦à°¿"
#. TRANSLATORS: transaction state, in the process of cancelling
-#: ../lib/packagekit-glib2/pk-console-shared.c:318
+#: ../lib/packagekit-glib2/pk-console-shared.c:330
msgid "Cancelling"
msgstr "à°°à°¦à±à°¦à±à°à±à°¯à±à°à±à°¨à±à°¨à°¦à°¿"
#. TRANSLATORS: transaction state, downloading metadata
-#: ../lib/packagekit-glib2/pk-console-shared.c:322
+#: ../lib/packagekit-glib2/pk-console-shared.c:334
msgid "Downloading repository information"
msgstr "à°°à°¿à°ªà±à°à°¿à°à°°à± సమాà°à°¾à°°à°®à±à°¨à± à°¡à±à°¨à±à°²à±à°¡à±à°à±à°¯à±à°à±à°¨à±à°¨à°¦à°¿"
#. TRANSLATORS: transaction state, downloading metadata
-#: ../lib/packagekit-glib2/pk-console-shared.c:326
+#: ../lib/packagekit-glib2/pk-console-shared.c:338
msgid "Downloading list of packages"
msgstr "à°¸à°à°à°²à°¨à°¾à°² à°à°¾à°¬à°¿à°¤à°¾à°¨à± à°¡à±à°¨à±à°²à±à°¡à±à°à±à°¸à±à°¤à±à°à°¦à°¿"
#. TRANSLATORS: transaction state, downloading metadata
-#: ../lib/packagekit-glib2/pk-console-shared.c:330
+#: ../lib/packagekit-glib2/pk-console-shared.c:342
msgid "Downloading file lists"
msgstr "దసà±à°¤à±à°°à°®à±à°² à°à°¾à°¬à°¿à°¤à°¾à°¨à± à°¡à±à°¨à±à°²à±à°¡à±à°à±à°¯à±à°à±à°¨à±à°¨à°¦à°¿"
#. TRANSLATORS: transaction state, downloading metadata
-#: ../lib/packagekit-glib2/pk-console-shared.c:334
+#: ../lib/packagekit-glib2/pk-console-shared.c:346
msgid "Downloading lists of changes"
msgstr "మారà±à°ªà±à°² à°à°¾à°¬à°¿à°¤à°¾à°¨à± à°¡à±à°¨à±à°²à±à°¡à±à°à±à°¯à±à°à±à°¨à±à°¨à°¦à°¿"
#. TRANSLATORS: transaction state, downloading metadata
-#: ../lib/packagekit-glib2/pk-console-shared.c:338
+#: ../lib/packagekit-glib2/pk-console-shared.c:350
msgid "Downloading groups"
msgstr "సమà±à°¹à°¾à°²à°¨à± à°¡à±à°¨à±à°²à±à°¡à± à°à±à°¯à±à°à±à°¨à±à°¨à°¦à°¿"
#. TRANSLATORS: transaction state, downloading metadata
-#: ../lib/packagekit-glib2/pk-console-shared.c:342
+#: ../lib/packagekit-glib2/pk-console-shared.c:354
msgid "Downloading update information"
msgstr "నవà±à°à°°à°£ సమాà°à°¾à°°à°®à±à°¨à± à°¡à±à°¨à±à°²à±à°¡à±à°à±à°¸à±à°¤à±à°¨à±à°¨à°¦à°¿"
#. TRANSLATORS: transaction state, repackaging delta files
-#: ../lib/packagekit-glib2/pk-console-shared.c:346
+#: ../lib/packagekit-glib2/pk-console-shared.c:358
msgid "Repackaging files"
msgstr "దసà±à°¤à±à°°à°®à±à°²à± à°ªà±à°¨à°à°¸à°à°à°²à°¨à°®à± à°à±à°¯à±à°à±à°¨à±à°¨à°¦à°¿"
#. TRANSLATORS: transaction state, loading databases
-#: ../lib/packagekit-glib2/pk-console-shared.c:350
+#: ../lib/packagekit-glib2/pk-console-shared.c:362
msgid "Loading cache"
msgstr "à°à±à°¯à°¾à°à±à°¨à± à°²à±à°¡à±à°à±à°¯à±à°à±à°¨à±à°¨à°¦à°¿"
#. TRANSLATORS: transaction state, scanning for running processes
-#: ../lib/packagekit-glib2/pk-console-shared.c:354
+#: ../lib/packagekit-glib2/pk-console-shared.c:366
msgid "Scanning applications"
msgstr "à°
à°¨à±à°µà°°à±à°¤à°¨à°®à±à°²à°¨à± à°¸à±à°à°¾à°¨à±à°à±à°¯à±à°à±à°¨à±à°¨à°¦à°¿"
#. TRANSLATORS: transaction state, generating a list of packages installed on the system
-#: ../lib/packagekit-glib2/pk-console-shared.c:358
+#: ../lib/packagekit-glib2/pk-console-shared.c:370
msgid "Generating package lists"
msgstr "à°¸à°à°à°²à°¨ à°à°¾à°¬à°¿à°¤à°¾à°²à°¨à± à°à°¨à°¿à°¯à°¿à°à°ªà°à±à°¯à±à°à±à°¨à±à°¨à°¦à°¿"
#. TRANSLATORS: transaction state, when we're waiting for the native tools to exit
-#: ../lib/packagekit-glib2/pk-console-shared.c:362
+#: ../lib/packagekit-glib2/pk-console-shared.c:374
msgid "Waiting for package manager lock"
msgstr "à°¸à°à°à°²à°¨ నిరà±à°µà°¾à°¹à°¿à° లాà°à± à°à±à°°à°à± à°µà±à°à°¿à°µà±à°à°¦à°¿"
#. TRANSLATORS: transaction state, waiting for user to type in a password
-#: ../lib/packagekit-glib2/pk-console-shared.c:366
+#: ../lib/packagekit-glib2/pk-console-shared.c:378
msgid "Waiting for authentication"
msgstr "à°¦à±à°µà±à°à°°à°£à°®à± à°à±à°°à°à± à°µà±à°à°¿à°µà±à°à°¦à°¿"
#. TRANSLATORS: transaction state, we are updating the list of processes
-#: ../lib/packagekit-glib2/pk-console-shared.c:370
+#: ../lib/packagekit-glib2/pk-console-shared.c:382
msgid "Updating running applications"
msgstr "నడà±à°¸à±à°¤à±à°¨à±à°¨ à°
à°¨à±à°µà°°à±à°¤à°¨à°®à±à°²à°¨à± నవà±à°à°°à°¿à°à°à±à°à±à°¨à±à°¨à°¦à°¿"
#. TRANSLATORS: transaction state, we are checking executable files currently in use
-#: ../lib/packagekit-glib2/pk-console-shared.c:374
+#: ../lib/packagekit-glib2/pk-console-shared.c:386
msgid "Checking applications in use"
msgstr "à°à°ªà°¯à±à°à°à°²à±à°µà±à°¨à±à°¨ à°
à°¨à±à°µà°°à±à°¤à°¨à°®à±à°²à°¨à± పరిశà±à°²à°¿à°à°à±à°à±à°¨à±à°¨à°¦à°¿"
#. TRANSLATORS: transaction state, we are checking for libraries currently in use
-#: ../lib/packagekit-glib2/pk-console-shared.c:378
+#: ../lib/packagekit-glib2/pk-console-shared.c:390
msgid "Checking libraries in use"
msgstr "à°à°ªà°¯à±à°à°à°²à± à°µà±à°¨à±à°¨ à°²à±à°¬à±à°°à°°à±à°²à°¨à± పరిశà±à°²à°¿à°à°à±à°à±à°¨à±à°¨à°¦à°¿"
#. TRANSLATORS: transaction state, we are copying package files before or after the transaction
-#: ../lib/packagekit-glib2/pk-console-shared.c:382
+#: ../lib/packagekit-glib2/pk-console-shared.c:394
msgid "Copying files"
msgstr "దసà±à°¤à±à°°à°®à±à°²à°¨à± à°¨à°à°²à±à°¤à±à°¯à±à°à±à°¨à±à°¨à°¦à°¿"
#. TRANSLATORS: The type of update
-#: ../lib/packagekit-glib2/pk-console-shared.c:400
+#: ../lib/packagekit-glib2/pk-console-shared.c:412
msgid "Trivial"
msgstr "à°à±à°²à°¿à°·à±à°à°®à±à°¨"
#. TRANSLATORS: The type of update
-#: ../lib/packagekit-glib2/pk-console-shared.c:404
+#: ../lib/packagekit-glib2/pk-console-shared.c:416
msgid "Normal"
msgstr "సాధారణ"
#. TRANSLATORS: The type of update
-#: ../lib/packagekit-glib2/pk-console-shared.c:408
+#: ../lib/packagekit-glib2/pk-console-shared.c:420
msgid "Important"
msgstr "à°®à±à°à±à°¯à°®à±à°¨"
#. TRANSLATORS: The type of update
-#: ../lib/packagekit-glib2/pk-console-shared.c:412
+#: ../lib/packagekit-glib2/pk-console-shared.c:424
msgid "Security"
msgstr "à°°à°à±à°·à°£"
#. TRANSLATORS: The type of update
-#: ../lib/packagekit-glib2/pk-console-shared.c:416
+#: ../lib/packagekit-glib2/pk-console-shared.c:428
msgid "Bug fix "
msgstr "à°¬à°à± పరిషà±à°à°¾à°°à°®à±"
#. TRANSLATORS: The type of update
-#: ../lib/packagekit-glib2/pk-console-shared.c:420
+#: ../lib/packagekit-glib2/pk-console-shared.c:432
msgid "Enhancement"
msgstr "à°µà±à°¦à±à°¦à°¿à°
à°µà±à°¤à±"
#. TRANSLATORS: The type of update
-#: ../lib/packagekit-glib2/pk-console-shared.c:424
+#: ../lib/packagekit-glib2/pk-console-shared.c:436
msgid "Blocked"
msgstr "à°¬à±à°²à°¾à°à±âà°¡à±"
#. TRANSLATORS: The state of a package
#. TRANSLATORS: The action of the package, in past tense
-#: ../lib/packagekit-glib2/pk-console-shared.c:429
-#: ../lib/packagekit-glib2/pk-console-shared.c:502
+#: ../lib/packagekit-glib2/pk-console-shared.c:441
+#: ../lib/packagekit-glib2/pk-console-shared.c:514
msgid "Installed"
msgstr "à°¸à°à°¸à±à°¥à°¾à°ªà°¿à°à°à°¿à°¨"
#. TRANSLATORS: The state of a package, i.e. not installed
-#: ../lib/packagekit-glib2/pk-console-shared.c:434
+#: ../lib/packagekit-glib2/pk-console-shared.c:446
msgid "Available"
msgstr "à°
à°à°¦à±à°¬à°¾à°à±à°²à±à°µà±à°à°¦à°¿"
#. TRANSLATORS: The action of the package, in present tense
-#: ../lib/packagekit-glib2/pk-console-shared.c:452
+#: ../lib/packagekit-glib2/pk-console-shared.c:464
msgid "Downloading"
msgstr "à°¡à±à°¨à±à°²à±à°¡à± à°à±à°¯à±à°à±à°¨à±à°¨à°¦à°¿"
#. TRANSLATORS: The action of the package, in present tense
-#: ../lib/packagekit-glib2/pk-console-shared.c:456
+#: ../lib/packagekit-glib2/pk-console-shared.c:468
msgid "Updating"
msgstr "నవà±à°à°°à°¿à°à°à±à°à±à°¨à±à°¨à°¦à°¿"
#. TRANSLATORS: The action of the package, in present tense
#. TRANSLATORS: The role of the transaction, in present tense
-#: ../lib/packagekit-glib2/pk-console-shared.c:460
-#: ../lib/packagekit-glib2/pk-console-shared.c:580
+#: ../lib/packagekit-glib2/pk-console-shared.c:472
+#: ../lib/packagekit-glib2/pk-console-shared.c:592
msgid "Installing"
msgstr "à°¸à°à°¸à±à°¥à°¾à°ªà°¿à°à°à±à°à±à°¨à±à°¨à°¦à°¿"
#. TRANSLATORS: The action of the package, in present tense
#. TRANSLATORS: The role of the transaction, in present tense
-#: ../lib/packagekit-glib2/pk-console-shared.c:464
-#: ../lib/packagekit-glib2/pk-console-shared.c:576
+#: ../lib/packagekit-glib2/pk-console-shared.c:476
+#: ../lib/packagekit-glib2/pk-console-shared.c:588
msgid "Removing"
msgstr "à°¤à±à°¸à°¿à°µà±à°¯à±à°à±à°¨à±à°¨à°¦à°¿"
#. TRANSLATORS: The action of the package, in present tense
-#: ../lib/packagekit-glib2/pk-console-shared.c:468
+#: ../lib/packagekit-glib2/pk-console-shared.c:480
msgid "Cleaning up"
msgstr "à°¶à±à°à±à°°à°ªà°°à°à±à°à±à°¨à±à°¨à°¦à°¿"
#. TRANSLATORS: The action of the package, in present tense
-#: ../lib/packagekit-glib2/pk-console-shared.c:472
+#: ../lib/packagekit-glib2/pk-console-shared.c:484
msgid "Obsoleting"
msgstr "à°¤à±à°²à°à°¿à°à°à±à°à±à°¨à±à°¨à°¦à°¿"
#. TRANSLATORS: The action of the package, in present tense
-#: ../lib/packagekit-glib2/pk-console-shared.c:476
+#: ../lib/packagekit-glib2/pk-console-shared.c:488
msgid "Reinstalling"
msgstr "తిరిà°à°¿à°¸à°à°¸à±à°¥à°¾à°ªà°¿à°à°à±à°à±à°¨à±à°¨à°¦à°¿"
#. TRANSLATORS: The action of the package, in past tense
-#: ../lib/packagekit-glib2/pk-console-shared.c:494
+#: ../lib/packagekit-glib2/pk-console-shared.c:506
msgid "Downloaded"
msgstr "à°¡à±à°¨à±à°²à±à°¡à± à°à±à°¸à°¿à°¨"
#. TRANSLATORS: The action of the package, in past tense
-#: ../lib/packagekit-glib2/pk-console-shared.c:506
+#: ../lib/packagekit-glib2/pk-console-shared.c:518
msgid "Removed"
msgstr "à°¤à±à°²à°à°¿à°à°à°¿à°¨"
#. TRANSLATORS: The action of the package, in past tense
-#: ../lib/packagekit-glib2/pk-console-shared.c:510
+#: ../lib/packagekit-glib2/pk-console-shared.c:522
msgid "Cleaned up"
msgstr "à°¶à±à°à±à°°à°ªà°°à°à°¿à°¨"
#. TRANSLATORS: The action of the package, in past tense
-#: ../lib/packagekit-glib2/pk-console-shared.c:514
+#: ../lib/packagekit-glib2/pk-console-shared.c:526
msgid "Obsoleted"
msgstr "à°¤à±à°²à°à°¿à°à°à°¿à°¨"
#. TRANSLATORS: The action of the package, in past tense
-#: ../lib/packagekit-glib2/pk-console-shared.c:518
+#: ../lib/packagekit-glib2/pk-console-shared.c:530
msgid "Reinstalled"
msgstr "తిరిà°à°¿à°¸à°à°¸à±à°¥à°¾à°ªà°¿à°à°à°¿à°¨"
#. TRANSLATORS: The role of the transaction, in present tense
-#: ../lib/packagekit-glib2/pk-console-shared.c:536
+#: ../lib/packagekit-glib2/pk-console-shared.c:548
msgid "Unknown role type"
msgstr "à°¤à±à°²à°¿à°¯à°¨à°¿ పాతà±à°°à°°à°à°®à±"
#. TRANSLATORS: The role of the transaction, in present tense
-#: ../lib/packagekit-glib2/pk-console-shared.c:540
+#: ../lib/packagekit-glib2/pk-console-shared.c:552
msgid "Getting dependencies"
msgstr "à°à°§à°¾à°°à°¾à°²à°¨à± à°ªà±à°à°¦à±à°à±à°¨à±à°¨à°¦à°¿"
#. TRANSLATORS: The role of the transaction, in present tense
-#: ../lib/packagekit-glib2/pk-console-shared.c:544
+#: ../lib/packagekit-glib2/pk-console-shared.c:556
msgid "Getting update details"
msgstr "నవà±à°à°°à°£ వివరమà±à°²à°¨à± à°ªà±à°à°¦à±à°à±à°¨à±à°¨à°¦à°¿"
#. TRANSLATORS: The role of the transaction, in present tense
-#: ../lib/packagekit-glib2/pk-console-shared.c:548
+#: ../lib/packagekit-glib2/pk-console-shared.c:560
msgid "Getting details"
msgstr "వివరాలనౠపà±à°à°¦à±à°à±à°¨à±à°¨à°¦à°¿"
#. TRANSLATORS: The role of the transaction, in present tense
-#: ../lib/packagekit-glib2/pk-console-shared.c:552
+#: ../lib/packagekit-glib2/pk-console-shared.c:564
msgid "Getting requires"
msgstr "à°à°¾à°µà°²à°¿à°¸à°¿à°¨à°µà°¿ à°ªà±à°à°¦à±à°à±à°¨à±à°¨à°¦à°¿"
#. TRANSLATORS: The role of the transaction, in present tense
-#: ../lib/packagekit-glib2/pk-console-shared.c:556
+#: ../lib/packagekit-glib2/pk-console-shared.c:568
msgid "Getting updates"
msgstr "నవà±à°à°°à°£à°²à°¨à± à°ªà±à°à°¦à±à°à±à°¨à±à°¨à°¦à°¿"
#. TRANSLATORS: The role of the transaction, in present tense
-#: ../lib/packagekit-glib2/pk-console-shared.c:560
+#: ../lib/packagekit-glib2/pk-console-shared.c:572
msgid "Searching by details"
msgstr "వివరమà±à°² à°ªà±à°°à°à°¾à°°à° à°¶à±à°§à°¿à°à°à±à°à±à°¨à±à°¨à°¦à°¿"
#. TRANSLATORS: The role of the transaction, in present tense
-#: ../lib/packagekit-glib2/pk-console-shared.c:564
+#: ../lib/packagekit-glib2/pk-console-shared.c:576
msgid "Searching by file"
msgstr "దసà±à°¤à±à°°à°®à± à°ªà±à°°à°à°¾à°°à° à°¶à±à°§à°¿à°à°à±à°à±à°¨à±à°¨à°¦à°¿"
#. TRANSLATORS: The role of the transaction, in present tense
-#: ../lib/packagekit-glib2/pk-console-shared.c:568
+#: ../lib/packagekit-glib2/pk-console-shared.c:580
msgid "Searching groups"
msgstr "సమà±à°¹à°¾à°² à°ªà±à°°à°¾à°à°°à° à°¶à±à°§à°¿à°à°à±à°à±à°¨à±à°¨à°¦à°¿"
#. TRANSLATORS: The role of the transaction, in present tense
-#: ../lib/packagekit-glib2/pk-console-shared.c:572
+#: ../lib/packagekit-glib2/pk-console-shared.c:584
msgid "Searching by name"
msgstr "నామమౠపà±à°°à°à°¾à°°à° à°¶à±à°§à°¿à°à°à±à°à±à°¨à±à°¨à°¦à°¿"
#. TRANSLATORS: The role of the transaction, in present tense
-#: ../lib/packagekit-glib2/pk-console-shared.c:584
+#: ../lib/packagekit-glib2/pk-console-shared.c:596
msgid "Installing files"
msgstr "దసà±à°¤à±à°°à°®à±à°²à°¨à± à°¸à°à°¸à±à°¥à°¾à°ªà°¿à°à°à±à°à±à°¨à±à°¨à°¦à°¿"
#. TRANSLATORS: The role of the transaction, in present tense
-#: ../lib/packagekit-glib2/pk-console-shared.c:588
+#: ../lib/packagekit-glib2/pk-console-shared.c:600
msgid "Refreshing cache"
msgstr "à°à±à°¯à°¾à°à±à°¨à± తాà°à°¾à°ªà°°à±à°¸à±à°¤à±à°à°¦à°¿"
#. TRANSLATORS: The role of the transaction, in present tense
-#: ../lib/packagekit-glib2/pk-console-shared.c:592
+#: ../lib/packagekit-glib2/pk-console-shared.c:604
msgid "Updating packages"
msgstr "à°¸à°à°à°²à°¨à°¾à°²à°¨à± నవà±à°à°°à°¿à°¸à±à°¤à±à°à°¦à°¿"
#. TRANSLATORS: The role of the transaction, in present tense
-#: ../lib/packagekit-glib2/pk-console-shared.c:596
+#: ../lib/packagekit-glib2/pk-console-shared.c:608
msgid "Updating system"
msgstr "సిసà±à°à°®à±âనౠనవà±à°à°°à°¿à°à°à±à°à±à°¨à±à°¨à°¦à°¿"
#. TRANSLATORS: The role of the transaction, in present tense
-#: ../lib/packagekit-glib2/pk-console-shared.c:600
+#: ../lib/packagekit-glib2/pk-console-shared.c:612
msgid "Canceling"
msgstr "à°°à°¦à±à°¦à±à°à±à°¯à±à°à±à°¨à±à°¨à°¦à°¿"
#. TRANSLATORS: The role of the transaction, in present tense
-#: ../lib/packagekit-glib2/pk-console-shared.c:608
+#: ../lib/packagekit-glib2/pk-console-shared.c:620
msgid "Getting repositories"
msgstr "à°°à±à°ªà±à°à°¿à°à°°à±à°²à°¨à± à°ªà±à°à°¦à±à°à±à°¨à±à°¨à°¦à°¿"
#. TRANSLATORS: The role of the transaction, in present tense
-#: ../lib/packagekit-glib2/pk-console-shared.c:612
+#: ../lib/packagekit-glib2/pk-console-shared.c:624
msgid "Enabling repository"
msgstr "à°°à°¿à°ªà±à°à°¿à°à°°à± à°à±à°¤à°¨à°®à±à°à±à°¯à±à°à±à°¨à±à°¨à°¦à°¿"
#. TRANSLATORS: The role of the transaction, in present tense
-#: ../lib/packagekit-glib2/pk-console-shared.c:616
+#: ../lib/packagekit-glib2/pk-console-shared.c:628
msgid "Setting data"
msgstr "à°¡à°¾à°à°¾à°¨à± à°
మరà±à°à±à°à±à°¨à±à°¨à°¦à°¿"
#. TRANSLATORS: The role of the transaction, in present tense
-#: ../lib/packagekit-glib2/pk-console-shared.c:620
+#: ../lib/packagekit-glib2/pk-console-shared.c:632
msgid "Resolving"
msgstr "పరిషà±à°à°°à°¿à°à°à±à°à±à°¨à±à°¨à°¦à°¿"
#. TRANSLATORS: The role of the transaction, in present tense
-#: ../lib/packagekit-glib2/pk-console-shared.c:624
+#: ../lib/packagekit-glib2/pk-console-shared.c:636
msgid "Getting file list"
msgstr "దసà±à°¤à±à°°à°®à± à°à°¾à°¬à°¿à°¤à°¾à°¨à± à°ªà±à°à°¦à±à°à±à°¨à±à°¨à°¦à°¿"
#. TRANSLATORS: The role of the transaction, in present tense
-#: ../lib/packagekit-glib2/pk-console-shared.c:628
+#: ../lib/packagekit-glib2/pk-console-shared.c:640
msgid "Getting provides"
msgstr "à°à°¤à±à°ªà°¾à°¦à°à°¾à°²à°¨à± à°ªà±à°à°¦à±à°à±à°¨à±à°¨à°¦à°¿"
#. TRANSLATORS: The role of the transaction, in present tense
-#: ../lib/packagekit-glib2/pk-console-shared.c:632
+#: ../lib/packagekit-glib2/pk-console-shared.c:644
msgid "Installing signature"
msgstr "à°¸à°à°¤à°à°®à±à°¨à± à°¸à°à°¸à±à°¥à°¾à°ªà°¿à°à°à±à°à±à°¨à±à°¨à°¦à°¿"
#. TRANSLATORS: The role of the transaction, in present tense
-#: ../lib/packagekit-glib2/pk-console-shared.c:636
+#: ../lib/packagekit-glib2/pk-console-shared.c:648
msgid "Getting packages"
msgstr "à°¸à°à°à°²à°¨à°¾à°²à°¨à± à°ªà±à°à°¦à±à°à±à°¨à±à°¨à°¦à°¿"
#. TRANSLATORS: The role of the transaction, in present tense
-#: ../lib/packagekit-glib2/pk-console-shared.c:640
+#: ../lib/packagekit-glib2/pk-console-shared.c:652
msgid "Accepting EULA"
msgstr "EULA à°à°®à±à°¦à°¿à°à°à±à°à±à°¨à±à°¨à°¦à°¿"
#. TRANSLATORS: The role of the transaction, in present tense
-#: ../lib/packagekit-glib2/pk-console-shared.c:648
+#: ../lib/packagekit-glib2/pk-console-shared.c:660
msgid "Getting upgrades"
msgstr "నవà±à°à°°à°£à°²à± à°ªà±à°à°¦à±à°à±à°¨à±à°¨à°¦à°¿"
#. TRANSLATORS: The role of the transaction, in present tense
-#: ../lib/packagekit-glib2/pk-console-shared.c:652
+#: ../lib/packagekit-glib2/pk-console-shared.c:664
msgid "Getting categories"
msgstr "వరà±à°à°®à±à°²à°¨à± à°ªà±à°à°¦à±à°à±à°¨à±à°¨à°¦à°¿"
#. TRANSLATORS: The role of the transaction, in present tense
-#: ../lib/packagekit-glib2/pk-console-shared.c:656
+#: ../lib/packagekit-glib2/pk-console-shared.c:668
msgid "Getting transactions"
msgstr "బదిలà±à°à°°à°£à°²à°¨à± à°ªà±à°à°¦à±à°à±à°¨à±à°¨à°¦à°¿"
#. TRANSLATORS: The role of the transaction, in present tense
-#: ../lib/packagekit-glib2/pk-console-shared.c:660
-#: ../lib/packagekit-glib2/pk-console-shared.c:664
+#: ../lib/packagekit-glib2/pk-console-shared.c:672
+#: ../lib/packagekit-glib2/pk-console-shared.c:676
msgid "Simulating install"
msgstr "à°¸à°à°¸à±à°¥à°¾à°ªà°¨à°¨à± సిమà±à°¯à±à°²à±à°à± à°à±à°¯à±à°à±à°¨à±à°¨à°¦à°¿"
#. TRANSLATORS: The role of the transaction, in present tense
-#: ../lib/packagekit-glib2/pk-console-shared.c:668
+#: ../lib/packagekit-glib2/pk-console-shared.c:680
msgid "Simulating remove"
msgstr "à°¤à±à°²à°à°¿à°à°ªà±à°¨à± సిమà±à°¯à±à°²à±à°à± à°à±à°¯à±à°à±à°¨à±à°¨à°¦à°¿"
#. TRANSLATORS: The role of the transaction, in present tense
-#: ../lib/packagekit-glib2/pk-console-shared.c:672
+#: ../lib/packagekit-glib2/pk-console-shared.c:684
msgid "Simulating update"
msgstr "నవà±à°à°°à°£à°¨à± సిమà±à°¯à±à°²à±à°à± à°à±à°¯à±à°à±à°¨à±à°¨à°¦à°¿"
#. TRANSLATORS: ask the user if they are comfortable installing insecure packages
-#: ../lib/packagekit-glib2/pk-task-text.c:64
+#: ../lib/packagekit-glib2/pk-task-text.c:69
msgid "Do you want to allow installing of unsigned software?"
msgstr "à°¸à°à°¤à°à°®à±à°à±à°¯à°¨à°¿ సాఫà±à°à±à°µà±à°°à± à°¸à°à°¸à±à°¥à°¾à°ªà°¨à°¨à± à°®à±à°°à± à°
à°¨à±à°®à°¤à°¿à°à°à°¾à°²à°¨à°¿ à°
à°¨à±à°à±à°¨à±à°à±à°¨à±à°¨à°¾à°°à°¾?"
#. TRANSLATORS: tell the user we've not done anything
-#: ../lib/packagekit-glib2/pk-task-text.c:69
+#: ../lib/packagekit-glib2/pk-task-text.c:74
msgid "The unsigned software will not be installed."
msgstr "à°¸à°à°¤à°à°®à± à°à±à°¯à°¨à°¿ సాఫà±à°à±à°µà±à°°à± à°¸à°à°¸à±à°¥à°¾à°ªà°¿à°à°à°¬à°¡à°¦à±."
#. TRANSLATORS: the package repository is signed by a key that is not recognised
-#: ../lib/packagekit-glib2/pk-task-text.c:102
+#: ../lib/packagekit-glib2/pk-task-text.c:123
msgid "Software source signature required"
msgstr "సాఫà±à°à±à°µà±à°°à± à°®à±à°²à°®à±à°¯à±à°à±à° à°¸à°à°¤à°à°®à± à°
వసరమà±"
#. TRANSLATORS: the package repository name
-#: ../lib/packagekit-glib2/pk-task-text.c:108
+#: ../lib/packagekit-glib2/pk-task-text.c:129
msgid "Software source name"
msgstr "సాఫà±à°à±à°µà±à°°à± à°®à±à°²à°ªà± నామమà±"
#. TRANSLATORS: the key URL
-#: ../lib/packagekit-glib2/pk-task-text.c:111
+#: ../lib/packagekit-glib2/pk-task-text.c:132
msgid "Key URL"
msgstr "à°à± URL"
#. TRANSLATORS: the username of the key
-#: ../lib/packagekit-glib2/pk-task-text.c:114
+#: ../lib/packagekit-glib2/pk-task-text.c:135
msgid "Key user"
msgstr "à°à± వినియà±à°à°¦à°¾à°°à°¿"
#. TRANSLATORS: the key ID, usually a few hex digits
-#: ../lib/packagekit-glib2/pk-task-text.c:117
+#: ../lib/packagekit-glib2/pk-task-text.c:138
msgid "Key ID"
msgstr "à°à± ID"
#. TRANSLATORS: the key fingerprint, again, yet more hex
-#: ../lib/packagekit-glib2/pk-task-text.c:120
+#: ../lib/packagekit-glib2/pk-task-text.c:141
msgid "Key fingerprint"
msgstr "à°à± à°µà±à°²à°¿à°®à±à°¦à±à°°"
#. TRANSLATORS: the timestamp (a bit like a machine readable time)
-#: ../lib/packagekit-glib2/pk-task-text.c:123
+#: ../lib/packagekit-glib2/pk-task-text.c:144
msgid "Key Timestamp"
msgstr "à°à± à°à±à°®à±âà°¸à±à°à°¾à°à°ªà±"
#. TRANSLATORS: ask the user if they want to import
-#: ../lib/packagekit-glib2/pk-task-text.c:129
+#: ../lib/packagekit-glib2/pk-task-text.c:157
msgid "Do you accept this signature?"
msgstr "à°®à±à°°à± à° à°¸à°à°¤à°à°®à±à°¨à± à°à°®à±à°¦à°¿à°¸à±à°¤à°¾à°°à°¾?"
#. TRANSLATORS: tell the user we've not done anything
-#: ../lib/packagekit-glib2/pk-task-text.c:134
+#: ../lib/packagekit-glib2/pk-task-text.c:162
msgid "The signature was not accepted."
msgstr "à°¸à°à°¤à°à°®à± à°à°®à±à°¦à°¿à°à°à°¬à°¡à°²à±à°¦à±."
#. TRANSLATORS: this is another name for a software licence that has to be read before installing
-#: ../lib/packagekit-glib2/pk-task-text.c:169
+#: ../lib/packagekit-glib2/pk-task-text.c:205
msgid "End user licence agreement required"
msgstr "à°
à°à°¤à°¿à°® వినియà±à°à°¦à°¾à°°à°¿ à°²à±à°¸à±à°¨à±à°¸à± à°µà±à°ªà±à°ªà°à°¦à°®à± à°
వసరమà±à°à°¦à°¿"
#. TRANSLATORS: the EULA text itself (long and boring)
-#: ../lib/packagekit-glib2/pk-task-text.c:178
+#: ../lib/packagekit-glib2/pk-task-text.c:214
msgid "Agreement"
msgstr "à°à°ªà±à°ªà°à°¦à°®à±"
#. TRANSLATORS: ask the user if they've read and accepted the EULA
-#: ../lib/packagekit-glib2/pk-task-text.c:184
+#: ../lib/packagekit-glib2/pk-task-text.c:223
msgid "Do you accept this agreement?"
msgstr "à°®à±à°°à± à° à°µà±à°ªà±à°ªà°à°¦à°®à±à°¨à± à°à°®à±à°¦à°¿à°¸à±à°¤à°¾à°°à°¾?"
#. TRANSLATORS: tell the user we've not done anything
-#: ../lib/packagekit-glib2/pk-task-text.c:189
+#: ../lib/packagekit-glib2/pk-task-text.c:228
msgid "The agreement was not accepted."
msgstr "à°à°ªà±à°ªà°à°¦à°®à± à°à°®à±à°¦à°¿à°à°à°¬à°¡à°¦à±."
#. TRANSLATORS: the user needs to change media inserted into the computer
-#: ../lib/packagekit-glib2/pk-task-text.c:219
+#: ../lib/packagekit-glib2/pk-task-text.c:267
msgid "Media change required"
msgstr "మాధà±à°¯à°®à° మారà±à°ªà± à°
వసరమà±à°à°¦à°¿"
#. TRANSLATORS: the type, e.g. DVD, CD, etc
-#: ../lib/packagekit-glib2/pk-task-text.c:222
+#: ../lib/packagekit-glib2/pk-task-text.c:270
msgid "Media type"
msgstr "మాధà±à°¯à°®à° à°°à°à°®à±"
#. TRANSLATORS: the media label, usually like 'disk-1of3'
-#: ../lib/packagekit-glib2/pk-task-text.c:225
+#: ../lib/packagekit-glib2/pk-task-text.c:273
msgid "Media label"
msgstr "మాధà±à°¯à°®à° à°²à±à°¬à±à°²à±"
#. TRANSLATORS: the media description, usually like 'Fedora 12 disk 5'
-#: ../lib/packagekit-glib2/pk-task-text.c:228
+#: ../lib/packagekit-glib2/pk-task-text.c:276
msgid "Text"
msgstr "పాఠà±à°¯à°®à±"
#. TRANSLATORS: ask the user to insert the media
-#: ../lib/packagekit-glib2/pk-task-text.c:232
+#: ../lib/packagekit-glib2/pk-task-text.c:282
msgid "Please insert the correct media"
msgstr "దయà°à±à°¸à°¿ సరà±à°¨ మాధà±à°¯à°®à°¾à°¨à±à°¨à°¿ à°à±à°°à±à°à±à°®à±"
#. TRANSLATORS: tell the user we've not done anything as they are lazy
-#: ../lib/packagekit-glib2/pk-task-text.c:237
+#: ../lib/packagekit-glib2/pk-task-text.c:287
msgid "The correct media was not inserted."
msgstr "సరà±à°¨ మాధà±à°¯à°®à° à°à±à°°à±à°à°¬à°¡à°²à±à°¦à±."
#. TRANSLATORS: When processing, we might have to remove other dependencies
-#: ../lib/packagekit-glib2/pk-task-text.c:252
+#: ../lib/packagekit-glib2/pk-task-text.c:302
msgid "The following packages have to be removed:"
msgstr "à° à°à±à°°à°¿à°à°¦à°¿ à°¸à°à°à°²à°¨à°®à±à°²à± à°¤à±à°¸à°¿à°µà±à°¯à°¬à°¡à°¾à°²à°¿:"
#. TRANSLATORS: When processing, we might have to install other dependencies
-#: ../lib/packagekit-glib2/pk-task-text.c:257
+#: ../lib/packagekit-glib2/pk-task-text.c:307
msgid "The following packages have to be installed:"
msgstr "à° à°à±à°°à°¿à°à°¦à°¿ à°ªà±à°¯à°¾à°à±à°à±à°²à± à°¸à°à°¸à±à°¥à°¾à°ªà°¿à°à°à°¬à°¡à°¿à°¨à°µà°¿:"
#. TRANSLATORS: When processing, we might have to update other dependencies
-#: ../lib/packagekit-glib2/pk-task-text.c:262
+#: ../lib/packagekit-glib2/pk-task-text.c:312
msgid "The following packages have to be updated:"
msgstr "à° à°à±à°°à°¿à°à°¦à°¿ à°¸à°à°à°²à°¨à°®à±à°²à± నవà±à°à°°à°¿à°à°à°µà°²à°¸à°¿à°µà±à°à°¦à°¿:"
#. TRANSLATORS: When processing, we might have to reinstall other dependencies
-#: ../lib/packagekit-glib2/pk-task-text.c:267
+#: ../lib/packagekit-glib2/pk-task-text.c:317
msgid "The following packages have to be reinstalled:"
msgstr "à° à°à±à°°à°¿à°à°¦à°¿ à°¸à°à°à°²à°¨à°®à±à°²à± తిరిà°à°¿à°¸à°à°¸à±à°¥à°¾à°ªà°¿à°à°à°µà°²à°¸à°¿ à°µà±à°à°¦à°¿:"
#. TRANSLATORS: When processing, we might have to downgrade other dependencies
-#: ../lib/packagekit-glib2/pk-task-text.c:272
+#: ../lib/packagekit-glib2/pk-task-text.c:322
msgid "The following packages have to be downgraded:"
msgstr "à° à°à±à°°à°¿à°à°¦à°¿ à°¸à°à°à°²à°¨à°®à±à°²à± à°¡à±à°¨à±âà°à±à°°à±à°¡à± à°à±à°¯à°µà°²à°¸à°¿à°µà±à°à°¦à°¿:"
#. TRANSLATORS: ask the user if the proposed changes are okay
-#: ../lib/packagekit-glib2/pk-task-text.c:331
+#: ../lib/packagekit-glib2/pk-task-text.c:382
msgid "Proceed with changes?"
msgstr "మారà±à°ªà±à°²à°¤à± à°®à±à°à°¦à±à°à±à°ªà±à°µà°¾à°²à°¾?"
#. TRANSLATORS: tell the user we didn't do anything
-#: ../lib/packagekit-glib2/pk-task-text.c:336
+#: ../lib/packagekit-glib2/pk-task-text.c:387
msgid "The transaction did not proceed."
msgstr "బదిలà±à°à°°à°£ à°®à±à°à°¦à±à°à±à°¸à°¾à°à°²à±à°¦à±."
commit 3ec084a99f9dfcc34d113cea84d7d67d1fd39591
Author: Sebastian Heinlein <devel at glatzor.de>
Date: Thu Nov 12 08:37:31 2009 +0100
APT: Add missing datetime import
diff --git a/backends/apt/aptBackend.py b/backends/apt/aptBackend.py
index a357a52..a5e0ce5 100755
--- a/backends/apt/aptBackend.py
+++ b/backends/apt/aptBackend.py
@@ -17,6 +17,7 @@ the Free Software Foundation; either version 2 of the License, or
__author__ = "Sebastian Heinlein <devel at glatzor.de>"
+import datetime
import errno
import fcntl
import gdbm
commit fe1a10469dd908d6bdad0a33c43fc93d73613898
Author: Sebastian Heinlein <devel at glatzor.de>
Date: Thu Nov 12 06:57:51 2009 +0100
APT: Emit the INFO_DOWNGRADING for currently downgrading packages in the
install progress
diff --git a/backends/apt/aptBackend.py b/backends/apt/aptBackend.py
index abae39c..a357a52 100755
--- a/backends/apt/aptBackend.py
+++ b/backends/apt/aptBackend.py
@@ -405,13 +405,14 @@ class PackageKitInstallProgress(apt.progress.InstallProgress):
# Emit a Package signal for the currently processed package
if pkg_name != self.last_pkg and self._backend._cache.has_key(pkg_name):
pkg = self._backend._cache[pkg_name]
- # FIXME: We need an INFO enum for downgrades/rollbacks
- if pkg.markedInstall or pkg.markedReinstall or pkg.markedDowngrade:
+ if pkg.markedInstall or pkg.markedReinstall:
self._backend._emit_package(pkg, INFO_INSTALLING, True)
elif pkg.markedDelete:
self._backend._emit_package(pkg, INFO_REMOVING, False)
elif pkg.markedUpgrade:
self._backend._emit_package(pkg, INFO_UPDATING, True)
+ elif pkg.markedDowngrade:
+ self._backend._emit_package(pkg, INFO_DOWNGRADING, True)
self.last_pkg = pkg_name
pklog.debug("APT status: %s" % status)
commit 0d1db13dbbfdb651577aaa7b153d3fe202fe30f4
Author: Sebastian Heinlein <devel at glatzor.de>
Date: Thu Nov 12 06:55:52 2009 +0100
APT: Send the INFO_FINISHED status for downloaded packages
diff --git a/backends/apt/aptBackend.py b/backends/apt/aptBackend.py
index 66c4554..abae39c 100755
--- a/backends/apt/aptBackend.py
+++ b/backends/apt/aptBackend.py
@@ -321,8 +321,8 @@ class PackageKitFetchProgress(apt.progress.FetchProgress):
self.pstart = prange[0]
self.pend = prange[1]
self.pprev = None
- self.last_pkg = None
self.status = status
+ self.package_states = {}
def pulse(self):
apt.progress.FetchProgress.pulse(self)
@@ -336,14 +336,22 @@ class PackageKitFetchProgress(apt.progress.FetchProgress):
self.pprev = progress
return True
- def updateStatus(self, uri, descr, shortDescr, status):
+ def updateStatus(self, uri, descr, pkg_name, status):
"""Callback for a fetcher status update."""
# Emit a Package signal for the currently processed package
- if shortDescr != self.last_pkg and \
- self._backend._cache.has_key(shortDescr):
- self._backend._emit_package(self._backend._cache[shortDescr],
- INFO_DOWNLOADING, True)
- self.last_pkg = shortDescr
+ try:
+ pkg = self._backend._cache[pkg_name]
+ except KeyError:
+ pass
+ else:
+ if not pkg_name in self.package_states or \
+ self.package_states[pkg_name] != status:
+ if status == 0:
+ info = INFO_FINISHED
+ else:
+ info = INFO_DOWNLOADING
+ self.package_states[pkg_name] = status
+ self._backend._emit_package(pkg, info, True)
def start(self):
self._backend.status(self.status)
@@ -1281,6 +1289,7 @@ class PackageKitAptBackend(PackageKitBaseBackend):
else:
self.files(id, os.path.join(dest,
os.path.basename(ver.filename)))
+ self._emit_pkg_version(ver, INFO_FINISHED)
self.percentage(100)
@lock_cache
commit 8e466a3a2894c36f9f41f92a1ee32cf763199414
Author: Sebastian Heinlein <devel at glatzor.de>
Date: Thu Nov 12 06:37:43 2009 +0100
APT: Send the currently downloaded package in the download_package
method
diff --git a/backends/apt/aptBackend.py b/backends/apt/aptBackend.py
index 0f5a6ef..66c4554 100755
--- a/backends/apt/aptBackend.py
+++ b/backends/apt/aptBackend.py
@@ -1273,6 +1273,7 @@ class PackageKitAptBackend(PackageKitBaseBackend):
# Start the download
for id, ver, start, end in get_download_details(ids):
progress = PackageKitFetchProgress(self, prange=(start, end))
+ self._emit_pkg_version(ver, INFO_DOWNLOADING)
try:
ver.fetch_binary(dest, progress)
except Exception, error:
commit e45661f1adcfaa80feb84488729e7b0353c5dbb8
Author: Sebastian Heinlein <devel at glatzor.de>
Date: Thu Nov 12 06:34:40 2009 +0100
APT: Refractor download_packages and emit the files signal for
downloaded packages
diff --git a/backends/apt/aptBackend.py b/backends/apt/aptBackend.py
index 7496674..0f5a6ef 100755
--- a/backends/apt/aptBackend.py
+++ b/backends/apt/aptBackend.py
@@ -1240,15 +1240,25 @@ class PackageKitAptBackend(PackageKitBaseBackend):
"""
Implement the {backend}-download-packages functionality
"""
- def get_range(versions, total):
- """
- Calculate the start and end point of a package download progress.
+ def get_download_details(ids):
+ """Calculate the start and end point of a package download
+ progress.
"""
+ total = 0
downloaded = 0
- for ver in versions:
+ versions = []
+ # Check if all ids are vaild and calculate the total download size
+ for id in ids:
+ pkg_ver = self._get_pkg_version_by_id(id)
+ if not pkg_ver.downloadable:
+ self.error(ERROR_PACKAGE_DOWNLOAD_FAILED,
+ "package %s isn't downloadable" % id)
+ total += pkg_ver.size
+ versions.append((id, pkg_ver))
+ for id, ver in versions:
start = downloaded * 100 / total
end = start + ver.size * 100 / total
- yield ver, start, end
+ yield id, ver, start, end
downloaded += ver.size
pklog.info("Downloading packages: %s" % ids)
self.status(STATUS_DOWNLOAD)
@@ -1260,26 +1270,16 @@ class PackageKitAptBackend(PackageKitBaseBackend):
"The directory '%s' is not writable" % dest)
# Setup the fetcher
self._check_init(prange=(0,10))
- versions = []
- total = 0
- # Check if all ids are vaild and calculate the total download size
- for id in ids:
- pkg_ver = self._get_pkg_version_by_id(id)
- if pkg_ver is None:
- self.error(ERROR_PACKAGE_NOT_FOUND,
- "There is no package %s" % id)
- if not pkg_ver.downloadable:
- self.error(ERROR_PACKAGE_DOWNLOAD_FAILED,
- "package %s isn't downloadable" % id)
- total += pkg_ver.size
- versions.append(pkg_ver)
# Start the download
- for ver, start, end in get_range(versions, total):
+ for id, ver, start, end in get_download_details(ids):
progress = PackageKitFetchProgress(self, prange=(start, end))
try:
ver.fetch_binary(dest, progress)
except Exception, error:
self.error(ERROR_PACKAGE_DOWNLOAD_FAILED, error.message)
+ else:
+ self.files(id, os.path.join(dest,
+ os.path.basename(ver.filename)))
self.percentage(100)
@lock_cache
commit c81979d935bcbe2b5b22f2de74e4b0bafdbebc13
Author: Sebastian Heinlein <devel at glatzor.de>
Date: Thu Nov 12 06:13:27 2009 +0100
APT: Separate the apt.package.Version/package id converter into its own
method
diff --git a/backends/apt/aptBackend.py b/backends/apt/aptBackend.py
index 1afccdb..7496674 100755
--- a/backends/apt/aptBackend.py
+++ b/backends/apt/aptBackend.py
@@ -1780,6 +1780,16 @@ class PackageKitAptBackend(PackageKitBaseBackend):
return True
return False
+ def _get_id_from_version(self, version):
+ """Return the package id of an apt.package.Version instance."""
+ if version.origins:
+ origin = version.origins[0].label
+ else:
+ origin = ""
+ id = "%s;%s;%s;%s" % (version.package.name, version.version,
+ version.architecture, origin)
+ return id
+
def _check_init(self, prange=(0,10), progress=True):
"""
Check if the backend was initialized well and try to recover from
@@ -1820,12 +1830,7 @@ class PackageKitAptBackend(PackageKitBaseBackend):
def _emit_pkg_version(self, version, info=None):
"""Emit the Package signal of the given apt.package.Version."""
- if version.origins:
- origin = version.origins[0].label
- else:
- origin = ""
- id = "%s;%s;%s;%s" % (version.package.name, version.version,
- version.architecture, origin)
+ id = self._get_id_from_version(version)
section = version.section.split("/")[-1]
if not info:
if version == version.package.installed:
commit 8cb7ca05efa9fe96246865d9db532fbce08fb961
Merge: b85e37a... 71857f0...
Author: Daniel Nicoletti <dantti85-pk at yahoo.com.br>
Date: Wed Nov 11 13:04:50 2009 -0200
Merge branch 'master' of git+ssh://git.packagekit.org/srv/git/PackageKit
commit b85e37aa3c0e2af6187dee441dd25761f08252d4
Author: Daniel Nicoletti <dantti85-pk at yahoo.com.br>
Date: Wed Nov 11 13:04:21 2009 -0200
Fixed python session example
diff --git a/docs/html/pk-faq.html b/docs/html/pk-faq.html
index 9874d4c..9faaa72 100644
--- a/docs/html/pk-faq.html
+++ b/docs/html/pk-faq.html
@@ -355,7 +355,7 @@ except dbus.DBusException, e:
try:
proxy = bus.get_object('org.freedesktop.PackageKit', '/org/freedesktop/PackageKit')
iface = dbus.Interface(proxy, 'org.freedesktop.PackageKit.Modify')
- iface.InstallPackageNames(0, ["openoffice-clipart", "openoffice-clipart-extras"], "show-confirm-search,hide-finished")
+ iface.InstallPackageNames(dbus.UInt32(0), ["openoffice-clipart", "openoffice-clipart-extras"], "show-confirm-search,hide-finished")
except dbus.DBusException, e:
print 'Unable to use PackageKit: %s' % str(e)
</pre>
commit 71857f0dc251d28504871961bb3399480adc435c
Author: Sebastian Heinlein <devel at glatzor.de>
Date: Wed Nov 11 10:31:31 2009 +0100
APT: Allow to set the status of the PackgeKitFetchProgress. Make use of
this to show STATUS_DOWNLOAD_REPOSITORY during a refresh
diff --git a/backends/apt/aptBackend.py b/backends/apt/aptBackend.py
index 51db4af..1afccdb 100755
--- a/backends/apt/aptBackend.py
+++ b/backends/apt/aptBackend.py
@@ -315,13 +315,14 @@ class PackageKitFetchProgress(apt.progress.FetchProgress):
"""
Handle the package download process
"""
- def __init__(self, backend, prange=(0,100)):
+ def __init__(self, backend, prange=(0,100), status=STATUS_DOWNLOAD):
self._backend = backend
apt.progress.FetchProgress.__init__(self)
self.pstart = prange[0]
self.pend = prange[1]
self.pprev = None
self.last_pkg = None
+ self.status = status
def pulse(self):
apt.progress.FetchProgress.pulse(self)
@@ -345,7 +346,7 @@ class PackageKitFetchProgress(apt.progress.FetchProgress):
self.last_pkg = shortDescr
def start(self):
- self._backend.status(STATUS_DOWNLOAD)
+ self._backend.status(self.status)
self._backend.allow_cancel(True)
def stop(self):
@@ -1436,7 +1437,8 @@ class PackageKitAptBackend(PackageKitBaseBackend):
self.allow_cancel(False);
self.percentage(0)
self._check_init((0,10))
- progress = PackageKitFetchProgress(self, prange=(10,95))
+ progress = PackageKitFetchProgress(self, prange=(10,95),
+ status=STATUS_DOWNLOAD_REPOSITORY)
try:
ret = self._cache.update(progress)
except Exception, error:
commit ef74644cae06f5ea1ac4f0efb9afc268e6ce5168
Merge: e0882e3... 78a591b...
Author: Sebastian Heinlein <devel at glatzor.de>
Date: Wed Nov 11 10:18:53 2009 +0100
Merge branch 'master' of git+ssh://git.packagekit.org/srv/git/PackageKit
commit e0882e31d2e9775c9f9c68ec4a075d248b0c81d8
Author: Sebastian Heinlein <devel at glatzor.de>
Date: Wed Nov 11 10:16:18 2009 +0100
APT: Use markdown for the changelog and update_text of UpdateDetail.
update_text skips some information from the changelog. Furthermore fix
the cve und bugzilla URLs. Extract issued and updated from the
changelog. Add a very basic and hard coded support for restart.
diff --git a/backends/apt/aptBackend.py b/backends/apt/aptBackend.py
index c689f1b..51db4af 100755
--- a/backends/apt/aptBackend.py
+++ b/backends/apt/aptBackend.py
@@ -156,7 +156,13 @@ HREF_CVE="http://web.nvd.nist.gov/view/vuln/detail?vulnId=%s"
try:
locale.setlocale(locale.LC_ALL, "")
except locale.Error:
- pklog.debug("Failed to unset locale")
+ pklog.debug("Failed to unset LC_ALL")
+
+# Required to parse RFC822 time stamps
+try:
+ locale.setlocale(locale.LC_TIME, "C")
+except locale.Error:
+ pklog.debug("Failed to unset LC_TIME")
def lock_cache(func):
"""Lock the system package cache before excuting the decorated function and
@@ -804,17 +810,51 @@ class PackageKitAptBackend(PackageKitBaseBackend):
state = ""
issued = ""
updated = ""
- changelog = pkg.getChangelog()
+ #FIXME: make this more configurable. E.g. a dbus update requires
+ # a reboot on Ubuntu but not on Debian
+ if pkg.name.startswith("linux-image-") or \
+ pkg.name in ["libc6", "dbus"]:
+ restart == RESTART_SYSTEM
+ changelog_raw = pkg.getChangelog()
# The internal download error string of python-apt ist not
# provided as unicode object
try:
- changelog = changelog.decode(DEFAULT_ENCODING)
+ changelog_raw = changelog_raw.decode(DEFAULT_ENCODING)
except:
pass
- bugzilla_url = ";".join(get_bug_urls(changelog))
- cve_url = ";".join(get_cve_urls(changelog))
+ # Convert the changelog to markdown syntax
+ changelog = ""
+ for line in changelog_raw.split("\n"):
+ if line == "":
+ changelog += "\n\n\n\n"
+ else:
+ changelog += "`%s` \n\n" % line
+ if line.startswith(pkg.candidate.source_name):
+ source, version, dist, urgency = \
+ re.match(r"(.+) \((.*)\) (.+); urgency=(.+)",
+ line).groups()
+ update_text += "# %s #\n\n \n\n" % version
+ elif line.startswith(" "):
+ update_text += "`%s`\n\n" % line[2:]
+ elif line.startswith(" --"):
+ #FIXME: Add %z for the time zone - requires Python 2.6
+ maint, mail, date_raw, offset = \
+ re.match("^ -- (.+) (<.+>) (.+) ([-\+][0-9]+)$",
+ line).groups()
+ date = datetime.datetime.strptime(date_raw,
+ "%a, %d %b %Y %H:%M:%S")
+
+ issued = date.isoformat()
+ if not updated:
+ updated = date.isoformat()
+ update_text += "\n\n\n\n"
+ if issued == updated:
+ updated = ""
+ bugzilla_url = ";;".join(get_bug_urls(changelog))
+ cve_url = ";;".join(get_cve_urls(changelog))
self.update_detail(pkg_id, updates, obsoletes, vendor_url,
- bugzilla_url, cve_url, restart, update_text,
+ bugzilla_url, cve_url, restart,
+ format_string(update_text),
format_string(changelog), state, issued,
updated)
commit 78a591b9942afa19f6e21ac987a70af8a9faa05b
Author: Richard Hughes <richard at hughsie.com>
Date: Tue Nov 10 20:47:25 2009 +0000
cnf: when we search for available files, use our preferred arch. Fixes rh#534169
diff --git a/contrib/command-not-found/pk-command-not-found.c b/contrib/command-not-found/pk-command-not-found.c
index ee16e43..88b7da7 100644
--- a/contrib/command-not-found/pk-command-not-found.c
+++ b/contrib/command-not-found/pk-command-not-found.c
@@ -413,7 +413,9 @@ pk_cnf_find_available (const gchar *cmd)
values[i] = g_build_filename (prefixes[i], cmd, NULL);
/* do search */
- filters = pk_bitfield_from_enums (PK_FILTER_ENUM_NOT_INSTALLED, PK_FILTER_ENUM_NEWEST, -1);
+ filters = pk_bitfield_from_enums (PK_FILTER_ENUM_NOT_INSTALLED,
+ PK_FILTER_ENUM_NEWEST,
+ PK_FILTER_ENUM_ARCH, -1);
results = pk_client_search_file (PK_CLIENT(task), filters, values, cancellable,
(PkProgressCallback) pk_cnf_progress_cb, NULL, &error);
if (results == NULL) {
commit 4e71100758412f2807bf9636b2fc4f6b6c808f75
Author: Richard Hughes <richard at hughsie.com>
Date: Tue Nov 10 17:38:41 2009 +0000
trivial: fix compile on Ubuntu
diff --git a/configure.ac b/configure.ac
index 7051417..e9b6134 100644
--- a/configure.ac
+++ b/configure.ac
@@ -628,6 +628,7 @@ AC_SUBST(security_framework, "$with_security_framework")
if test x$with_security_framework = xpolkit; then
PKG_CHECK_MODULES(POLKIT, \
+ polkit-backend-1 \
polkit-gobject-1 >= $POLKIT_GOBJECT_REQUIRED)
AC_SUBST(POLKIT_CFLAGS)
AC_SUBST(POLKIT_LIBS)
commit 1a6df8485be8b6994642f795b0a262385495923f
Author: Richard Hughes <richard at hughsie.com>
Date: Mon Nov 9 14:01:46 2009 +0000
Fix two potential issues spotted by clang
diff --git a/lib/packagekit-glib2/pk-task.c b/lib/packagekit-glib2/pk-task.c
index 4a118be..eb6b6e4 100644
--- a/lib/packagekit-glib2/pk-task.c
+++ b/lib/packagekit-glib2/pk-task.c
@@ -413,7 +413,7 @@ pk_task_install_signatures (PkTaskState *state)
GPtrArray *array;
PkRepoSignatureRequired *item;
gchar *key_id;
- gchar *package_id;
+ gchar *package_id = NULL;
PkSigTypeEnum type;
/* get results */
@@ -513,7 +513,7 @@ pk_task_accept_eulas (PkTaskState *state)
GError *error = NULL;
GPtrArray *array;
PkEulaRequired *item;
- gchar *eula_id;
+ gchar *eula_id = NULL;
/* get results */
array = pk_results_get_eula_required_array (state->results);
commit 88e852bc9ba785ffe247a9186d3d3a3d1ad452d2
Merge: 0f990c3... dfa9dd0...
Author: Richard Hughes <richard at hughsie.com>
Date: Mon Nov 9 13:34:18 2009 +0000
Merge branch 'master' into no-more-C-structures
commit dfa9dd0f1ed00a15cf5401e8c8ceef8d0c86ecc0
Author: Richard Hughes <richard at hughsie.com>
Date: Mon Nov 9 09:42:23 2009 +0000
cnf: after a successful installation, re-exec new binary not command-not-found. Fixes rh#533554
diff --git a/contrib/command-not-found/pk-command-not-found.c b/contrib/command-not-found/pk-command-not-found.c
index 4e3f4b3..de2e503 100644
--- a/contrib/command-not-found/pk-command-not-found.c
+++ b/contrib/command-not-found/pk-command-not-found.c
@@ -706,7 +706,7 @@ main (int argc, char *argv[])
/* run */
} else if (config->single_match == PK_CNF_POLICY_RUN) {
- pk_cnf_spawn_command (possible, &argv[1]);
+ pk_cnf_spawn_command (possible, &argv[2]);
/* ask */
} else if (config->single_match == PK_CNF_POLICY_ASK) {
@@ -714,7 +714,7 @@ main (int argc, char *argv[])
text = g_strdup_printf ("%s %s", _("Run similar command:"), possible);
ret = pk_console_get_prompt (text, TRUE);
if (ret)
- pk_cnf_spawn_command (possible, &argv[1]);
+ pk_cnf_spawn_command (possible, &argv[2]);
else
retval = EXIT_COMMAND_NOT_FOUND;
g_free (text);
@@ -745,7 +745,7 @@ main (int argc, char *argv[])
/* run command */
possible = g_ptr_array_index (array, i);
- pk_cnf_spawn_command (possible, &argv[1]);
+ pk_cnf_spawn_command (possible, &argv[2]);
}
goto out;
@@ -772,7 +772,7 @@ main (int argc, char *argv[])
if (ret) {
ret = pk_cnf_install_package_id (package_ids[0]);
if (ret)
- pk_cnf_spawn_command (argv[0], &argv[1]);
+ pk_cnf_spawn_command (argv[1], &argv[2]);
else
retval = EXIT_COMMAND_NOT_FOUND;
}
@@ -781,7 +781,7 @@ main (int argc, char *argv[])
} else if (config->single_install == PK_CNF_POLICY_INSTALL) {
ret = pk_cnf_install_package_id (package_ids[0]);
if (ret)
- pk_cnf_spawn_command (argv[0], &argv[1]);
+ pk_cnf_spawn_command (argv[1], &argv[2]);
else
retval = EXIT_COMMAND_NOT_FOUND;
}
@@ -814,7 +814,7 @@ main (int argc, char *argv[])
/* run command */
ret = pk_cnf_install_package_id (package_ids[i]);
if (ret)
- pk_cnf_spawn_command (argv[0], &argv[1]);
+ pk_cnf_spawn_command (argv[1], &argv[2]);
else
retval = EXIT_COMMAND_NOT_FOUND;
}
commit 12bafbe62e16dcd07f1573807629d830199a868d
Author: Richard Hughes <richard at hughsie.com>
Date: Thu Nov 5 10:34:25 2009 +0000
cnf: handle the error condition where the package name would be invalid. Fixes rh#533014
diff --git a/contrib/command-not-found/pk-command-not-found.c b/contrib/command-not-found/pk-command-not-found.c
index 3b91e15..4e3f4b3 100644
--- a/contrib/command-not-found/pk-command-not-found.c
+++ b/contrib/command-not-found/pk-command-not-found.c
@@ -752,6 +752,10 @@ main (int argc, char *argv[])
/* only search using PackageKit if configured to do so */
} else if (config->software_source_search) {
package_ids = pk_cnf_find_available (argv[1]);
+ if (package_ids == NULL) {
+ g_print ("\n");
+ goto out;
+ }
len = g_strv_length (package_ids);
if (len == 1) {
parts = pk_package_id_split (package_ids[0]);
commit 0f990c34a5e8a5831174cc108a2f3bcf32898907
Author: Richard Hughes <richard at hughsie.com>
Date: Mon Nov 9 13:23:47 2009 +0000
Ensure we use the unique package id rather than the name for the de-duplication filter dictionary. Fixes gnome#601246
diff --git a/lib/python/packagekit/filter.py b/lib/python/packagekit/filter.py
index 34f00bb..a6b312b 100644
--- a/lib/python/packagekit/filter.py
+++ b/lib/python/packagekit/filter.py
@@ -35,20 +35,20 @@ class PackagekitFilter(object, PackagekitPackage):
for pkg in pkgs:
if self.pre_process(pkg):
self.package_list.append((pkg, INFO_INSTALLED))
- name = self._pkg_get_name(pkg)
+ name = self._pkg_get_unique(pkg)
self.installed_unique[name] = pkg
def add_available(self, pkgs):
''' add a list of packages that are available '''
for pkg in pkgs:
- name = self._pkg_get_name(pkg)
+ name = self._pkg_get_unique(pkg)
if not self.installed_unique.has_key(name):
if self.pre_process(pkg):
self.package_list.append((pkg, INFO_AVAILABLE))
def add_custom(self, pkg, info):
''' add a custom packages indervidually '''
- name = self._pkg_get_name(pkg)
+ name = self._pkg_get_unique(pkg)
if not self.installed_unique.has_key(name):
if self.pre_process(pkg):
self.package_list.append((pkg, info))
commit 33bfab11ee5005c8e21d2aedb446a230de727cb6
Author: Richard Hughes <richard at hughsie.com>
Date: Mon Nov 9 13:07:52 2009 +0000
Just for packagekit-glib2, drop the 'Code' from PkError as it's a redundant suffix
diff --git a/backends/aptcc/aptcc_show_error.cpp b/backends/aptcc/aptcc_show_error.cpp
index 627410a..e9117da 100644
--- a/backends/aptcc/aptcc_show_error.cpp
+++ b/backends/aptcc/aptcc_show_error.cpp
@@ -10,7 +10,7 @@
using namespace std;
-bool show_errors(PkBackend *backend, PkErrorCodeEnum errorCode)
+bool show_errors(PkBackend *backend, PkErrorEnum errorCode)
{
stringstream errors;
diff --git a/backends/aptcc/aptcc_show_error.h b/backends/aptcc/aptcc_show_error.h
index e9049d0..09817b8 100644
--- a/backends/aptcc/aptcc_show_error.h
+++ b/backends/aptcc/aptcc_show_error.h
@@ -16,7 +16,7 @@
* Call the Packagekit error dialog
*/
bool show_errors(PkBackend *backend,
- PkErrorCodeEnum errorCode = PK_ERROR_ENUM_UNKNOWN);
+ PkErrorEnum errorCode = PK_ERROR_ENUM_UNKNOWN);
/**
* Call the Packagekit message dialog
diff --git a/backends/poldek/pk-backend-poldek.c b/backends/poldek/pk-backend-poldek.c
index 05193ca..ac84bbe 100644
--- a/backends/poldek/pk-backend-poldek.c
+++ b/backends/poldek/pk-backend-poldek.c
@@ -42,7 +42,7 @@ static gint do_get_files_to_download (const struct poldek_ts *ts, const gchar *m
static void pb_load_packages (PkBackend *backend);
static void poldek_backend_set_allow_cancel (PkBackend *backend, gboolean allow_cancel, gboolean reset);
-static void pb_error_show (PkBackend *backend, PkErrorCodeEnum errorcode);
+static void pb_error_show (PkBackend *backend, PkErrorEnum errorcode);
static void pb_error_clean (void);
static void poldek_backend_percentage_data_destroy (PkBackend *backend);
@@ -1804,14 +1804,14 @@ pb_load_packages (PkBackend *backend)
}
static void
-pb_error_show (PkBackend *backend, PkErrorCodeEnum errorcode)
+pb_error_show (PkBackend *backend, PkErrorEnum errorcode)
{
if (sigint_reached()) {
pk_backend_error_code (backend, PK_ERROR_ENUM_TRANSACTION_CANCELLED, "Action cancelled.");
return;
}
- /* Before emiting error_code try to find the most suitable PkErrorCodeEnum */
+ /* Before emiting error_code try to find the most suitable PkErrorEnum */
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)
@@ -1830,7 +1830,7 @@ pb_error_show (PkBackend *backend, PkErrorCodeEnum errorcode)
static gboolean
pb_error_check (PkBackend *backend)
{
- PkErrorCodeEnum errorcode = PK_ERROR_ENUM_UNKNOWN;
+ PkErrorEnum errorcode = PK_ERROR_ENUM_UNKNOWN;
if (g_strrstr (pberror->tslog->str, " version installed, skipped") != NULL)
errorcode = PK_ERROR_ENUM_PACKAGE_ALREADY_INSTALLED;
diff --git a/client/pk-console.c b/client/pk-console.c
index 37a9e1f..99173ef 100644
--- a/client/pk-console.c
+++ b/client/pk-console.c
@@ -619,7 +619,7 @@ pk_console_progress_cb (PkProgress *progress, PkProgressType type, gpointer data
static void
pk_console_finished_cb (GObject *object, GAsyncResult *res, gpointer data)
{
- PkErrorCode *error_code = NULL;
+ PkError *error_code = NULL;
PkResults *results;
GError *error = NULL;
GPtrArray *array;
@@ -642,7 +642,7 @@ pk_console_finished_cb (GObject *object, GAsyncResult *res, gpointer data)
error_code = pk_results_get_error_code (results);
if (error_code != NULL) {
/* TRANSLATORS: the transaction failed in a way we could not expect */
- g_print ("%s: %s, %s\n", _("The transaction failed"), pk_error_enum_to_text (pk_error_code_get_code (error_code)), pk_error_code_get_details (error_code));
+ g_print ("%s: %s, %s\n", _("The transaction failed"), pk_error_enum_to_text (pk_error_get_code (error_code)), pk_error_get_details (error_code));
goto out;
}
diff --git a/client/pk-monitor.c b/client/pk-monitor.c
index 6fd6755..8569991 100644
--- a/client/pk-monitor.c
+++ b/client/pk-monitor.c
@@ -95,7 +95,7 @@ pk_monitor_adopt_cb (PkClient *_client, GAsyncResult *res, gpointer user_data)
PkProgress *progress = NULL;
PkExitEnum exit_enum;
gchar *transaction_id = NULL;
- PkErrorCode *error_code = NULL;
+ PkError *error_code = NULL;
/* get the results */
results = pk_client_generic_finish (client, res, &error);
@@ -121,7 +121,7 @@ pk_monitor_adopt_cb (PkClient *_client, GAsyncResult *res, gpointer user_data)
/* check error code */
error_code = pk_results_get_error_code (results);
if (error_code != NULL)
- g_print ("%s\terror code: %s, %s\n", transaction_id, pk_error_enum_to_text (pk_error_code_get_code (error_code)), pk_error_code_get_details (error_code));
+ g_print ("%s\terror code: %s, %s\n", transaction_id, pk_error_enum_to_text (pk_error_get_code (error_code)), pk_error_get_details (error_code));
out:
g_free (transaction_id);
if (error_code != NULL)
diff --git a/contrib/browser-plugin/pk-plugin-install.c b/contrib/browser-plugin/pk-plugin-install.c
index 4eeaff3..c7f2423 100644
--- a/contrib/browser-plugin/pk-plugin-install.c
+++ b/contrib/browser-plugin/pk-plugin-install.c
@@ -243,7 +243,7 @@ pk_plugin_install_finished_cb (GObject *object, GAsyncResult *res, PkPluginInsta
PkPackage *item;
gchar *filename;
gchar **split = NULL;
- PkErrorCode *error_code = NULL;
+ PkError *error_code = NULL;
PkInfoEnum info;
gchar *package_id = NULL;
gchar *summary = NULL;
@@ -259,7 +259,7 @@ pk_plugin_install_finished_cb (GObject *object, GAsyncResult *res, PkPluginInsta
/* check error code */
error_code = pk_results_get_error_code (results);
if (error_code != NULL) {
- g_warning ("failed to install: %s, %s", pk_error_enum_to_text (pk_error_code_get_code (error_code)), pk_error_code_get_details (error_code));
+ g_warning ("failed to install: %s, %s", pk_error_enum_to_text (pk_error_get_code (error_code)), pk_error_get_details (error_code));
goto out;
}
diff --git a/contrib/command-not-found/pk-command-not-found.c b/contrib/command-not-found/pk-command-not-found.c
index 0ee27d1..ee16e43 100644
--- a/contrib/command-not-found/pk-command-not-found.c
+++ b/contrib/command-not-found/pk-command-not-found.c
@@ -404,7 +404,7 @@ pk_cnf_find_available (const gchar *cmd)
guint len;
PkBitfield filters;
PkResults *results = NULL;
- PkErrorCode *error_code = NULL;
+ PkError *error_code = NULL;
/* create new array of full paths */
len = g_strv_length ((gchar **)prefixes);
@@ -427,7 +427,7 @@ pk_cnf_find_available (const gchar *cmd)
error_code = pk_results_get_error_code (results);
if (error_code != NULL) {
/* TRANSLATORS: the transaction failed in a way we could not expect */
- g_print ("%s: %s, %s\n", _("The transaction failed"), pk_error_enum_to_text (pk_error_code_get_code (error_code)), pk_error_code_get_details (error_code));
+ g_print ("%s: %s, %s\n", _("The transaction failed"), pk_error_enum_to_text (pk_error_get_code (error_code)), pk_error_get_details (error_code));
goto out;
}
@@ -577,7 +577,7 @@ pk_cnf_install_package_id (const gchar *package_id)
PkResults *results = NULL;
gchar **package_ids;
gboolean ret = FALSE;
- PkErrorCode *error_code = NULL;
+ PkError *error_code = NULL;
/* do install */
package_ids = pk_package_ids_from_id (package_id);
@@ -594,7 +594,7 @@ pk_cnf_install_package_id (const gchar *package_id)
error_code = pk_results_get_error_code (results);
if (error_code != NULL) {
/* TRANSLATORS: the transaction failed in a way we could not expect */
- g_print ("%s: %s, %s\n", _("The transaction failed"), pk_error_enum_to_text (pk_error_code_get_code (error_code)), pk_error_code_get_details (error_code));
+ g_print ("%s: %s, %s\n", _("The transaction failed"), pk_error_enum_to_text (pk_error_get_code (error_code)), pk_error_get_details (error_code));
goto out;
}
diff --git a/contrib/debuginfo-install/pk-debuginfo-install.c b/contrib/debuginfo-install/pk-debuginfo-install.c
index 74e2c56..c34484d 100644
--- a/contrib/debuginfo-install/pk-debuginfo-install.c
+++ b/contrib/debuginfo-install/pk-debuginfo-install.c
@@ -123,7 +123,7 @@ pk_debuginfo_install_enable_repos (PkDebuginfoInstallPrivate *priv, GPtrArray *a
PkResults *results = NULL;
const gchar *repo_id;
GError *error_local = NULL;
- PkErrorCode *error_code = NULL;
+ PkError *error_code = NULL;
/* enable all debuginfo repos we found */
for (i=0; i<array->len; i++) {
@@ -141,7 +141,7 @@ pk_debuginfo_install_enable_repos (PkDebuginfoInstallPrivate *priv, GPtrArray *a
/* check error code */
error_code = pk_results_get_error_code (results);
if (error_code != NULL) {
- *error = g_error_new (1, 0, "failed to enable repo: %s, %s", pk_error_enum_to_text (pk_error_code_get_code (error_code)), pk_error_code_get_details (error_code));
+ *error = g_error_new (1, 0, "failed to enable repo: %s, %s", pk_error_enum_to_text (pk_error_get_code (error_code)), pk_error_get_details (error_code));
ret = FALSE;
goto out;
}
@@ -188,7 +188,7 @@ pk_debuginfo_install_packages_install (PkDebuginfoInstallPrivate *priv, GPtrArra
PkResults *results = NULL;
gchar **package_ids;
GError *error_local = NULL;
- PkErrorCode *error_code = NULL;
+ PkError *error_code = NULL;
/* mush back into a char** */
package_ids = pk_ptr_array_to_strv (array);
@@ -209,7 +209,7 @@ pk_debuginfo_install_packages_install (PkDebuginfoInstallPrivate *priv, GPtrArra
/* check error code */
error_code = pk_results_get_error_code (results);
if (error_code != NULL) {
- *error = g_error_new (1, 0, "failed to resolve: %s, %s", pk_error_enum_to_text (pk_error_code_get_code (error_code)), pk_error_code_get_details (error_code));
+ *error = g_error_new (1, 0, "failed to resolve: %s, %s", pk_error_enum_to_text (pk_error_get_code (error_code)), pk_error_get_details (error_code));
ret = FALSE;
goto out;
}
@@ -237,7 +237,7 @@ pk_debuginfo_install_resolve_name_to_id (PkDebuginfoInstallPrivate *priv, const
GPtrArray *list = NULL;
GError *error_local = NULL;
gchar **names;
- PkErrorCode *error_code = NULL;
+ PkError *error_code = NULL;
/* resolve takes a char** */
names = g_strsplit (package_name, ";", -1);
@@ -253,7 +253,7 @@ pk_debuginfo_install_resolve_name_to_id (PkDebuginfoInstallPrivate *priv, const
/* check error code */
error_code = pk_results_get_error_code (results);
if (error_code != NULL) {
- *error = g_error_new (1, 0, "failed to resolve: %s, %s", pk_error_enum_to_text (pk_error_code_get_code (error_code)), pk_error_code_get_details (error_code));
+ *error = g_error_new (1, 0, "failed to resolve: %s, %s", pk_error_enum_to_text (pk_error_get_code (error_code)), pk_error_get_details (error_code));
goto out;
}
@@ -372,7 +372,7 @@ pk_debuginfo_install_add_deps (PkDebuginfoInstallPrivate *priv, GPtrArray *packa
gchar *name_debuginfo;
guint i;
gchar **split;
- PkErrorCode *error_code = NULL;
+ PkError *error_code = NULL;
/* get depends for them all, not adding dup's */
package_ids = pk_ptr_array_to_strv (packages_search);
@@ -387,7 +387,7 @@ pk_debuginfo_install_add_deps (PkDebuginfoInstallPrivate *priv, GPtrArray *packa
/* check error code */
error_code = pk_results_get_error_code (results);
if (error_code != NULL) {
- *error = g_error_new (1, 0, "failed to get depends: %s, %s", pk_error_enum_to_text (pk_error_code_get_code (error_code)), pk_error_code_get_details (error_code));
+ *error = g_error_new (1, 0, "failed to get depends: %s, %s", pk_error_enum_to_text (pk_error_get_code (error_code)), pk_error_get_details (error_code));
ret = FALSE;
goto out;
}
@@ -445,7 +445,7 @@ pk_debuginfo_install_get_repo_list (PkDebuginfoInstallPrivate *priv, GError **er
GPtrArray *array;
GError *error_local = NULL;
PkRepoDetail *item;
- PkErrorCode *error_code = NULL;
+ PkError *error_code = NULL;
gboolean enabled;
gchar *repo_id;
@@ -460,7 +460,7 @@ pk_debuginfo_install_get_repo_list (PkDebuginfoInstallPrivate *priv, GError **er
/* check error code */
error_code = pk_results_get_error_code (results);
if (error_code != NULL) {
- *error = g_error_new (1, 0, "failed to get repo list: %s, %s", pk_error_enum_to_text (pk_error_code_get_code (error_code)), pk_error_code_get_details (error_code));
+ *error = g_error_new (1, 0, "failed to get repo list: %s, %s", pk_error_enum_to_text (pk_error_get_code (error_code)), pk_error_get_details (error_code));
goto out;
}
diff --git a/docs/api/PackageKit-docs.sgml b/docs/api/PackageKit-docs.sgml
index 41ae7b5..a3e684d 100644
--- a/docs/api/PackageKit-docs.sgml
+++ b/docs/api/PackageKit-docs.sgml
@@ -71,7 +71,7 @@
<xi:include href="xml/pk-desktop.xml"/>
<xi:include href="xml/pk-details.xml"/>
<xi:include href="xml/pk-distro-upgrade.xml"/>
- <xi:include href="xml/pk-error-code.xml"/>
+ <xi:include href="xml/pk-error.xml"/>
<xi:include href="xml/pk-eula-required.xml"/>
<xi:include href="xml/pk-files.xml"/>
<xi:include href="xml/pk-media-change-required.xml"/>
diff --git a/lib/packagekit-glib2/Makefile.am b/lib/packagekit-glib2/Makefile.am
index 16336ae..e91cb3e 100644
--- a/lib/packagekit-glib2/Makefile.am
+++ b/lib/packagekit-glib2/Makefile.am
@@ -43,7 +43,7 @@ libpackagekit_glib2_include_HEADERS = \
pk-details.h \
pk-distro-upgrade.h \
pk-enum.h \
- pk-error-code.h \
+ pk-error.h \
pk-eula-required.h \
pk-files.h \
pk-media-change-required.h \
@@ -95,8 +95,8 @@ libpackagekit_glib2_la_SOURCES = \
pk-distro-upgrade.h \
pk-enum.c \
pk-enum.h \
- pk-error-code.c \
- pk-error-code.h \
+ pk-error.c \
+ pk-error.h \
pk-eula-required.c \
pk-eula-required.h \
pk-files.c \
diff --git a/lib/packagekit-glib2/packagekit.h b/lib/packagekit-glib2/packagekit.h
index 44c186d..2d9da27 100644
--- a/lib/packagekit-glib2/packagekit.h
+++ b/lib/packagekit-glib2/packagekit.h
@@ -40,7 +40,7 @@
#include <packagekit-glib2/pk-details.h>
#include <packagekit-glib2/pk-distro-upgrade.h>
#include <packagekit-glib2/pk-enum.h>
-#include <packagekit-glib2/pk-error-code.h>
+#include <packagekit-glib2/pk-error.h>
#include <packagekit-glib2/pk-eula-required.h>
#include <packagekit-glib2/pk-files.h>
#include <packagekit-glib2/pk-media-change-required.h>
diff --git a/lib/packagekit-glib2/pk-catalog.c b/lib/packagekit-glib2/pk-catalog.c
index 5f94015..c4e528b 100644
--- a/lib/packagekit-glib2/pk-catalog.c
+++ b/lib/packagekit-glib2/pk-catalog.c
@@ -249,7 +249,7 @@ pk_catalog_what_provides_ready_cb (GObject *source_object, GAsyncResult *res, Pk
GPtrArray *array = NULL;
guint i;
PkPackage *package;
- PkErrorCode *error_code = NULL;
+ PkError *error_code = NULL;
/* get the results */
results = pk_client_generic_finish (client, res, &error);
@@ -262,7 +262,7 @@ pk_catalog_what_provides_ready_cb (GObject *source_object, GAsyncResult *res, Pk
/* check error code */
error_code = pk_results_get_error_code (results);
if (error_code != NULL) {
- error = g_error_new (1, 0, "failed to search file: %s", pk_error_code_get_details (error_code));
+ error = g_error_new (1, 0, "failed to search file: %s", pk_error_get_details (error_code));
pk_catalog_lookup_state_finish (state, error);
g_error_free (error);
goto out;
@@ -318,7 +318,7 @@ pk_catalog_search_file_ready_cb (GObject *source_object, GAsyncResult *res, PkCa
GPtrArray *array = NULL;
guint i;
PkPackage *package;
- PkErrorCode *error_code = NULL;
+ PkError *error_code = NULL;
/* get the results */
results = pk_client_generic_finish (client, res, &error);
@@ -331,7 +331,7 @@ pk_catalog_search_file_ready_cb (GObject *source_object, GAsyncResult *res, PkCa
/* check error code */
error_code = pk_results_get_error_code (results);
if (error_code != NULL) {
- error = g_error_new (1, 0, "failed to search file: %s", pk_error_code_get_details (error_code));
+ error = g_error_new (1, 0, "failed to search file: %s", pk_error_get_details (error_code));
pk_catalog_lookup_state_finish (state, error);
g_error_free (error);
goto out;
@@ -393,7 +393,7 @@ pk_catalog_resolve_ready_cb (GObject *source_object, GAsyncResult *res, PkCatalo
GPtrArray *array = NULL;
guint i;
PkPackage *package;
- PkErrorCode *error_code = NULL;
+ PkError *error_code = NULL;
/* get the results */
results = pk_client_generic_finish (client, res, &error);
@@ -406,7 +406,7 @@ pk_catalog_resolve_ready_cb (GObject *source_object, GAsyncResult *res, PkCatalo
/* check error code */
error_code = pk_results_get_error_code (results);
if (error_code != NULL) {
- error = g_error_new (1, 0, "failed to resolve: %s", pk_error_code_get_details (error_code));
+ error = g_error_new (1, 0, "failed to resolve: %s", pk_error_get_details (error_code));
pk_catalog_lookup_state_finish (state, error);
g_error_free (error);
goto out;
diff --git a/lib/packagekit-glib2/pk-client.c b/lib/packagekit-glib2/pk-client.c
index 17715f5..790516a 100644
--- a/lib/packagekit-glib2/pk-client.c
+++ b/lib/packagekit-glib2/pk-client.c
@@ -845,7 +845,7 @@ pk_client_finished_cb (DBusGProxy *proxy, const gchar *exit_text, guint runtime,
{
GError *error = NULL;
PkExitEnum exit_enum;
- PkErrorCode *error_code = NULL;
+ PkError *error_code = NULL;
egg_debug ("exit_text=%s", exit_text);
@@ -860,7 +860,7 @@ pk_client_finished_cb (DBusGProxy *proxy, const gchar *exit_text, guint runtime,
error_code = pk_results_get_error_code (state->results);
if (error_code != NULL) {
/* should only ever have one ErrorCode */
- error = g_error_new (PK_CLIENT_ERROR, 0xFF + pk_error_code_get_code (error_code), "%s", pk_error_code_get_details (error_code));
+ error = g_error_new (PK_CLIENT_ERROR, 0xFF + pk_error_get_code (error_code), "%s", pk_error_get_details (error_code));
} else {
/* fallback where the daemon didn't sent ErrorCode */
error = g_error_new (PK_CLIENT_ERROR, PK_CLIENT_ERROR_FAILED, "Failed: %s", exit_text);
@@ -1288,12 +1288,12 @@ pk_client_repo_detail_cb (DBusGProxy *proxy, const gchar *repo_id,
static void
pk_client_error_code_cb (DBusGProxy *proxy, const gchar *code_text, const gchar *details, PkClientState *state)
{
- PkErrorCodeEnum code_enum;
- PkErrorCode *item;
+ PkErrorEnum code_enum;
+ PkError *item;
code_enum = pk_error_enum_from_text (code_text);
/* add to results */
- item = pk_error_code_new ();
+ item = pk_error_new ();
g_object_set (item,
"code", code_enum,
"details", details,
@@ -4125,7 +4125,7 @@ pk_client_test_search_name_cb (GObject *object, GAsyncResult *res, EggTest *test
GError *error = NULL;
PkResults *results = NULL;
PkExitEnum exit_enum;
- PkErrorCode *error_code = NULL;
+ PkError *error_code = NULL;
/* get the results */
results = pk_client_generic_finish (client, res, &error);
@@ -4141,10 +4141,10 @@ pk_client_test_search_name_cb (GObject *object, GAsyncResult *res, EggTest *test
/* check error code */
error_code = pk_results_get_error_code (results);
- if (pk_error_code_get_code (error_code) != PK_ERROR_ENUM_TRANSACTION_CANCELLED)
- egg_test_failed (test, "failed to get error code: %i", pk_error_code_get_code (error_code));
- if (g_strcmp0 (pk_error_code_get_details (error_code), "The task was stopped successfully") != 0)
- egg_test_failed (test, "failed to get error message: %s", pk_error_code_get_details (error_code));
+ if (pk_error_get_code (error_code) != PK_ERROR_ENUM_TRANSACTION_CANCELLED)
+ egg_test_failed (test, "failed to get error code: %i", pk_error_get_code (error_code));
+ if (g_strcmp0 (pk_error_get_details (error_code), "The task was stopped successfully") != 0)
+ egg_test_failed (test, "failed to get error message: %s", pk_error_get_details (error_code));
out:
if (error_code != NULL)
g_object_unref (error_code);
diff --git a/lib/packagekit-glib2/pk-enum.c b/lib/packagekit-glib2/pk-enum.c
index 905709e..02ddcbf 100644
--- a/lib/packagekit-glib2/pk-enum.c
+++ b/lib/packagekit-glib2/pk-enum.c
@@ -839,7 +839,7 @@ pk_role_enum_to_text (PkRoleEnum role)
*
* Return value: the enumerated constant value, e.g. PK_SIGTYPE_ENUM_GPG
**/
-PkErrorCodeEnum
+PkErrorEnum
pk_error_enum_from_text (const gchar *code)
{
return pk_enum_find_value (enum_error, code);
@@ -854,7 +854,7 @@ pk_error_enum_from_text (const gchar *code)
* Return value: the enumerated constant value, e.g. "available"
**/
const gchar *
-pk_error_enum_to_text (PkErrorCodeEnum code)
+pk_error_enum_to_text (PkErrorEnum code)
{
return pk_enum_find_string (enum_error, code);
}
diff --git a/lib/packagekit-glib2/pk-enum.h b/lib/packagekit-glib2/pk-enum.h
index 2cec4c0..de9d5dc 100644
--- a/lib/packagekit-glib2/pk-enum.h
+++ b/lib/packagekit-glib2/pk-enum.h
@@ -255,7 +255,7 @@ typedef enum {
} PkMessageEnum;
/**
- * PkErrorCodeEnum:
+ * PkErrorEnum:
*
* The error type
**/
@@ -321,7 +321,7 @@ typedef enum {
PK_ERROR_ENUM_PACKAGE_FAILED_TO_INSTALL,
PK_ERROR_ENUM_PACKAGE_FAILED_TO_REMOVE,
PK_ERROR_ENUM_LAST
-} PkErrorCodeEnum;
+} PkErrorEnum;
/**
* PkGroupEnum:
@@ -679,8 +679,8 @@ const gchar *pk_status_enum_to_text (PkStatusEnum status);
PkRoleEnum pk_role_enum_from_text (const gchar *role);
const gchar *pk_role_enum_to_text (PkRoleEnum role);
-PkErrorCodeEnum pk_error_enum_from_text (const gchar *code);
-const gchar *pk_error_enum_to_text (PkErrorCodeEnum code);
+PkErrorEnum pk_error_enum_from_text (const gchar *code);
+const gchar *pk_error_enum_to_text (PkErrorEnum code);
PkRestartEnum pk_restart_enum_from_text (const gchar *restart);
const gchar *pk_restart_enum_to_text (PkRestartEnum restart);
diff --git a/lib/packagekit-glib2/pk-error-code.c b/lib/packagekit-glib2/pk-error-code.c
deleted file mode 100644
index aed3efe..0000000
--- a/lib/packagekit-glib2/pk-error-code.c
+++ /dev/null
@@ -1,195 +0,0 @@
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*-
- *
- * Copyright (C) 2009 Richard Hughes <richard at hughsie.com>
- *
- * Licensed under the GNU General Public License Version 2
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
- */
-
-/**
- * SECTION:pk-error_code
- * @short_description: ErrorCode object
- *
- * This GObject represents a error_code from a transaction.
- * These objects represent single items of data from the transaction, and are
- * often present in lists (#PkResults) or just refcounted in client programs.
- */
-
-#include "config.h"
-
-#include <glib-object.h>
-
-#include <packagekit-glib2/pk-error-code.h>
-#include <packagekit-glib2/pk-enum.h>
-
-#include "egg-debug.h"
-
-static void pk_error_code_finalize (GObject *object);
-
-#define PK_ERROR_CODE_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), PK_TYPE_ERROR_CODE, PkErrorCodePrivate))
-
-/**
- * PkErrorCodePrivate:
- *
- * Private #PkErrorCode data
- **/
-struct _PkErrorCodePrivate
-{
- PkErrorCodeEnum code;
- gchar *details;
-};
-
-enum {
- PROP_0,
- PROP_CODE,
- PROP_DETAILS,
- PROP_LAST
-};
-
-G_DEFINE_TYPE (PkErrorCode, pk_error_code, G_TYPE_OBJECT)
-
-/**
- * pk_error_code_get_property:
- **/
-static void
-pk_error_code_get_property (GObject *object, guint prop_id, GValue *value, GParamSpec *pspec)
-{
- PkErrorCode *error_code = PK_ERROR_CODE (object);
- PkErrorCodePrivate *priv = error_code->priv;
-
- switch (prop_id) {
- case PROP_CODE:
- g_value_set_uint (value, priv->code);
- break;
- case PROP_DETAILS:
- g_value_set_string (value, priv->details);
- break;
- default:
- G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
- break;
- }
-}
-
-/**
- * pk_error_code_set_property:
- **/
-static void
-pk_error_code_set_property (GObject *object, guint prop_id, const GValue *value, GParamSpec *pspec)
-{
- PkErrorCode *error_code = PK_ERROR_CODE (object);
- PkErrorCodePrivate *priv = error_code->priv;
-
- switch (prop_id) {
- case PROP_CODE:
- priv->code = g_value_get_uint (value);
- break;
- case PROP_DETAILS:
- g_free (priv->details);
- priv->details = g_strdup (g_value_get_string (value));
- break;
- default:
- G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
- break;
- }
-}
-
-/**
- * pk_error_code_get_code:
- **/
-PkErrorCodeEnum
-pk_error_code_get_code (PkErrorCode *error_code)
-{
- g_return_val_if_fail (PK_IS_ERROR_CODE (error_code), 0);
- return error_code->priv->code;
-}
-
-/**
- * pk_error_code_get_details:
- **/
-const gchar *
-pk_error_code_get_details (PkErrorCode *error_code)
-{
- g_return_val_if_fail (PK_IS_ERROR_CODE (error_code), NULL);
- return error_code->priv->details;
-}
-
-/**
- * pk_error_code_class_init:
- **/
-static void
-pk_error_code_class_init (PkErrorCodeClass *klass)
-{
- GParamSpec *pspec;
- GObjectClass *object_class = G_OBJECT_CLASS (klass);
- object_class->finalize = pk_error_code_finalize;
- object_class->get_property = pk_error_code_get_property;
- object_class->set_property = pk_error_code_set_property;
-
- /**
- * PkErrorCode:code:
- */
- pspec = g_param_spec_uint ("code", NULL, NULL,
- 0, G_MAXUINT, PK_ERROR_ENUM_UNKNOWN,
- G_PARAM_READWRITE);
- g_object_class_install_property (object_class, PROP_CODE, pspec);
-
- /**
- * PkErrorCode:details:
- */
- pspec = g_param_spec_string ("details", NULL, NULL,
- NULL,
- G_PARAM_READWRITE);
- g_object_class_install_property (object_class, PROP_DETAILS, pspec);
-
- g_type_class_add_private (klass, sizeof (PkErrorCodePrivate));
-}
-
-/**
- * pk_error_code_init:
- **/
-static void
-pk_error_code_init (PkErrorCode *error_code)
-{
- error_code->priv = PK_ERROR_CODE_GET_PRIVATE (error_code);
-}
-
-/**
- * pk_error_code_finalize:
- **/
-static void
-pk_error_code_finalize (GObject *object)
-{
- PkErrorCode *error_code = PK_ERROR_CODE (object);
- PkErrorCodePrivate *priv = error_code->priv;
-
- g_free (priv->details);
-
- G_OBJECT_CLASS (pk_error_code_parent_class)->finalize (object);
-}
-
-/**
- * pk_error_code_new:
- *
- * Return value: a new PkErrorCode object.
- **/
-PkErrorCode *
-pk_error_code_new (void)
-{
- PkErrorCode *error_code;
- error_code = g_object_new (PK_TYPE_ERROR_CODE, NULL);
- return PK_ERROR_CODE (error_code);
-}
-
diff --git a/lib/packagekit-glib2/pk-error-code.h b/lib/packagekit-glib2/pk-error-code.h
deleted file mode 100644
index c9406ae..0000000
--- a/lib/packagekit-glib2/pk-error-code.h
+++ /dev/null
@@ -1,71 +0,0 @@
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*-
- *
- * Copyright (C) 2009 Richard Hughes <richard at hughsie.com>
- *
- * Licensed under the GNU General Public License Version 2
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
- */
-
-#if !defined (__PACKAGEKIT_H_INSIDE__) && !defined (PK_COMPILATION)
-#error "Only <packagekit.h> can be included directly."
-#endif
-
-#ifndef __PK_ERROR_CODE_H
-#define __PK_ERROR_CODE_H
-
-#include <glib-object.h>
-#include <packagekit-glib2/pk-enum.h>
-
-G_BEGIN_DECLS
-
-#define PK_TYPE_ERROR_CODE (pk_error_code_get_type ())
-#define PK_ERROR_CODE(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), PK_TYPE_ERROR_CODE, PkErrorCode))
-#define PK_ERROR_CODE_CLASS(k) (G_TYPE_CHECK_CLASS_CAST((k), PK_TYPE_ERROR_CODE, PkErrorCodeClass))
-#define PK_IS_ERROR_CODE(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), PK_TYPE_ERROR_CODE))
-#define PK_IS_ERROR_CODE_CLASS(k) (G_TYPE_CHECK_CLASS_TYPE ((k), PK_TYPE_ERROR_CODE))
-#define PK_ERROR_CODE_GET_CLASS(o) (G_TYPE_INSTANCE_GET_CLASS ((o), PK_TYPE_ERROR_CODE, PkErrorCodeClass))
-
-typedef struct _PkErrorCodePrivate PkErrorCodePrivate;
-typedef struct _PkErrorCode PkErrorCode;
-typedef struct _PkErrorCodeClass PkErrorCodeClass;
-
-struct _PkErrorCode
-{
- GObject parent;
- PkErrorCodePrivate *priv;
-};
-
-struct _PkErrorCodeClass
-{
- GObjectClass parent_class;
- /* padding for future expansion */
- void (*_pk_reserved1) (void);
- void (*_pk_reserved2) (void);
- void (*_pk_reserved3) (void);
- void (*_pk_reserved4) (void);
- void (*_pk_reserved5) (void);
-};
-
-GType pk_error_code_get_type (void);
-PkErrorCode *pk_error_code_new (void);
-
-PkErrorCodeEnum pk_error_code_get_code (PkErrorCode *error_code);
-const gchar *pk_error_code_get_details (PkErrorCode *error_code);
-
-G_END_DECLS
-
-#endif /* __PK_ERROR_CODE_H */
-
diff --git a/lib/packagekit-glib2/pk-error.c b/lib/packagekit-glib2/pk-error.c
new file mode 100644
index 0000000..3faf1e7
--- /dev/null
+++ b/lib/packagekit-glib2/pk-error.c
@@ -0,0 +1,195 @@
+/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*-
+ *
+ * Copyright (C) 2009 Richard Hughes <richard at hughsie.com>
+ *
+ * Licensed under the GNU General Public License Version 2
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ */
+
+/**
+ * SECTION:pk-error_code
+ * @short_description: ErrorCode object
+ *
+ * This GObject represents a error_code from a transaction.
+ * These objects represent single items of data from the transaction, and are
+ * often present in lists (#PkResults) or just refcounted in client programs.
+ */
+
+#include "config.h"
+
+#include <glib-object.h>
+
+#include <packagekit-glib2/pk-error.h>
+#include <packagekit-glib2/pk-enum.h>
+
+#include "egg-debug.h"
+
+static void pk_error_finalize (GObject *object);
+
+#define PK_ERROR_CODE_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), PK_TYPE_ERROR_CODE, PkErrorPrivate))
+
+/**
+ * PkErrorPrivate:
+ *
+ * Private #PkError data
+ **/
+struct _PkErrorPrivate
+{
+ PkErrorEnum code;
+ gchar *details;
+};
+
+enum {
+ PROP_0,
+ PROP_CODE,
+ PROP_DETAILS,
+ PROP_LAST
+};
+
+G_DEFINE_TYPE (PkError, pk_error, G_TYPE_OBJECT)
+
+/**
+ * pk_error_get_property:
+ **/
+static void
+pk_error_get_property (GObject *object, guint prop_id, GValue *value, GParamSpec *pspec)
+{
+ PkError *error_code = PK_ERROR_CODE (object);
+ PkErrorPrivate *priv = error_code->priv;
+
+ switch (prop_id) {
+ case PROP_CODE:
+ g_value_set_uint (value, priv->code);
+ break;
+ case PROP_DETAILS:
+ g_value_set_string (value, priv->details);
+ break;
+ default:
+ G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
+ break;
+ }
+}
+
+/**
+ * pk_error_set_property:
+ **/
+static void
+pk_error_set_property (GObject *object, guint prop_id, const GValue *value, GParamSpec *pspec)
+{
+ PkError *error_code = PK_ERROR_CODE (object);
+ PkErrorPrivate *priv = error_code->priv;
+
+ switch (prop_id) {
+ case PROP_CODE:
+ priv->code = g_value_get_uint (value);
+ break;
+ case PROP_DETAILS:
+ g_free (priv->details);
+ priv->details = g_strdup (g_value_get_string (value));
+ break;
+ default:
+ G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
+ break;
+ }
+}
+
+/**
+ * pk_error_get_code:
+ **/
+PkErrorEnum
+pk_error_get_code (PkError *error_code)
+{
+ g_return_val_if_fail (PK_IS_ERROR_CODE (error_code), 0);
+ return error_code->priv->code;
+}
+
+/**
+ * pk_error_get_details:
+ **/
+const gchar *
+pk_error_get_details (PkError *error_code)
+{
+ g_return_val_if_fail (PK_IS_ERROR_CODE (error_code), NULL);
+ return error_code->priv->details;
+}
+
+/**
+ * pk_error_class_init:
+ **/
+static void
+pk_error_class_init (PkErrorClass *klass)
+{
+ GParamSpec *pspec;
+ GObjectClass *object_class = G_OBJECT_CLASS (klass);
+ object_class->finalize = pk_error_finalize;
+ object_class->get_property = pk_error_get_property;
+ object_class->set_property = pk_error_set_property;
+
+ /**
+ * PkError:code:
+ */
+ pspec = g_param_spec_uint ("code", NULL, NULL,
+ 0, G_MAXUINT, PK_ERROR_ENUM_UNKNOWN,
+ G_PARAM_READWRITE);
+ g_object_class_install_property (object_class, PROP_CODE, pspec);
+
+ /**
+ * PkError:details:
+ */
+ pspec = g_param_spec_string ("details", NULL, NULL,
+ NULL,
+ G_PARAM_READWRITE);
+ g_object_class_install_property (object_class, PROP_DETAILS, pspec);
+
+ g_type_class_add_private (klass, sizeof (PkErrorPrivate));
+}
+
+/**
+ * pk_error_init:
+ **/
+static void
+pk_error_init (PkError *error_code)
+{
+ error_code->priv = PK_ERROR_CODE_GET_PRIVATE (error_code);
+}
+
+/**
+ * pk_error_finalize:
+ **/
+static void
+pk_error_finalize (GObject *object)
+{
+ PkError *error_code = PK_ERROR_CODE (object);
+ PkErrorPrivate *priv = error_code->priv;
+
+ g_free (priv->details);
+
+ G_OBJECT_CLASS (pk_error_parent_class)->finalize (object);
+}
+
+/**
+ * pk_error_new:
+ *
+ * Return value: a new PkError object.
+ **/
+PkError *
+pk_error_new (void)
+{
+ PkError *error_code;
+ error_code = g_object_new (PK_TYPE_ERROR_CODE, NULL);
+ return PK_ERROR_CODE (error_code);
+}
+
diff --git a/lib/packagekit-glib2/pk-error.h b/lib/packagekit-glib2/pk-error.h
new file mode 100644
index 0000000..c7be761
--- /dev/null
+++ b/lib/packagekit-glib2/pk-error.h
@@ -0,0 +1,71 @@
+/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*-
+ *
+ * Copyright (C) 2009 Richard Hughes <richard at hughsie.com>
+ *
+ * Licensed under the GNU General Public License Version 2
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ */
+
+#if !defined (__PACKAGEKIT_H_INSIDE__) && !defined (PK_COMPILATION)
+#error "Only <packagekit.h> can be included directly."
+#endif
+
+#ifndef __PK_ERROR_CODE_H
+#define __PK_ERROR_CODE_H
+
+#include <glib-object.h>
+#include <packagekit-glib2/pk-enum.h>
+
+G_BEGIN_DECLS
+
+#define PK_TYPE_ERROR_CODE (pk_error_get_type ())
+#define PK_ERROR_CODE(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), PK_TYPE_ERROR_CODE, PkError))
+#define PK_ERROR_CODE_CLASS(k) (G_TYPE_CHECK_CLASS_CAST((k), PK_TYPE_ERROR_CODE, PkErrorClass))
+#define PK_IS_ERROR_CODE(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), PK_TYPE_ERROR_CODE))
+#define PK_IS_ERROR_CODE_CLASS(k) (G_TYPE_CHECK_CLASS_TYPE ((k), PK_TYPE_ERROR_CODE))
+#define PK_ERROR_CODE_GET_CLASS(o) (G_TYPE_INSTANCE_GET_CLASS ((o), PK_TYPE_ERROR_CODE, PkErrorClass))
+
+typedef struct _PkErrorPrivate PkErrorPrivate;
+typedef struct _PkError PkError;
+typedef struct _PkErrorClass PkErrorClass;
+
+struct _PkError
+{
+ GObject parent;
+ PkErrorPrivate *priv;
+};
+
+struct _PkErrorClass
+{
+ GObjectClass parent_class;
+ /* padding for future expansion */
+ void (*_pk_reserved1) (void);
+ void (*_pk_reserved2) (void);
+ void (*_pk_reserved3) (void);
+ void (*_pk_reserved4) (void);
+ void (*_pk_reserved5) (void);
+};
+
+GType pk_error_get_type (void);
+PkError *pk_error_new (void);
+
+PkErrorEnum pk_error_get_code (PkError *error_code);
+const gchar *pk_error_get_details (PkError *error_code);
+
+G_END_DECLS
+
+#endif /* __PK_ERROR_CODE_H */
+
diff --git a/lib/packagekit-glib2/pk-results.c b/lib/packagekit-glib2/pk-results.c
index c599bd9..5823299 100644
--- a/lib/packagekit-glib2/pk-results.c
+++ b/lib/packagekit-glib2/pk-results.c
@@ -53,7 +53,7 @@ struct _PkResultsPrivate
guint inputs;
PkProgress *progress;
PkExitEnum exit_enum;
- PkErrorCode *error_code;
+ PkError *error_code;
GPtrArray *package_array;
GPtrArray *details_array;
GPtrArray *update_detail_array;
@@ -413,7 +413,7 @@ pk_results_add_repo_detail (PkResults *results, PkRepoDetail *item)
* Return value: %TRUE if the value was set
**/
gboolean
-pk_results_set_error_code (PkResults *results, PkErrorCode *item)
+pk_results_set_error_code (PkResults *results, PkError *item)
{
g_return_val_if_fail (PK_IS_RESULTS (results), FALSE);
g_return_val_if_fail (item != NULL, FALSE);
@@ -469,9 +469,9 @@ pk_results_get_exit_code (PkResults *results)
*
* Gets the last error code from the transaction.
*
- * Return value: A #PkErrorCode, or %NULL, free with g_object_unref()
+ * Return value: A #PkError, or %NULL, free with g_object_unref()
**/
-PkErrorCode *
+PkError *
pk_results_get_error_code (PkResults *results)
{
g_return_val_if_fail (PK_IS_RESULTS (results), FALSE);
diff --git a/lib/packagekit-glib2/pk-results.h b/lib/packagekit-glib2/pk-results.h
index fce6386..9b18d07 100644
--- a/lib/packagekit-glib2/pk-results.h
+++ b/lib/packagekit-glib2/pk-results.h
@@ -31,7 +31,7 @@
#include <packagekit-glib2/pk-details.h>
#include <packagekit-glib2/pk-distro-upgrade.h>
#include <packagekit-glib2/pk-enum.h>
-#include <packagekit-glib2/pk-error-code.h>
+#include <packagekit-glib2/pk-error.h>
#include <packagekit-glib2/pk-eula-required.h>
#include <packagekit-glib2/pk-files.h>
#include <packagekit-glib2/pk-media-change-required.h>
@@ -84,7 +84,7 @@ void pk_results_test (gpointer user_data);
gboolean pk_results_set_exit_code (PkResults *results,
PkExitEnum exit_enum);
gboolean pk_results_set_error_code (PkResults *results,
- PkErrorCode *item);
+ PkError *item);
/* add */
gboolean pk_results_add_package (PkResults *results,
@@ -117,7 +117,7 @@ gboolean pk_results_add_message (PkResults *results,
/* get single data */
PkExitEnum pk_results_get_exit_code (PkResults *results);
PkPackageSack *pk_results_get_package_sack (PkResults *results);
-PkErrorCode *pk_results_get_error_code (PkResults *results);
+PkError *pk_results_get_error_code (PkResults *results);
PkRestartEnum pk_results_get_require_restart_worst (PkResults *results);
/* get array objects */
diff --git a/lib/packagekit-glib2/pk-service-pack.c b/lib/packagekit-glib2/pk-service-pack.c
index ef945cc..2ed64e0 100644
--- a/lib/packagekit-glib2/pk-service-pack.c
+++ b/lib/packagekit-glib2/pk-service-pack.c
@@ -701,7 +701,7 @@ pk_service_pack_download_ready_cb (GObject *source_object, GAsyncResult *res, Pk
gboolean ret;
gchar **files = NULL;
GPtrArray *array = NULL;
- PkErrorCode *error_code = NULL;
+ PkError *error_code = NULL;
/* get the results */
results = pk_client_generic_finish (client, res, &error);
@@ -714,7 +714,7 @@ pk_service_pack_download_ready_cb (GObject *source_object, GAsyncResult *res, Pk
/* check error code */
error_code = pk_results_get_error_code (results);
if (error_code != NULL) {
- error = g_error_new (1, 0, "failed to download: %s", pk_error_code_get_details (error_code));
+ error = g_error_new (1, 0, "failed to download: %s", pk_error_get_details (error_code));
pk_service_pack_generic_state_finish (state, error);
g_error_free (error);
goto out;
@@ -780,7 +780,7 @@ pk_service_pack_get_depends_ready_cb (GObject *source_object, GAsyncResult *res,
PkPackage *package;
gchar **package_ids = NULL;
gchar **package_ids_to_download = NULL;
- PkErrorCode *error_code = NULL;
+ PkError *error_code = NULL;
/* get the results */
results = pk_client_generic_finish (client, res, &error);
@@ -793,7 +793,7 @@ pk_service_pack_get_depends_ready_cb (GObject *source_object, GAsyncResult *res,
/* check error code */
error_code = pk_results_get_error_code (results);
if (error_code != NULL) {
- error = g_error_new (1, 0, "failed to download: %s", pk_error_code_get_details (error_code));
+ error = g_error_new (1, 0, "failed to download: %s", pk_error_get_details (error_code));
pk_service_pack_generic_state_finish (state, error);
g_error_free (error);
goto out;
@@ -887,7 +887,7 @@ pk_service_pack_get_updates_ready_cb (GObject *source_object, GAsyncResult *res,
GPtrArray *array = NULL;
guint i;
PkPackage *package;
- PkErrorCode *error_code = NULL;
+ PkError *error_code = NULL;
/* get the results */
results = pk_client_generic_finish (client, res, &error);
@@ -900,7 +900,7 @@ pk_service_pack_get_updates_ready_cb (GObject *source_object, GAsyncResult *res,
/* check error code */
error_code = pk_results_get_error_code (results);
if (error_code != NULL) {
- error = g_error_new (1, 0, "failed to get updates: %s", pk_error_code_get_details (error_code));
+ error = g_error_new (1, 0, "failed to get updates: %s", pk_error_get_details (error_code));
pk_service_pack_generic_state_finish (state, error);
g_error_free (error);
goto out;
diff --git a/lib/packagekit-glib2/pk-task.c b/lib/packagekit-glib2/pk-task.c
index 6d5655e..4a118be 100644
--- a/lib/packagekit-glib2/pk-task.c
+++ b/lib/packagekit-glib2/pk-task.c
@@ -207,7 +207,7 @@ pk_task_simulate_ready_cb (GObject *source_object, GAsyncResult *res, PkTaskStat
PkResults *results;
PkPackageSack *sack = NULL;
guint length;
- PkErrorCode *error_code;
+ PkError *error_code;
guint idx = 0;
guint i;
GPtrArray *array = NULL;
@@ -244,9 +244,9 @@ pk_task_simulate_ready_cb (GObject *source_object, GAsyncResult *res, PkTaskStat
state->exit_enum = pk_results_get_exit_code (state->results);
if (state->exit_enum != PK_EXIT_ENUM_SUCCESS) {
error_code = pk_results_get_error_code (state->results);
- /* TODO: convert the PkErrorCodeEnum to a PK_CLIENT_ERROR_* enum */
+ /* TODO: convert the PkErrorEnum to a PK_CLIENT_ERROR_* enum */
error = g_error_new (PK_CLIENT_ERROR, PK_CLIENT_ERROR_FAILED,
- "could not do simulate: %s", pk_error_code_get_details (error_code));
+ "could not do simulate: %s", pk_error_get_details (error_code));
pk_task_generic_state_finish (state, error);
g_error_free (error);
g_object_unref (error_code);
@@ -364,7 +364,7 @@ pk_task_install_signatures_ready_cb (GObject *source_object, GAsyncResult *res,
PkTask *task = PK_TASK (source_object);
GError *error = NULL;
PkResults *results;
- PkErrorCode *error_code;
+ PkError *error_code;
/* old results no longer valid */
if (state->results != NULL)
@@ -387,8 +387,8 @@ pk_task_install_signatures_ready_cb (GObject *source_object, GAsyncResult *res,
/* need untrusted */
if (state->exit_enum != PK_EXIT_ENUM_SUCCESS) {
error_code = pk_results_get_error_code (state->results);
- /* TODO: convert the PkErrorCodeEnum to a PK_CLIENT_ERROR_* enum */
- error = g_error_new (PK_CLIENT_ERROR, PK_CLIENT_ERROR_FAILED, "failed to install signature: %s", pk_error_code_get_details (error_code));
+ /* TODO: convert the PkErrorEnum to a PK_CLIENT_ERROR_* enum */
+ error = g_error_new (PK_CLIENT_ERROR, PK_CLIENT_ERROR_FAILED, "failed to install signature: %s", pk_error_get_details (error_code));
pk_task_generic_state_finish (state, error);
g_error_free (error);
g_object_unref (error_code);
@@ -465,7 +465,7 @@ pk_task_accept_eulas_ready_cb (GObject *source_object, GAsyncResult *res, PkTask
PkTask *task = PK_TASK (source_object);
GError *error = NULL;
PkResults *results;
- PkErrorCode *error_code;
+ PkError *error_code;
/* old results no longer valid */
if (state->results != NULL)
@@ -488,8 +488,8 @@ pk_task_accept_eulas_ready_cb (GObject *source_object, GAsyncResult *res, PkTask
/* need untrusted */
if (state->exit_enum != PK_EXIT_ENUM_SUCCESS) {
error_code = pk_results_get_error_code (state->results);
- /* TODO: convert the PkErrorCodeEnum to a PK_CLIENT_ERROR_* enum */
- error = g_error_new (PK_CLIENT_ERROR, PK_CLIENT_ERROR_FAILED, "failed to accept eula: %s", pk_error_code_get_details (error_code));
+ /* TODO: convert the PkErrorEnum to a PK_CLIENT_ERROR_* enum */
+ error = g_error_new (PK_CLIENT_ERROR, PK_CLIENT_ERROR_FAILED, "failed to accept eula: %s", pk_error_get_details (error_code));
pk_task_generic_state_finish (state, error);
g_error_free (error);
g_object_unref (error_code);
diff --git a/src/pk-backend-spawn.c b/src/pk-backend-spawn.c
index 47877b6..cc27fde 100644
--- a/src/pk-backend-spawn.c
+++ b/src/pk-backend-spawn.c
@@ -113,7 +113,7 @@ pk_backend_spawn_parse_stdout (PkBackendSpawn *backend_spawn, const gchar *line)
PkGroupEnum group;
gulong package_size;
gint percentage;
- PkErrorCodeEnum error_enum;
+ PkErrorEnum error_enum;
PkStatusEnum status_enum;
PkMessageEnum message_enum;
PkRestartEnum restart_enum;
diff --git a/src/pk-backend.c b/src/pk-backend.c
index 548d1e6..d5afb16 100644
--- a/src/pk-backend.c
+++ b/src/pk-backend.c
@@ -1688,7 +1688,7 @@ out:
* pk_backend_error_code_is_need_untrusted:
**/
static gboolean
-pk_backend_error_code_is_need_untrusted (PkErrorCodeEnum error_code)
+pk_backend_error_code_is_need_untrusted (PkErrorEnum error_code)
{
gboolean ret = FALSE;
switch (error_code) {
@@ -1709,13 +1709,13 @@ pk_backend_error_code_is_need_untrusted (PkErrorCodeEnum error_code)
* pk_backend_error_code:
**/
gboolean
-pk_backend_error_code (PkBackend *backend, PkErrorCodeEnum error_code, const gchar *format, ...)
+pk_backend_error_code (PkBackend *backend, PkErrorEnum error_code, const gchar *format, ...)
{
va_list args;
gchar *buffer;
gboolean ret = TRUE;
gboolean need_untrusted;
- PkErrorCode *item = NULL;
+ PkError *item = NULL;
g_return_val_if_fail (PK_IS_BACKEND (backend), FALSE);
@@ -1749,8 +1749,8 @@ pk_backend_error_code (PkBackend *backend, PkErrorCodeEnum error_code, const gch
else
pk_backend_set_exit_code (backend, PK_EXIT_ENUM_FAILED);
- /* form PkErrorCode struct */
- item = pk_error_code_new ();
+ /* form PkError struct */
+ item = pk_error_new ();
g_object_set (item,
"code", error_code,
"details", buffer,
diff --git a/src/pk-backend.h b/src/pk-backend.h
index a2a50f0..7570f05 100644
--- a/src/pk-backend.h
+++ b/src/pk-backend.h
@@ -126,7 +126,7 @@ gboolean pk_backend_distro_upgrade (PkBackend *backend,
const gchar *name,
const gchar *summary);
gboolean pk_backend_error_code (PkBackend *backend,
- PkErrorCodeEnum code,
+ PkErrorEnum code,
const gchar *details, ...);
gboolean pk_backend_repo_signature_required (PkBackend *backend,
const gchar *package_id,
diff --git a/src/pk-transaction.c b/src/pk-transaction.c
index 359dfdb..a3803b7 100644
--- a/src/pk-transaction.c
+++ b/src/pk-transaction.c
@@ -458,7 +458,7 @@ pk_transaction_finished_emit (PkTransaction *transaction, PkExitEnum exit_enum,
* pk_transaction_error_code_emit:
**/
static void
-pk_transaction_error_code_emit (PkTransaction *transaction, PkErrorCodeEnum error_enum, const gchar *details)
+pk_transaction_error_code_emit (PkTransaction *transaction, PkErrorEnum error_enum, const gchar *details)
{
const gchar *text;
text = pk_error_enum_to_text (error_enum);
@@ -552,10 +552,10 @@ pk_transaction_details_cb (PkBackend *backend, PkDetails *item, PkTransaction *t
* pk_transaction_error_code_cb:
**/
static void
-pk_transaction_error_code_cb (PkBackend *backend, PkErrorCode *item, PkTransaction *transaction)
+pk_transaction_error_code_cb (PkBackend *backend, PkError *item, PkTransaction *transaction)
{
gchar *details;
- PkErrorCodeEnum code;
+ PkErrorEnum code;
g_return_if_fail (PK_IS_TRANSACTION (transaction));
g_return_if_fail (transaction->priv->tid != NULL);
commit 7e3d25068c9f5a85956f89170a189b302992a4ca
Author: Richard Hughes <richard at hughsie.com>
Date: Mon Nov 9 12:49:59 2009 +0000
trivial: tiny bugfix to allow messages to be captured by the client
diff --git a/lib/packagekit-glib2/pk-client.c b/lib/packagekit-glib2/pk-client.c
index fbaeaf5..17715f5 100644
--- a/lib/packagekit-glib2/pk-client.c
+++ b/lib/packagekit-glib2/pk-client.c
@@ -1315,7 +1315,7 @@ pk_client_message_cb (DBusGProxy *proxy, const gchar *message_text, const gchar
/* add to results */
item = pk_message_new ();
g_object_set (item,
- "message", message_enum,
+ "type", message_enum,
"details", details,
NULL);
pk_results_add_message (state->results, item);
commit 47ac466633fb48459294e75e299ac56163afc992
Author: Richard Hughes <richard at hughsie.com>
Date: Mon Nov 9 12:49:17 2009 +0000
trivial: yum: fix up some package names vs. package_id naming issues
diff --git a/backends/yum/yumBackend.py b/backends/yum/yumBackend.py
index 411e094..99912dd 100755
--- a/backends/yum/yumBackend.py
+++ b/backends/yum/yumBackend.py
@@ -589,7 +589,7 @@ class PackageKitYumBackend(PackageKitBaseBackend, PackagekitPackage):
self._handle_collections(fltlist)
except PkError, e:
self.error(e.code, e.details, exit=False)
- values.remove
+ return
# handle newest packages
if GROUP_NEWEST in values:
@@ -1054,9 +1054,9 @@ class PackageKitYumBackend(PackageKitBaseBackend, PackagekitPackage):
deps_list = []
resolve_list = []
- for package in package_ids:
+ for package_id in package_ids:
self.percentage(percentage)
- grp = self._is_meta_package(package)
+ grp = self._is_meta_package(package_id)
if grp:
if not grp.installed:
self.error(ERROR_PACKAGE_NOT_INSTALLED, "The Group %s is not installed" % grp.groupid)
@@ -1068,7 +1068,7 @@ class PackageKitYumBackend(PackageKitBaseBackend, PackagekitPackage):
for txmbr in self.yumbase.tsInfo:
deps_list.append(txmbr.po)
else:
- pkg, inst = self._findPackage(package)
+ pkg, inst = self._findPackage(package_id)
# This simulates the removal of the package
if inst and pkg:
resolve_list.append(pkg)
@@ -1391,18 +1391,18 @@ class PackageKitYumBackend(PackageKitBaseBackend, PackagekitPackage):
grp_pkgs = []
# resolve each package_id to a pkg object
- for package in package_ids:
+ for package_id in package_ids:
self.percentage(percentage)
- grp = self._is_meta_package(package)
+ grp = self._is_meta_package(package_id)
if grp:
pkgs = self._get_group_packages(grp)
grp_pkgs.extend(pkgs)
else:
- pkg, inst = self._findPackage(package)
+ pkg, inst = self._findPackage(package_id)
if pkg:
resolve_list.append(pkg)
else:
- self.error(ERROR_PACKAGE_NOT_FOUND, 'Package %s was not found' % package)
+ self.error(ERROR_PACKAGE_NOT_FOUND, 'Package %s was not found' % package_id)
break
percentage += bump
@@ -1487,7 +1487,6 @@ class PackageKitYumBackend(PackageKitBaseBackend, PackagekitPackage):
'''
Implement the refresh_cache functionality
'''
- # TODO: use force ?
self.allow_cancel(True)
self.percentage(0)
self.status(STATUS_REFRESH_CACHE)
@@ -1630,7 +1629,7 @@ class PackageKitYumBackend(PackageKitBaseBackend, PackagekitPackage):
self.yumbase.deselectGroup(grp.groupid)
txmbr = self.yumbase.selectGroup(grp.groupid)
if not txmbr:
- self.error(ERROR_GROUP_NOT_FOUND, "No packages were found in the %s group for %s." % (grp.groupid, _format_package_id(package_id)));
+ self.error(ERROR_GROUP_NOT_FOUND, "No packages were found in the %s group for %s." % (grp.groupid, _format_package_id(package_id)))
except Exception, e:
self.error(ERROR_INTERNAL_ERROR, _format_str(traceback.format_exc()))
txmbrs.extend(txmbr)
@@ -2063,8 +2062,8 @@ class PackageKitYumBackend(PackageKitBaseBackend, PackagekitPackage):
self.status(STATUS_RUNNING)
txmbrs = []
- for package in package_ids:
- grp = self._is_meta_package(package)
+ for package_id in package_ids:
+ grp = self._is_meta_package(package_id)
if grp:
if not grp.installed:
self.error(ERROR_PACKAGE_NOT_INSTALLED, "This Group %s is not installed" % grp.groupid)
@@ -2074,7 +2073,7 @@ class PackageKitYumBackend(PackageKitBaseBackend, PackagekitPackage):
self.error(ERROR_INTERNAL_ERROR, _format_str(traceback.format_exc()))
txmbrs.extend(txmbr)
else:
- pkg, inst = self._findPackage(package)
+ pkg, inst = self._findPackage(package_id)
if pkg and inst:
try:
txmbr = self.yumbase.remove(po=pkg)
@@ -2116,8 +2115,8 @@ class PackageKitYumBackend(PackageKitBaseBackend, PackagekitPackage):
self.percentage(None)
self.status(STATUS_INFO)
- for package in package_ids:
- grp = self._is_meta_package(package)
+ for package_id in package_ids:
+ grp = self._is_meta_package(package_id)
if grp:
package_id = "%s;;;meta" % grp.groupid
desc = grp.descriptionByLang(self.lang)
@@ -2131,11 +2130,11 @@ class PackageKitYumBackend(PackageKitBaseBackend, PackagekitPackage):
self.details(package_id, "", group, desc, "", size)
else:
- pkg, inst = self._findPackage(package)
+ pkg, inst = self._findPackage(package_id)
if pkg:
self._show_details_pkg(pkg)
else:
- self.error(ERROR_PACKAGE_NOT_FOUND, 'Package %s was not found' % package)
+ self.error(ERROR_PACKAGE_NOT_FOUND, 'Package %s was not found' % package_id)
def _show_details_pkg(self, pkg):
@@ -2169,15 +2168,15 @@ class PackageKitYumBackend(PackageKitBaseBackend, PackagekitPackage):
self.percentage(None)
self.status(STATUS_INFO)
- for package in package_ids:
- pkg, inst = self._findPackage(package)
+ for package_id in package_ids:
+ pkg, inst = self._findPackage(package_id)
if pkg:
files = pkg.returnFileEntries('dir')
files.extend(pkg.returnFileEntries()) # regular files
file_list = ";".join(files)
- self.files(package, file_list)
+ self.files(package_id, file_list)
else:
- self.error(ERROR_PACKAGE_NOT_FOUND, 'Package %s was not found' % package)
+ self.error(ERROR_PACKAGE_NOT_FOUND, 'Package %s was not found' % package_id)
def _pkg_to_id(self, pkg):
pkgver = _get_package_ver(pkg)
@@ -2466,10 +2465,10 @@ class PackageKitYumBackend(PackageKitBaseBackend, PackagekitPackage):
self.allow_cancel(True)
self.percentage(None)
self.status(STATUS_INFO)
- for package in package_ids:
- pkg, inst = self._findPackage(package)
+ for package_id in package_ids:
+ pkg, inst = self._findPackage(package_id)
if pkg == None:
- self.message(MESSAGE_COULD_NOT_FIND_PACKAGE, "could not find %s" % package)
+ self.message(MESSAGE_COULD_NOT_FIND_PACKAGE, "could not find %s" % package_id)
continue
update = self._get_updated(pkg)
obsolete = self._get_obsoleted(pkg.name)
@@ -2522,7 +2521,7 @@ class PackageKitYumBackend(PackageKitBaseBackend, PackagekitPackage):
cve_url = _format_list(urls['cve'])
bz_url = _format_list(urls['bugzilla'])
vendor_url = _format_list(urls['vendor'])
- self.update_detail(package, update, obsolete, vendor_url, bz_url, cve_url, reboot, desc, changelog, state, issued, updated)
+ self.update_detail(package_id, update, obsolete, vendor_url, bz_url, cve_url, reboot, desc, changelog, state, issued, updated)
def repo_set_data(self, repoid, parameter, value):
'''
@@ -2610,7 +2609,7 @@ class PackageKitYumBackend(PackageKitBaseBackend, PackagekitPackage):
self._show_package_list(package_list)
self.percentage(100)
- def install_signature(self, sigtype, key_id, package):
+ def install_signature(self, sigtype, key_id, package_id):
try:
self._check_init()
except PkError, e:
@@ -2620,8 +2619,8 @@ class PackageKitYumBackend(PackageKitBaseBackend, PackagekitPackage):
self.allow_cancel(True)
self.percentage(None)
self.status(STATUS_INFO)
- if package.startswith(';;;'): #This is a repo signature
- repoid = package.split(';')[-1]
+ if package_id.startswith(';;;'): #This is a repo signature
+ repoid = package_id.split(';')[-1]
repo = self.yumbase.repos.getRepo(repoid)
if repo:
try:
@@ -2632,7 +2631,7 @@ class PackageKitYumBackend(PackageKitBaseBackend, PackagekitPackage):
except Exception, e:
self.error(ERROR_GPG_FAILURE, "Error importing GPG Key for the %s repository: %s" % (repo, str(e)))
else: # This is a package signature
- pkg, inst = self._findPackage(package)
+ pkg, inst = self._findPackage(package_id)
if pkg:
try:
self.yumbase.getKeyForPackage(pkg, askcb = lambda x, y, z: True)
@@ -2949,7 +2948,7 @@ class PackageKitYumBase(yum.YumBase):
self.missingGPGKey = None
self.dsCallback = DepSolveCallback(backend)
self.backend = backend
- # TODO: disable until we have a backend we can use by default
+ # disable until we have a backend we can use by default
# self.mediagrabber = self.MediaGrabber
# Setup Repo GPG support callbacks
try:
commit cf95de4ebc9a9e4d432ee760da2cd253374428e4
Author: Richard Hughes <richard at hughsie.com>
Date: Mon Nov 9 12:17:22 2009 +0000
trivial: Fix pkcon get-transactions as it had a conversion error
diff --git a/client/pk-console.c b/client/pk-console.c
index 2b8e171..37a9e1f 100644
--- a/client/pk-console.c
+++ b/client/pk-console.c
@@ -147,7 +147,6 @@ pk_console_transaction_cb (PkTransactionPast *item, gpointer user_data)
gchar **parts;
guint i, lines_len;
gchar *package = NULL;
- gchar *package_id;
gchar *tid;
gchar *timespec;
gboolean succeeded;
@@ -159,7 +158,6 @@ pk_console_transaction_cb (PkTransactionPast *item, gpointer user_data)
/* get data */
g_object_get (item,
- "package-id", &package_id,
"role", &role,
"tid", &tid,
"timespec", ×pec,
@@ -220,7 +218,6 @@ pk_console_transaction_cb (PkTransactionPast *item, gpointer user_data)
g_free (package);
g_strfreev (parts);
}
- g_free (package_id);
g_free (tid);
g_free (timespec);
g_free (cmdline);
commit 221b6c84b7b5186670c77dd347f1cdf4391acaa2
Merge: b8edbb0... 7005e0a...
Author: Richard Hughes <richard at hughsie.com>
Date: Mon Nov 9 11:18:09 2009 +0000
Trivial: fix conflicts
commit e597bc1a0c1105a7ad930e954bfa10d31637e780
Merge: 922c1dd... e926d83...
Author: Sebastian Heinlein <devel at glatzor.de>
Date: Mon Nov 9 11:21:08 2009 +0100
Merge branch 'master' of git+ssh://git.packagekit.org/srv/git/PackageKit
commit 922c1dd90c9eaa16b07a6de6f78af23223147e5f
Author: Sebastian Heinlein <devel at glatzor.de>
Date: Mon Nov 9 11:20:12 2009 +0100
APT: Fix update version sanity check and add the package name to the
error message.
diff --git a/backends/apt/aptBackend.py b/backends/apt/aptBackend.py
index a4b48db..c689f1b 100755
--- a/backends/apt/aptBackend.py
+++ b/backends/apt/aptBackend.py
@@ -1172,11 +1172,12 @@ class PackageKitAptBackend(PackageKitBaseBackend):
self.error(ERROR_PACKAGE_NOT_INSTALLED,
"%s isn't installed" % pkg.name)
# Check if the specified version is an update
- if not apt_pkg.VersionCompare(pkg.installed.version,
- version.version) == -1:
+ if apt_pkg.VersionCompare(pkg.installed.version,
+ version.version) >= 0:
self.error(ERROR_UPDATE_NOT_FOUND,
- "The version %s isn't an update to the current "
- "%s" % (version.version, pkg.installed.version))
+ "The version %s of %s isn't an update to the "
+ "current %s" % (version.version, pkg.name,
+ pkg.installed.version))
pkg.candidate = version
pkgs.append(pkg.name[:])
# Actually should be fixed in python-apt
commit b8edbb09f71fb31dfff29d3376817def858bc1b2
Author: Richard Hughes <richard at hughsie.com>
Date: Thu Oct 22 12:04:44 2009 +0100
Switch to a 100% GObject design in packagekit-glib2, and get rid of the typedef'd PkItemX structures
This allows packagekit-glib2 to be trivially bound by other runtimes
and also allows us to add properties in the future without breaking ABI.
diff --git a/client/pk-console.c b/client/pk-console.c
index 01dd2ec..2b8e171 100644
--- a/client/pk-console.c
+++ b/client/pk-console.c
@@ -86,41 +86,51 @@ pk_strpad (const gchar *data, guint length)
* pk_console_package_cb:
**/
static void
-pk_console_package_cb (const PkItemPackage *item, gpointer data)
+pk_console_package_cb (PkPackage *package, gpointer data)
{
- gchar *package = NULL;
- gchar *package_pad = NULL;
+ gchar *printable = NULL;
+ gchar *printable_pad = NULL;
+ gchar *package_id = NULL;
+ gchar *summary = NULL;
gchar *info_pad = NULL;
gchar **split = NULL;
+ PkInfoEnum info;
+
+ /* get data */
+ g_object_get (package,
+ "info", &info,
+ "package-id", &package_id,
+ "summary", &summary,
+ NULL);
/* ignore finished */
- if (item->info == PK_INFO_ENUM_FINISHED)
+ if (info == PK_INFO_ENUM_FINISHED)
goto out;
/* split */
- split = pk_package_id_split (item->package_id);
+ split = pk_package_id_split (package_id);
if (split == NULL)
goto out;
/* make these all the same length */
- info_pad = pk_strpad (pk_info_enum_to_localised_past (item->info), 12);
+ info_pad = pk_strpad (pk_info_enum_to_localised_past (info), 12);
/* create printable */
- package = pk_package_id_to_printable (item->package_id);
+ printable = pk_package_id_to_printable (package_id);
/* don't pretty print */
if (!is_console) {
- g_print ("%s %s\n", info_pad, package);
+ g_print ("%s %s\n", info_pad, printable);
goto out;
}
/* pad the name-version */
- package_pad = pk_strpad (package, 40);
- g_print ("%s\t%s\t%s\n", info_pad, package_pad, item->summary);
+ printable_pad = pk_strpad (printable, 40);
+ g_print ("%s\t%s\t%s\n", info_pad, printable_pad, summary);
out:
/* free all the data */
- g_free (package);
- g_free (package_pad);
+ g_free (printable);
+ g_free (printable_pad);
g_free (info_pad);
g_strfreev (split);
}
@@ -129,7 +139,7 @@ out:
* pk_console_transaction_cb:
**/
static void
-pk_console_transaction_cb (const PkItemTransaction *item, gpointer user_data)
+pk_console_transaction_cb (PkTransactionPast *item, gpointer user_data)
{
struct passwd *pw;
const gchar *role_text;
@@ -137,30 +147,52 @@ pk_console_transaction_cb (const PkItemTransaction *item, gpointer user_data)
gchar **parts;
guint i, lines_len;
gchar *package = NULL;
+ gchar *package_id;
+ gchar *tid;
+ gchar *timespec;
+ gboolean succeeded;
+ guint duration;
+ gchar *cmdline;
+ guint uid;
+ gchar *data;
+ PkRoleEnum role;
- role_text = pk_role_enum_to_text (item->role);
+ /* get data */
+ g_object_get (item,
+ "package-id", &package_id,
+ "role", &role,
+ "tid", &tid,
+ "timespec", ×pec,
+ "succeeded", &succeeded,
+ "duration", &duration,
+ "cmdline", &cmdline,
+ "uid", &uid,
+ "data", &data,
+ NULL);
+
+ role_text = pk_role_enum_to_text (role);
/* TRANSLATORS: this is an atomic transaction */
- g_print ("%s: %s\n", _("Transaction"), item->tid);
+ g_print ("%s: %s\n", _("Transaction"), tid);
/* TRANSLATORS: this is the time the transaction was started in system timezone */
- g_print (" %s: %s\n", _("System time"), item->timespec);
+ g_print (" %s: %s\n", _("System time"), timespec);
/* TRANSLATORS: this is if the transaction succeeded or not */
- g_print (" %s: %s\n", _("Succeeded"), item->timespec ? _("True") : _("False"));
+ g_print (" %s: %s\n", _("Succeeded"), succeeded ? _("True") : _("False"));
/* TRANSLATORS: this is the transactions role, e.g. "update-system" */
g_print (" %s: %s\n", _("Role"), role_text);
/* only print if not null */
- if (item->duration > 0) {
+ if (duration > 0) {
/* TRANSLATORS: this is The duration of the transaction */
- g_print (" %s: %i %s\n", _("Duration"), item->duration, _("(seconds)"));
+ g_print (" %s: %i %s\n", _("Duration"), duration, _("(seconds)"));
}
/* TRANSLATORS: this is The command line used to do the action */
- g_print (" %s: %s\n", _("Command line"), item->cmdline);
+ g_print (" %s: %s\n", _("Command line"), cmdline);
/* TRANSLATORS: this is the user ID of the user that started the action */
- g_print (" %s: %i\n", _("User ID"), item->uid);
+ g_print (" %s: %i\n", _("User ID"), uid);
/* query real name */
- pw = getpwuid (item->uid);
+ pw = getpwuid (uid);
if (pw != NULL) {
if (pw->pw_name != NULL) {
/* TRANSLATORS: this is the username, e.g. hughsie */
@@ -173,7 +205,7 @@ pk_console_transaction_cb (const PkItemTransaction *item, gpointer user_data)
}
/* TRANSLATORS: these are packages touched by the transaction */
- lines = g_strsplit (item->data, "\n", -1);
+ lines = g_strsplit (data, "\n", -1);
lines_len = g_strv_length (lines);
if (lines_len > 0)
g_print (" %s\n", _("Affected packages:"));
@@ -188,6 +220,11 @@ pk_console_transaction_cb (const PkItemTransaction *item, gpointer user_data)
g_free (package);
g_strfreev (parts);
}
+ g_free (package_id);
+ g_free (tid);
+ g_free (timespec);
+ g_free (cmdline);
+ g_free (data);
g_strfreev (lines);
}
@@ -195,119 +232,196 @@ pk_console_transaction_cb (const PkItemTransaction *item, gpointer user_data)
* pk_console_distro_upgrade_cb:
**/
static void
-pk_console_distro_upgrade_cb (const PkItemDistroUpgrade *item, gpointer user_data)
+pk_console_distro_upgrade_cb (PkDistroUpgrade *item, gpointer user_data)
{
+ gchar *name;
+ gchar *summary;
+ PkDistroUpgradeEnum state;
+
+ /* get data */
+ g_object_get (item,
+ "name", &name,
+ "state", &state,
+ "summary", &summary,
+ NULL);
+
/* TRANSLATORS: this is the distro, e.g. Fedora 10 */
- g_print ("%s: %s\n", _("Distribution"), item->name);
+ g_print ("%s: %s\n", _("Distribution"), name);
/* TRANSLATORS: this is type of update, stable or testing */
- g_print (" %s: %s\n", _("Type"), pk_update_state_enum_to_text (item->state));
+ g_print (" %s: %s\n", _("Type"), pk_update_state_enum_to_text (state));
/* TRANSLATORS: this is any summary text describing the upgrade */
- g_print (" %s: %s\n", _("Summary"), item->summary);
+ g_print (" %s: %s\n", _("Summary"), summary);
+
+ g_free (name);
+ g_free (summary);
}
/**
* pk_console_category_cb:
**/
static void
-pk_console_category_cb (const PkItemCategory *item, gpointer user_data)
+pk_console_category_cb (PkCategory *item, gpointer user_data)
{
+ gchar *name;
+ gchar *cat_id;
+ gchar *parent_id;
+ gchar *summary;
+ gchar *icon;
+
+ /* get data */
+ g_object_get (item,
+ "name", &name,
+ "cat_id", &cat_id,
+ "parent_id", &parent_id,
+ "summary", &summary,
+ "icon", &icon,
+ NULL);
+
/* TRANSLATORS: this is the group category name */
- g_print ("%s: %s\n", _("Category"), item->name);
+ g_print ("%s: %s\n", _("Category"), name);
/* TRANSLATORS: this is group identifier */
- g_print (" %s: %s\n", _("ID"), item->cat_id);
- if (item->parent_id != NULL) {
+ g_print (" %s: %s\n", _("ID"), cat_id);
+ if (parent_id != NULL) {
/* TRANSLATORS: this is the parent group */
- g_print (" %s: %s\n", _("Parent"), item->parent_id);
+ g_print (" %s: %s\n", _("Parent"), parent_id);
}
/* TRANSLATORS: this is the name of the parent group */
- g_print (" %s: %s\n", _("Name"), item->name);
- if (item->summary != NULL) {
+ g_print (" %s: %s\n", _("Name"), name);
+ if (summary != NULL) {
/* TRANSLATORS: this is the summary of the group */
- g_print (" %s: %s\n", _("Summary"), item->summary);
+ g_print (" %s: %s\n", _("Summary"), summary);
}
/* TRANSLATORS: this is preferred icon for the group */
- g_print (" %s: %s\n", _("Icon"), item->icon);
+ g_print (" %s: %s\n", _("Icon"), icon);
+
+ g_free (name);
+ g_free (cat_id);
+ g_free (parent_id);
+ g_free (summary);
+ g_free (icon);
}
/**
* pk_console_update_detail_cb:
**/
static void
-pk_console_update_detail_cb (const PkItemUpdateDetail *detail, gpointer data)
+pk_console_update_detail_cb (PkUpdateDetail *item, gpointer data)
{
+ gchar *package = NULL;
+ gchar *package_id;
+ gchar *updates;
+ gchar *obsoletes;
+ gchar *vendor_url;
+ gchar *bugzilla_url;
+ gchar *cve_url;
+ PkRestartEnum restart;
+ gchar *update_text;
+ gchar *changelog;
+ PkUpdateStateEnum state;
gchar *issued;
gchar *updated;
- gchar *package = NULL;
+
+ /* get data */
+ g_object_get (item,
+ "package-id", &package_id,
+ "updates", &updates,
+ "obsoletes", &obsoletes,
+ "vendor-url", &vendor_url,
+ "bugzilla-url", &bugzilla_url,
+ "cve-url", &cve_url,
+ "restart", &restart,
+ "update-text", &update_text,
+ "changelog", &changelog,
+ "state", &state,
+ "issued", &issued,
+ "updated", &updated,
+ NULL);
/* TRANSLATORS: this is a header for the package that can be updated */
g_print ("%s\n", _("Details about the update:"));
/* create printable */
- package = pk_package_id_to_printable (detail->package_id);
+ package = pk_package_id_to_printable (package_id);
/* TRANSLATORS: details about the update, package name and version */
g_print (" %s: %s\n", _("Package"), package);
- if (detail->updates != NULL) {
+ if (updates != NULL) {
/* TRANSLATORS: details about the update, any packages that this update updates */
- g_print (" %s: %s\n", _("Updates"), detail->updates);
+ g_print (" %s: %s\n", _("Updates"), updates);
}
- if (detail->obsoletes != NULL) {
+ if (obsoletes != NULL) {
/* TRANSLATORS: details about the update, any packages that this update obsoletes */
- g_print (" %s: %s\n", _("Obsoletes"), detail->obsoletes);
+ g_print (" %s: %s\n", _("Obsoletes"), obsoletes);
}
- if (detail->vendor_url != NULL) {
+ if (vendor_url != NULL) {
/* TRANSLATORS: details about the update, the vendor URLs */
- g_print (" %s: %s\n", _("Vendor"), detail->vendor_url);
+ g_print (" %s: %s\n", _("Vendor"), vendor_url);
}
- if (detail->bugzilla_url != NULL) {
+ if (bugzilla_url != NULL) {
/* TRANSLATORS: details about the update, the bugzilla URLs */
- g_print (" %s: %s\n", _("Bugzilla"), detail->bugzilla_url);
+ g_print (" %s: %s\n", _("Bugzilla"), bugzilla_url);
}
- if (detail->cve_url != NULL) {
+ if (cve_url != NULL) {
/* TRANSLATORS: details about the update, the CVE URLs */
- g_print (" %s: %s\n", _("CVE"), detail->cve_url);
+ g_print (" %s: %s\n", _("CVE"), cve_url);
}
- if (detail->restart != PK_RESTART_ENUM_NONE) {
+ if (restart != PK_RESTART_ENUM_NONE) {
/* TRANSLATORS: details about the update, if the package requires a restart */
- g_print (" %s: %s\n", _("Restart"), pk_restart_enum_to_text (detail->restart));
+ g_print (" %s: %s\n", _("Restart"), pk_restart_enum_to_text (restart));
}
- if (detail->update_text != NULL) {
+ if (update_text != NULL) {
/* TRANSLATORS: details about the update, any description of the update */
- g_print (" %s: %s\n", _("Update text"), detail->update_text);
+ g_print (" %s: %s\n", _("Update text"), update_text);
}
- if (detail->changelog != NULL) {
+ if (changelog != NULL) {
/* TRANSLATORS: details about the update, the changelog for the package */
- g_print (" %s: %s\n", _("Changes"), detail->changelog);
+ g_print (" %s: %s\n", _("Changes"), changelog);
}
- if (detail->state != PK_UPDATE_STATE_ENUM_UNKNOWN) {
+ if (state != PK_UPDATE_STATE_ENUM_UNKNOWN) {
/* TRANSLATORS: details about the update, the ongoing state of the update */
- g_print (" %s: %s\n", _("State"), pk_update_state_enum_to_text (detail->state));
+ g_print (" %s: %s\n", _("State"), pk_update_state_enum_to_text (state));
}
- issued = pk_iso8601_from_date (detail->issued);
if (issued != NULL) {
/* TRANSLATORS: details about the update, date the update was issued */
g_print (" %s: %s\n", _("Issued"), issued);
}
- updated = pk_iso8601_from_date (detail->updated);
if (updated != NULL) {
/* TRANSLATORS: details about the update, date the update was updated */
g_print (" %s: %s\n", _("Updated"), updated);
}
+ g_free (package);
+ g_free (package_id);
+ g_free (updates);
+ g_free (obsoletes);
+ g_free (vendor_url);
+ g_free (bugzilla_url);
+ g_free (cve_url);
+ g_free (update_text);
+ g_free (changelog);
g_free (issued);
g_free (updated);
- g_free (package);
}
/**
* pk_console_repo_detail_cb:
**/
static void
-pk_console_repo_detail_cb (const PkItemRepoDetail *item, gpointer data)
+pk_console_repo_detail_cb (PkRepoDetail *item, gpointer data)
{
gchar *enabled_pad;
gchar *repo_pad;
+ gchar *repo_id;
+ gboolean enabled;
+ gchar *description;
- if (item->enabled) {
+ /* get data */
+ g_object_get (item,
+ "repo-id", &repo_id,
+ "enabled", &enabled,
+ "description", &description,
+ NULL);
+
+ if (enabled) {
/* TRANSLATORS: if the repo is enabled */
enabled_pad = pk_strpad (_("Enabled"), 10);
} else {
@@ -315,36 +429,48 @@ pk_console_repo_detail_cb (const PkItemRepoDetail *item, gpointer data)
enabled_pad = pk_strpad (_("Disabled"), 10);
}
- repo_pad = pk_strpad (item->repo_id, 25);
- g_print (" %s %s %s\n", enabled_pad, repo_pad, item->description);
+ repo_pad = pk_strpad (repo_id, 25);
+ g_print (" %s %s %s\n", enabled_pad, repo_pad, description);
g_free (enabled_pad);
g_free (repo_pad);
+ g_free (repo_id);
+ g_free (description);
}
/**
* pk_console_require_restart_cb:
**/
static void
-pk_console_require_restart_cb (const PkItemRequireRestart *item, gpointer data)
+pk_console_require_restart_cb (PkRequireRestart *item, gpointer data)
{
gchar *package = NULL;
+ gchar *package_id;
+ PkRestartEnum restart;
+
+ /* get data */
+ g_object_get (item,
+ "package-id", &package_id,
+ "restart", &restart,
+ NULL);
+
+ g_free (package_id);
/* create printable */
- package = pk_package_id_to_printable (item->package_id);
+ package = pk_package_id_to_printable (package_id);
- if (item->restart == PK_RESTART_ENUM_SYSTEM) {
+ if (restart == PK_RESTART_ENUM_SYSTEM) {
/* TRANSLATORS: a package requires the system to be restarted */
g_print ("%s %s\n", _("System restart required by:"), package);
- } else if (item->restart == PK_RESTART_ENUM_SESSION) {
+ } else if (restart == PK_RESTART_ENUM_SESSION) {
/* TRANSLATORS: a package requires the session to be restarted */
g_print ("%s %s\n", _("Session restart required:"), package);
- } else if (item->restart == PK_RESTART_ENUM_SECURITY_SYSTEM) {
+ } else if (restart == PK_RESTART_ENUM_SECURITY_SYSTEM) {
/* TRANSLATORS: a package requires the system to be restarted due to a security update*/
g_print ("%s %s\n", _("System restart (security) required by:"), package);
- } else if (item->restart == PK_RESTART_ENUM_SECURITY_SESSION) {
+ } else if (restart == PK_RESTART_ENUM_SECURITY_SESSION) {
/* TRANSLATORS: a package requires the session to be restarted due to a security update */
g_print ("%s %s\n", _("Session restart (security) required:"), package);
- } else if (item->restart == PK_RESTART_ENUM_APPLICATION) {
+ } else if (restart == PK_RESTART_ENUM_APPLICATION) {
/* TRANSLATORS: a package requires the application to be restarted */
g_print ("%s %s\n", _("Application restart required by:"), package);
}
@@ -355,22 +481,42 @@ pk_console_require_restart_cb (const PkItemRequireRestart *item, gpointer data)
* pk_console_details_cb:
**/
static void
-pk_console_details_cb (const PkItemDetails *item, gpointer data)
+pk_console_details_cb (PkDetails *item, gpointer data)
{
gchar *package = NULL;
+ gchar *package_id;
+ gchar *license;
+ gchar *description;
+ gchar *url;
+ PkGroupEnum group;
+ guint64 size;
+
+ /* get data */
+ g_object_get (item,
+ "package-id", &package_id,
+ "license", &license,
+ "description", &description,
+ "url", &url,
+ "group", &group,
+ "size", &size,
+ NULL);
/* create printable */
- package = pk_package_id_to_printable (item->package_id);
+ package = pk_package_id_to_printable (package_id);
/* TRANSLATORS: This a list of details about the package */
g_print ("%s\n", _("Package description"));
g_print (" package: %s\n", package);
- g_print (" license: %s\n", item->license);
- g_print (" group: %s\n", pk_group_enum_to_text (item->group));
- g_print (" description: %s\n", item->description);
- g_print (" size: %lu bytes\n", (long unsigned int) item->size);
- g_print (" url: %s\n", item->url);
-
+ g_print (" license: %s\n", license);
+ g_print (" group: %s\n", pk_group_enum_to_text (group));
+ g_print (" description: %s\n", description);
+ g_print (" size: %lu bytes\n", (long unsigned int) size);
+ g_print (" url: %s\n", url);
+
+ g_free (package_id);
+ g_free (license);
+ g_free (description);
+ g_free (url);
g_free (package);
}
@@ -378,32 +524,50 @@ pk_console_details_cb (const PkItemDetails *item, gpointer data)
* pk_console_message_cb:
**/
static void
-pk_console_message_cb (const PkItemMessage *item, gpointer data)
+pk_console_message_cb (PkMessage *item, gpointer data)
{
+ gchar *details;
+ PkMessageEnum type;
+
+ /* get data */
+ g_object_get (item,
+ "details", &details,
+ "type", &type,
+ NULL);
+
/* TRANSLATORS: This a message (like a little note that may be of interest) from the transaction */
- g_print ("%s %s: %s\n", _("Message:"), pk_message_enum_to_text (item->type), item->details);
+ g_print ("%s %s: %s\n", _("Message:"), pk_message_enum_to_text (type), details);
+ g_free (details);
}
/**
* pk_console_files_cb:
**/
static void
-pk_console_files_cb (PkItemFiles *item, gpointer data)
+pk_console_files_cb (PkFiles *item, gpointer data)
{
guint i;
+ gchar **files;
+
+ /* get data */
+ g_object_get (item,
+ "files", &files,
+ NULL);
/* empty */
- if (item->files == NULL || item->files[0] == NULL) {
+ if (files == NULL || files[0] == NULL) {
/* TRANSLATORS: This where the package has no files */
g_print ("%s\n", _("No files"));
- return;
+ goto out;
}
/* TRANSLATORS: This a list files contained in the package */
g_print ("%s\n", _("Package files"));
- for (i=0; item->files[i] != NULL; i++) {
- g_print (" %s\n", item->files[i]);
+ for (i=0; files[i] != NULL; i++) {
+ g_print (" %s\n", files[i]);
}
+out:
+ g_strfreev (files);
}
/**
@@ -458,7 +622,7 @@ pk_console_progress_cb (PkProgress *progress, PkProgressType type, gpointer data
static void
pk_console_finished_cb (GObject *object, GAsyncResult *res, gpointer data)
{
- PkItemErrorCode *error_item = NULL;
+ PkErrorCode *error_code = NULL;
PkResults *results;
GError *error = NULL;
GPtrArray *array;
@@ -478,10 +642,10 @@ pk_console_finished_cb (GObject *object, GAsyncResult *res, gpointer data)
}
/* check error code */
- error_item = pk_results_get_error_code (results);
- if (error_item != NULL) {
+ error_code = pk_results_get_error_code (results);
+ if (error_code != NULL) {
/* TRANSLATORS: the transaction failed in a way we could not expect */
- g_print ("%s: %s, %s\n", _("The transaction failed"), pk_error_enum_to_text (error_item->code), error_item->details);
+ g_print ("%s: %s, %s\n", _("The transaction failed"), pk_error_enum_to_text (pk_error_code_get_code (error_code)), pk_error_code_get_details (error_code));
goto out;
}
@@ -561,8 +725,8 @@ pk_console_finished_cb (GObject *object, GAsyncResult *res, gpointer data)
g_print ("%s\n", _("Please logout and login to complete the update as important security updates have been installed."));
}
out:
- if (error_item != NULL)
- pk_item_error_code_unref (error_item);
+ if (error_code != NULL)
+ g_object_unref (error_code);
if (results != NULL)
g_object_unref (results);
g_main_loop_quit (loop);
diff --git a/client/pk-monitor.c b/client/pk-monitor.c
index 694b1bc..6fd6755 100644
--- a/client/pk-monitor.c
+++ b/client/pk-monitor.c
@@ -95,7 +95,7 @@ pk_monitor_adopt_cb (PkClient *_client, GAsyncResult *res, gpointer user_data)
PkProgress *progress = NULL;
PkExitEnum exit_enum;
gchar *transaction_id = NULL;
- PkItemErrorCode *error_item = NULL;
+ PkErrorCode *error_code = NULL;
/* get the results */
results = pk_client_generic_finish (client, res, &error);
@@ -119,13 +119,13 @@ pk_monitor_adopt_cb (PkClient *_client, GAsyncResult *res, gpointer user_data)
g_print ("%s\texit code: %s\n", transaction_id, pk_exit_enum_to_text (exit_enum));
/* check error code */
- error_item = pk_results_get_error_code (results);
- if (error_item != NULL)
- g_print ("%s\terror code: %s, %s\n", transaction_id, pk_error_enum_to_text (error_item->code), error_item->details);
+ error_code = pk_results_get_error_code (results);
+ if (error_code != NULL)
+ g_print ("%s\terror code: %s, %s\n", transaction_id, pk_error_enum_to_text (pk_error_code_get_code (error_code)), pk_error_code_get_details (error_code));
out:
g_free (transaction_id);
- if (error_item != NULL)
- pk_item_error_code_unref (error_item);
+ if (error_code != NULL)
+ g_object_unref (error_code);
if (progress != NULL)
g_object_unref (progress);
if (results != NULL)
diff --git a/contrib/browser-plugin/pk-plugin-install.c b/contrib/browser-plugin/pk-plugin-install.c
index ef01815..4eeaff3 100644
--- a/contrib/browser-plugin/pk-plugin-install.c
+++ b/contrib/browser-plugin/pk-plugin-install.c
@@ -240,11 +240,13 @@ pk_plugin_install_finished_cb (GObject *object, GAsyncResult *res, PkPluginInsta
GError *error = NULL;
PkResults *results = NULL;
GPtrArray *packages = NULL;
- const PkItemPackage *item;
- guint i;
+ PkPackage *item;
gchar *filename;
gchar **split = NULL;
- PkItemErrorCode *error_item = NULL;
+ PkErrorCode *error_code = NULL;
+ PkInfoEnum info;
+ gchar *package_id = NULL;
+ gchar *summary = NULL;
/* get the results */
results = pk_client_generic_finish (client, res, &error);
@@ -255,20 +257,14 @@ pk_plugin_install_finished_cb (GObject *object, GAsyncResult *res, PkPluginInsta
}
/* check error code */
- error_item = pk_results_get_error_code (results);
- if (error_item != NULL) {
- g_warning ("failed to install: %s, %s", pk_error_enum_to_text (error_item->code), error_item->details);
+ error_code = pk_results_get_error_code (results);
+ if (error_code != NULL) {
+ g_warning ("failed to install: %s, %s", pk_error_enum_to_text (pk_error_code_get_code (error_code)), pk_error_code_get_details (error_code));
goto out;
}
/* get packages */
packages = pk_results_get_package_array (results);
- for (i=0; i<packages->len; i++) {
- item = g_ptr_array_index (packages, i);
- g_debug ("%s\t%s\t%s", pk_info_enum_to_text (item->info), item->package_id, item->summary);
- }
-
- /* no results */
if (packages->len == 0)
goto out;
@@ -278,18 +274,23 @@ pk_plugin_install_finished_cb (GObject *object, GAsyncResult *res, PkPluginInsta
/* choose first package */
item = g_ptr_array_index (packages, 0);
+ g_object_get (item,
+ "info", &info,
+ "package-id", &package_id,
+ "summary", &summary,
+ NULL);
/* if we didn't use displayname, use the summary */
if (self->priv->display_name == NULL)
- self->priv->display_name = g_strdup (item->summary);
+ self->priv->display_name = g_strdup (summary);
/* parse the data */
- if (item->info == PK_INFO_ENUM_AVAILABLE) {
+ if (info == PK_INFO_ENUM_AVAILABLE) {
if (self->priv->status == IN_PROGRESS)
pk_plugin_install_set_status (self, AVAILABLE);
else if (self->priv->status == INSTALLED)
pk_plugin_install_set_status (self, UPGRADABLE);
- split = pk_package_id_split (item->package_id);
+ split = pk_package_id_split (package_id);
pk_plugin_install_set_available_package_name (self, split[0]);
pk_plugin_install_set_available_version (self, split[1]);
g_strfreev (split);
@@ -297,19 +298,19 @@ pk_plugin_install_finished_cb (GObject *object, GAsyncResult *res, PkPluginInsta
/* if we have data from the repo, override the user:
* * we don't want the remote site pretending to install another package
* * it might be localised if the backend supports it */
- if (item->summary != NULL && item->summary[0] != '\0')
- self->priv->display_name = g_strdup (item->summary);
+ if (summary != NULL && summary[0] != '\0')
+ self->priv->display_name = g_strdup (summary);
#endif
pk_plugin_install_clear_layout (self);
pk_plugin_install_refresh (self);
- } else if (item->info == PK_INFO_ENUM_INSTALLED) {
+ } else if (info == PK_INFO_ENUM_INSTALLED) {
if (self->priv->status == IN_PROGRESS)
pk_plugin_install_set_status (self, INSTALLED);
else if (self->priv->status == AVAILABLE)
pk_plugin_install_set_status (self, UPGRADABLE);
- split = pk_package_id_split (item->package_id);
+ split = pk_package_id_split (package_id);
pk_plugin_install_set_installed_package_name (self, split[0]);
pk_plugin_install_set_installed_version (self, split[1]);
g_strfreev (split);
@@ -332,14 +333,17 @@ pk_plugin_install_finished_cb (GObject *object, GAsyncResult *res, PkPluginInsta
pk_plugin_install_refresh (self);
}
out:
+ g_free (package_id);
+ g_free (summary);
+
/* we didn't get any results, or we failed */
if (self->priv->status == IN_PROGRESS) {
pk_plugin_install_set_status (self, UNAVAILABLE);
pk_plugin_install_clear_layout (self);
pk_plugin_install_refresh (self);
}
- if (error_item != NULL)
- pk_item_error_code_unref (error_item);
+ if (error_code != NULL)
+ g_object_unref (error_code);
if (packages != NULL)
g_ptr_array_unref (packages);
if (results != NULL)
diff --git a/contrib/command-not-found/pk-command-not-found.c b/contrib/command-not-found/pk-command-not-found.c
index 3b91e15..fec129e 100644
--- a/contrib/command-not-found/pk-command-not-found.c
+++ b/contrib/command-not-found/pk-command-not-found.c
@@ -394,7 +394,7 @@ pk_cnf_progress_cb (PkProgress *progress, PkProgressType type, gpointer data)
static gchar **
pk_cnf_find_available (const gchar *cmd)
{
- const PkItemPackage *item;
+ PkPackage *item;
gchar **package_ids = NULL;
const gchar *prefixes[] = {"/usr/bin", "/usr/sbin", "/bin", "/sbin", NULL};
gchar **values = NULL;
@@ -404,7 +404,7 @@ pk_cnf_find_available (const gchar *cmd)
guint len;
PkBitfield filters;
PkResults *results = NULL;
- PkItemErrorCode *error_item = NULL;
+ PkErrorCode *error_code = NULL;
/* create new array of full paths */
len = g_strv_length ((gchar **)prefixes);
@@ -424,10 +424,10 @@ pk_cnf_find_available (const gchar *cmd)
}
/* check error code */
- error_item = pk_results_get_error_code (results);
- if (error_item != NULL) {
+ error_code = pk_results_get_error_code (results);
+ if (error_code != NULL) {
/* TRANSLATORS: the transaction failed in a way we could not expect */
- g_print ("%s: %s, %s\n", _("The transaction failed"), pk_error_enum_to_text (error_item->code), error_item->details);
+ g_print ("%s: %s, %s\n", _("The transaction failed"), pk_error_enum_to_text (pk_error_code_get_code (error_code)), pk_error_code_get_details (error_code));
goto out;
}
@@ -436,11 +436,11 @@ pk_cnf_find_available (const gchar *cmd)
package_ids = g_new0 (gchar *, array->len+1);
for (i=0; i<array->len; i++) {
item = g_ptr_array_index (array, i);
- package_ids[i] = g_strdup (item->package_id);
+ package_ids[i] = g_strdup (pk_package_get_id (item));
}
out:
- if (error_item != NULL)
- pk_item_error_code_unref (error_item);
+ if (error_code != NULL)
+ g_object_unref (error_code);
if (results != NULL)
g_object_unref (results);
if (array != NULL)
@@ -577,7 +577,7 @@ pk_cnf_install_package_id (const gchar *package_id)
PkResults *results = NULL;
gchar **package_ids;
gboolean ret = FALSE;
- PkItemErrorCode *error_item = NULL;
+ PkErrorCode *error_code = NULL;
/* do install */
package_ids = pk_package_ids_from_id (package_id);
@@ -591,17 +591,17 @@ pk_cnf_install_package_id (const gchar *package_id)
}
/* check error code */
- error_item = pk_results_get_error_code (results);
- if (error_item != NULL) {
+ error_code = pk_results_get_error_code (results);
+ if (error_code != NULL) {
/* TRANSLATORS: the transaction failed in a way we could not expect */
- g_print ("%s: %s, %s\n", _("The transaction failed"), pk_error_enum_to_text (error_item->code), error_item->details);
+ g_print ("%s: %s, %s\n", _("The transaction failed"), pk_error_enum_to_text (pk_error_code_get_code (error_code)), pk_error_code_get_details (error_code));
goto out;
}
ret = TRUE;
out:
- if (error_item != NULL)
- pk_item_error_code_unref (error_item);
+ if (error_code != NULL)
+ g_object_unref (error_code);
if (results != NULL)
g_object_unref (results);
g_strfreev (package_ids);
diff --git a/contrib/debuginfo-install/pk-debuginfo-install.c b/contrib/debuginfo-install/pk-debuginfo-install.c
index cc12b91..74e2c56 100644
--- a/contrib/debuginfo-install/pk-debuginfo-install.c
+++ b/contrib/debuginfo-install/pk-debuginfo-install.c
@@ -123,7 +123,7 @@ pk_debuginfo_install_enable_repos (PkDebuginfoInstallPrivate *priv, GPtrArray *a
PkResults *results = NULL;
const gchar *repo_id;
GError *error_local = NULL;
- PkItemErrorCode *error_item = NULL;
+ PkErrorCode *error_code = NULL;
/* enable all debuginfo repos we found */
for (i=0; i<array->len; i++) {
@@ -139,9 +139,9 @@ pk_debuginfo_install_enable_repos (PkDebuginfoInstallPrivate *priv, GPtrArray *a
}
/* check error code */
- error_item = pk_results_get_error_code (results);
- if (error_item != NULL) {
- *error = g_error_new (1, 0, "failed to enable repo: %s, %s", pk_error_enum_to_text (error_item->code), error_item->details);
+ error_code = pk_results_get_error_code (results);
+ if (error_code != NULL) {
+ *error = g_error_new (1, 0, "failed to enable repo: %s, %s", pk_error_enum_to_text (pk_error_code_get_code (error_code)), pk_error_code_get_details (error_code));
ret = FALSE;
goto out;
}
@@ -150,8 +150,8 @@ pk_debuginfo_install_enable_repos (PkDebuginfoInstallPrivate *priv, GPtrArray *a
g_object_unref (results);
}
out:
- if (error_item != NULL)
- pk_item_error_code_unref (error_item);
+ if (error_code != NULL)
+ g_object_unref (error_code);
return ret;
}
@@ -188,7 +188,7 @@ pk_debuginfo_install_packages_install (PkDebuginfoInstallPrivate *priv, GPtrArra
PkResults *results = NULL;
gchar **package_ids;
GError *error_local = NULL;
- PkItemErrorCode *error_item = NULL;
+ PkErrorCode *error_code = NULL;
/* mush back into a char** */
package_ids = pk_ptr_array_to_strv (array);
@@ -207,9 +207,9 @@ pk_debuginfo_install_packages_install (PkDebuginfoInstallPrivate *priv, GPtrArra
}
/* check error code */
- error_item = pk_results_get_error_code (results);
- if (error_item != NULL) {
- *error = g_error_new (1, 0, "failed to resolve: %s, %s", pk_error_enum_to_text (error_item->code), error_item->details);
+ error_code = pk_results_get_error_code (results);
+ if (error_code != NULL) {
+ *error = g_error_new (1, 0, "failed to resolve: %s, %s", pk_error_enum_to_text (pk_error_code_get_code (error_code)), pk_error_code_get_details (error_code));
ret = FALSE;
goto out;
}
@@ -217,8 +217,8 @@ pk_debuginfo_install_packages_install (PkDebuginfoInstallPrivate *priv, GPtrArra
/* end progressbar output */
pk_progress_bar_end (priv->progress_bar);
out:
- if (error_item != NULL)
- pk_item_error_code_unref (error_item);
+ if (error_code != NULL)
+ g_object_unref (error_code);
if (results != NULL)
g_object_unref (results);
g_strfreev (package_ids);
@@ -232,12 +232,12 @@ static gchar *
pk_debuginfo_install_resolve_name_to_id (PkDebuginfoInstallPrivate *priv, const gchar *package_name, GError **error)
{
PkResults *results = NULL;
- const PkItemPackage *item;
+ PkPackage *item;
gchar *package_id = NULL;
GPtrArray *list = NULL;
GError *error_local = NULL;
gchar **names;
- PkItemErrorCode *error_item = NULL;
+ PkErrorCode *error_code = NULL;
/* resolve takes a char** */
names = g_strsplit (package_name, ";", -1);
@@ -251,9 +251,9 @@ pk_debuginfo_install_resolve_name_to_id (PkDebuginfoInstallPrivate *priv, const
}
/* check error code */
- error_item = pk_results_get_error_code (results);
- if (error_item != NULL) {
- *error = g_error_new (1, 0, "failed to resolve: %s, %s", pk_error_enum_to_text (error_item->code), error_item->details);
+ error_code = pk_results_get_error_code (results);
+ if (error_code != NULL) {
+ *error = g_error_new (1, 0, "failed to resolve: %s, %s", pk_error_enum_to_text (pk_error_code_get_code (error_code)), pk_error_code_get_details (error_code));
goto out;
}
@@ -270,10 +270,10 @@ pk_debuginfo_install_resolve_name_to_id (PkDebuginfoInstallPrivate *priv, const
/* get the package id */
item = g_ptr_array_index (list, 0);
- package_id = g_strdup (item->package_id);
+ package_id = g_strdup (pk_package_get_id (item));
out:
- if (error_item != NULL)
- pk_item_error_code_unref (error_item);
+ if (error_code != NULL)
+ g_object_unref (error_code);
if (results != NULL)
g_object_unref (results);
if (list != NULL)
@@ -364,7 +364,7 @@ pk_debuginfo_install_add_deps (PkDebuginfoInstallPrivate *priv, GPtrArray *packa
{
gboolean ret = TRUE;
PkResults *results = NULL;
- const PkItemPackage *item;
+ PkPackage *item;
gchar *package_id = NULL;
GPtrArray *list = NULL;
GError *error_local = NULL;
@@ -372,7 +372,7 @@ pk_debuginfo_install_add_deps (PkDebuginfoInstallPrivate *priv, GPtrArray *packa
gchar *name_debuginfo;
guint i;
gchar **split;
- PkItemErrorCode *error_item = NULL;
+ PkErrorCode *error_code = NULL;
/* get depends for them all, not adding dup's */
package_ids = pk_ptr_array_to_strv (packages_search);
@@ -385,9 +385,9 @@ pk_debuginfo_install_add_deps (PkDebuginfoInstallPrivate *priv, GPtrArray *packa
}
/* check error code */
- error_item = pk_results_get_error_code (results);
- if (error_item != NULL) {
- *error = g_error_new (1, 0, "failed to get depends: %s, %s", pk_error_enum_to_text (error_item->code), error_item->details);
+ error_code = pk_results_get_error_code (results);
+ if (error_code != NULL) {
+ *error = g_error_new (1, 0, "failed to get depends: %s, %s", pk_error_enum_to_text (pk_error_code_get_code (error_code)), pk_error_code_get_details (error_code));
ret = FALSE;
goto out;
}
@@ -396,7 +396,7 @@ pk_debuginfo_install_add_deps (PkDebuginfoInstallPrivate *priv, GPtrArray *packa
list = pk_results_get_package_array (results);
for (i=0; i<list->len; i++) {
item = g_ptr_array_index (list, i);
- split = pk_package_id_split (item->package_id);
+ split = pk_package_id_split (pk_package_get_id (item));
/* add -debuginfo */
name_debuginfo = pk_debuginfo_install_name_to_debuginfo (split[PK_PACKAGE_ID_NAME]);
g_strfreev (split);
@@ -423,8 +423,8 @@ pk_debuginfo_install_add_deps (PkDebuginfoInstallPrivate *priv, GPtrArray *packa
g_free (name_debuginfo);
}
out:
- if (error_item != NULL)
- pk_item_error_code_unref (error_item);
+ if (error_code != NULL)
+ g_object_unref (error_code);
if (results != NULL)
g_object_unref (results);
if (list != NULL)
@@ -444,8 +444,10 @@ pk_debuginfo_install_get_repo_list (PkDebuginfoInstallPrivate *priv, GError **er
guint i;
GPtrArray *array;
GError *error_local = NULL;
- const PkItemRepoDetail *item;
- PkItemErrorCode *error_item = NULL;
+ PkRepoDetail *item;
+ PkErrorCode *error_code = NULL;
+ gboolean enabled;
+ gchar *repo_id;
/* get all repo details */
results = pk_client_get_repo_list (priv->client, PK_FILTER_ENUM_NONE, NULL, NULL, NULL, &error_local);
@@ -456,9 +458,9 @@ pk_debuginfo_install_get_repo_list (PkDebuginfoInstallPrivate *priv, GError **er
}
/* check error code */
- error_item = pk_results_get_error_code (results);
- if (error_item != NULL) {
- *error = g_error_new (1, 0, "failed to get repo list: %s, %s", pk_error_enum_to_text (error_item->code), error_item->details);
+ error_code = pk_results_get_error_code (results);
+ if (error_code != NULL) {
+ *error = g_error_new (1, 0, "failed to get repo list: %s, %s", pk_error_enum_to_text (pk_error_code_get_code (error_code)), pk_error_code_get_details (error_code));
goto out;
}
@@ -466,15 +468,19 @@ pk_debuginfo_install_get_repo_list (PkDebuginfoInstallPrivate *priv, GError **er
array = pk_results_get_repo_detail_array (results);
for (i=0; i<array->len; i++) {
item = g_ptr_array_index (array, i);
- if (item->enabled)
- g_ptr_array_add (priv->enabled, g_strdup (item->repo_id));
+ g_object_get (item,
+ "enabled", &enabled,
+ "repo-id", &repo_id,
+ NULL);
+ if (enabled)
+ g_ptr_array_add (priv->enabled, repo_id);
else
- g_ptr_array_add (priv->disabled, g_strdup (item->repo_id));
+ g_ptr_array_add (priv->disabled, repo_id);
}
ret = TRUE;
out:
- if (error_item != NULL)
- pk_item_error_code_unref (error_item);
+ if (error_code != NULL)
+ g_object_unref (error_code);
if (results != NULL)
g_object_unref (results);
return ret;
diff --git a/docs/api/PackageKit-docs.sgml b/docs/api/PackageKit-docs.sgml
index d3821d9..41ae7b5 100644
--- a/docs/api/PackageKit-docs.sgml
+++ b/docs/api/PackageKit-docs.sgml
@@ -64,16 +64,29 @@
This part documents GObjects used in libpackagekit.
</para>
</partintro>
+ <xi:include href="xml/pk-catalog.xml"/>
+ <xi:include href="xml/pk-category.xml"/>
<xi:include href="xml/pk-client.xml"/>
<xi:include href="xml/pk-control.xml"/>
- <xi:include href="xml/pk-task.xml"/>
<xi:include href="xml/pk-desktop.xml"/>
+ <xi:include href="xml/pk-details.xml"/>
+ <xi:include href="xml/pk-distro-upgrade.xml"/>
+ <xi:include href="xml/pk-error-code.xml"/>
+ <xi:include href="xml/pk-eula-required.xml"/>
+ <xi:include href="xml/pk-files.xml"/>
+ <xi:include href="xml/pk-media-change-required.xml"/>
+ <xi:include href="xml/pk-message.xml"/>
+ <xi:include href="xml/pk-package-sack.xml"/>
+ <xi:include href="xml/pk-package.xml"/>
<xi:include href="xml/pk-progress.xml"/>
+ <xi:include href="xml/pk-repo-detail.xml"/>
+ <xi:include href="xml/pk-repo-signature-required.xml"/>
+ <xi:include href="xml/pk-require-restart.xml"/>
<xi:include href="xml/pk-results.xml"/>
- <xi:include href="xml/pk-package.xml"/>
- <xi:include href="xml/pk-package-sack.xml"/>
<xi:include href="xml/pk-service-pack.xml"/>
- <xi:include href="xml/pk-catalog.xml"/>
+ <xi:include href="xml/pk-task.xml"/>
+ <xi:include href="xml/pk-transaction-past.xml"/>
+ <xi:include href="xml/pk-update-detail.xml"/>
</reference>
<reference id="libpackagekit-helpers">
@@ -84,14 +97,13 @@
</para>
</partintro>
<xi:include href="xml/egg-debug.xml"/>
- <xi:include href="xml/pk-common.xml"/>
+ <xi:include href="xml/pk-bitfield.xml"/>
<xi:include href="xml/pk-client-sync.xml"/>
+ <xi:include href="xml/pk-common.xml"/>
<xi:include href="xml/pk-control-sync.xml"/>
<xi:include href="xml/pk-enum.xml"/>
- <xi:include href="xml/pk-bitfield.xml"/>
- <xi:include href="xml/pk-item.xml"/>
- <xi:include href="xml/pk-package-id.xml"/>
<xi:include href="xml/pk-package-ids.xml"/>
+ <xi:include href="xml/pk-package-id.xml"/>
</reference>
<reference id="faq">
diff --git a/docs/migration-glib-to-glib2.txt b/docs/migration-glib-to-glib2.txt
index b0b8c7c..6bcb6d9 100644
--- a/docs/migration-glib-to-glib2.txt
+++ b/docs/migration-glib-to-glib2.txt
@@ -20,7 +20,7 @@ ________________________________________________________________________________
| pk_package_id_get_version | pk_package_id_split() [PK_PACKAGE_ID_VERSION] |
| pk_package_id_get_arch | pk_package_id_split() [PK_PACKAGE_ID_ARCH] |
| pk_package_id_get_data | pk_package_id_split() [PK_PACKAGE_ID_DATA] |
-| PkPackageObj | PkItemPackage |
+| PkPackageObj | PkPackage |
| pk_package_obj_new_from_data() | pk_item_package_new() |
| PkObjList | GPtrArray |
| obj (as in structure references) | item |
diff --git a/lib/packagekit-glib2/Makefile.am b/lib/packagekit-glib2/Makefile.am
index 2aa9227..16336ae 100644
--- a/lib/packagekit-glib2/Makefile.am
+++ b/lib/packagekit-glib2/Makefile.am
@@ -33,23 +33,35 @@ libpackagekit_glib2_include_HEADERS = \
packagekit.h \
pk-bitfield.h \
pk-catalog.h \
+ pk-category.h \
pk-client.h \
pk-client-sync.h \
pk-common.h \
pk-control.h \
pk-control-sync.h \
pk-desktop.h \
+ pk-details.h \
+ pk-distro-upgrade.h \
pk-enum.h \
- pk-item.h \
+ pk-error-code.h \
+ pk-eula-required.h \
+ pk-files.h \
+ pk-media-change-required.h \
+ pk-message.h \
pk-package.h \
pk-package-id.h \
pk-package-ids.h \
pk-package-sack.h \
pk-progress.h \
+ pk-repo-detail.h \
+ pk-repo-signature-required.h \
+ pk-require-restart.h \
pk-results.h \
pk-service-pack.h \
pk-task.h \
+ pk-transaction-past.h \
pk-transaction-list.h \
+ pk-update-detail.h \
pk-version.h \
$(NULL)
@@ -63,6 +75,8 @@ libpackagekit_glib2_la_SOURCES = \
pk-bitfield.h \
pk-catalog.c \
pk-catalog.h \
+ pk-category.c \
+ pk-category.h \
pk-client.c \
pk-client.h \
pk-client-sync.c \
@@ -75,10 +89,24 @@ libpackagekit_glib2_la_SOURCES = \
pk-control-sync.h \
pk-desktop.c \
pk-desktop.h \
+ pk-details.c \
+ pk-details.h \
+ pk-distro-upgrade.c \
+ pk-distro-upgrade.h \
pk-enum.c \
pk-enum.h \
+ pk-error-code.c \
+ pk-error-code.h \
+ pk-eula-required.c \
+ pk-eula-required.h \
+ pk-files.c \
+ pk-files.h \
pk-marshal.c \
pk-marshal.h \
+ pk-media-change-required.c \
+ pk-media-change-required.h \
+ pk-message.c \
+ pk-message.h \
pk-package.c \
pk-package.h \
pk-package-id.c \
@@ -89,16 +117,24 @@ libpackagekit_glib2_la_SOURCES = \
pk-package-sack.h \
pk-progress.c \
pk-progress.h \
- pk-service-pack.c \
- pk-service-pack.h \
+ pk-repo-detail.c \
+ pk-repo-detail.h \
+ pk-repo-signature-required.c \
+ pk-repo-signature-required.h \
+ pk-require-restart.c \
+ pk-require-restart.h \
pk-results.c \
pk-results.h \
- pk-item.c \
- pk-item.h \
+ pk-service-pack.c \
+ pk-service-pack.h \
pk-task.c \
pk-task.h \
+ pk-transaction-past.c \
+ pk-transaction-past.h \
pk-transaction-list.c \
pk-transaction-list.h \
+ pk-update-detail.c \
+ pk-update-detail.h \
pk-version.h \
$(NULL)
diff --git a/lib/packagekit-glib2/packagekit.h b/lib/packagekit-glib2/packagekit.h
index 0129709..44c186d 100644
--- a/lib/packagekit-glib2/packagekit.h
+++ b/lib/packagekit-glib2/packagekit.h
@@ -29,22 +29,35 @@
#define __PACKAGEKIT_H_INSIDE__
#include <packagekit-glib2/pk-catalog.h>
+#include <packagekit-glib2/pk-category.h>
+#include <packagekit-glib2/pk-category.h>
#include <packagekit-glib2/pk-client.h>
#include <packagekit-glib2/pk-client-sync.h>
#include <packagekit-glib2/pk-common.h>
#include <packagekit-glib2/pk-control.h>
#include <packagekit-glib2/pk-control-sync.h>
#include <packagekit-glib2/pk-desktop.h>
+#include <packagekit-glib2/pk-details.h>
+#include <packagekit-glib2/pk-distro-upgrade.h>
#include <packagekit-glib2/pk-enum.h>
-#include <packagekit-glib2/pk-item.h>
+#include <packagekit-glib2/pk-error-code.h>
+#include <packagekit-glib2/pk-eula-required.h>
+#include <packagekit-glib2/pk-files.h>
+#include <packagekit-glib2/pk-media-change-required.h>
+#include <packagekit-glib2/pk-message.h>
#include <packagekit-glib2/pk-package-id.h>
#include <packagekit-glib2/pk-package-ids.h>
#include <packagekit-glib2/pk-package-sack.h>
#include <packagekit-glib2/pk-progress.h>
+#include <packagekit-glib2/pk-repo-detail.h>
+#include <packagekit-glib2/pk-repo-signature-required.h>
+#include <packagekit-glib2/pk-require-restart.h>
#include <packagekit-glib2/pk-results.h>
#include <packagekit-glib2/pk-service-pack.h>
#include <packagekit-glib2/pk-task.h>
+#include <packagekit-glib2/pk-transaction-past.h>
#include <packagekit-glib2/pk-transaction-list.h>
+#include <packagekit-glib2/pk-update-detail.h>
#include <packagekit-glib2/pk-version.h>
#undef __PACKAGEKIT_H_INSIDE__
diff --git a/lib/packagekit-glib2/pk-catalog.c b/lib/packagekit-glib2/pk-catalog.c
index 1047d82..5f94015 100644
--- a/lib/packagekit-glib2/pk-catalog.c
+++ b/lib/packagekit-glib2/pk-catalog.c
@@ -248,8 +248,8 @@ pk_catalog_what_provides_ready_cb (GObject *source_object, GAsyncResult *res, Pk
PkResults *results;
GPtrArray *array = NULL;
guint i;
- PkItemPackage *item;
- PkItemErrorCode *error_item = NULL;
+ PkPackage *package;
+ PkErrorCode *error_code = NULL;
/* get the results */
results = pk_client_generic_finish (client, res, &error);
@@ -260,9 +260,9 @@ pk_catalog_what_provides_ready_cb (GObject *source_object, GAsyncResult *res, Pk
}
/* check error code */
- error_item = pk_results_get_error_code (results);
- if (error_item != NULL) {
- error = g_error_new (1, 0, "failed to search file: %s", error_item->details);
+ error_code = pk_results_get_error_code (results);
+ if (error_code != NULL) {
+ error = g_error_new (1, 0, "failed to search file: %s", pk_error_code_get_details (error_code));
pk_catalog_lookup_state_finish (state, error);
g_error_free (error);
goto out;
@@ -271,16 +271,16 @@ pk_catalog_what_provides_ready_cb (GObject *source_object, GAsyncResult *res, Pk
/* add all the results to the existing list */
array = pk_results_get_package_array (results);
for (i=0; i<array->len; i++) {
- item = g_ptr_array_index (array, i);
- egg_debug ("adding %s", item->package_id);
- g_ptr_array_add (state->array, pk_item_package_ref (item));
+ package = g_ptr_array_index (array, i);
+ egg_debug ("adding %s", pk_package_get_id (package));
+ g_ptr_array_add (state->array, g_object_ref (package));
}
/* there's nothing left to do */
pk_catalog_lookup_state_finish (state, NULL);
out:
- if (error_item != NULL)
- pk_item_error_code_unref (error_item);
+ if (error_code != NULL)
+ g_object_unref (error_code);
if (array != NULL)
g_ptr_array_unref (array);
if (results != NULL)
@@ -317,8 +317,8 @@ pk_catalog_search_file_ready_cb (GObject *source_object, GAsyncResult *res, PkCa
PkResults *results;
GPtrArray *array = NULL;
guint i;
- PkItemPackage *item;
- PkItemErrorCode *error_item = NULL;
+ PkPackage *package;
+ PkErrorCode *error_code = NULL;
/* get the results */
results = pk_client_generic_finish (client, res, &error);
@@ -329,9 +329,9 @@ pk_catalog_search_file_ready_cb (GObject *source_object, GAsyncResult *res, PkCa
}
/* check error code */
- error_item = pk_results_get_error_code (results);
- if (error_item != NULL) {
- error = g_error_new (1, 0, "failed to search file: %s", error_item->details);
+ error_code = pk_results_get_error_code (results);
+ if (error_code != NULL) {
+ error = g_error_new (1, 0, "failed to search file: %s", pk_error_code_get_details (error_code));
pk_catalog_lookup_state_finish (state, error);
g_error_free (error);
goto out;
@@ -340,9 +340,9 @@ pk_catalog_search_file_ready_cb (GObject *source_object, GAsyncResult *res, PkCa
/* add all the results to the existing list */
array = pk_results_get_package_array (results);
for (i=0; i<array->len; i++) {
- item = g_ptr_array_index (array, i);
- egg_debug ("adding %s", item->package_id);
- g_ptr_array_add (state->array, pk_item_package_ref (item));
+ package = g_ptr_array_index (array, i);
+ egg_debug ("adding %s", pk_package_get_id (package));
+ g_ptr_array_add (state->array, g_object_ref (package));
}
/* what-provides */
@@ -354,8 +354,8 @@ pk_catalog_search_file_ready_cb (GObject *source_object, GAsyncResult *res, PkCa
/* just exit without any error as there's nothing to do */
pk_catalog_lookup_state_finish (state, NULL);
out:
- if (error_item != NULL)
- pk_item_error_code_unref (error_item);
+ if (error_code != NULL)
+ g_object_unref (error_code);
if (array != NULL)
g_ptr_array_unref (array);
if (results != NULL)
@@ -392,8 +392,8 @@ pk_catalog_resolve_ready_cb (GObject *source_object, GAsyncResult *res, PkCatalo
PkResults *results;
GPtrArray *array = NULL;
guint i;
- PkItemPackage *item;
- PkItemErrorCode *error_item = NULL;
+ PkPackage *package;
+ PkErrorCode *error_code = NULL;
/* get the results */
results = pk_client_generic_finish (client, res, &error);
@@ -404,9 +404,9 @@ pk_catalog_resolve_ready_cb (GObject *source_object, GAsyncResult *res, PkCatalo
}
/* check error code */
- error_item = pk_results_get_error_code (results);
- if (error_item != NULL) {
- error = g_error_new (1, 0, "failed to resolve: %s", error_item->details);
+ error_code = pk_results_get_error_code (results);
+ if (error_code != NULL) {
+ error = g_error_new (1, 0, "failed to resolve: %s", pk_error_code_get_details (error_code));
pk_catalog_lookup_state_finish (state, error);
g_error_free (error);
goto out;
@@ -415,9 +415,9 @@ pk_catalog_resolve_ready_cb (GObject *source_object, GAsyncResult *res, PkCatalo
/* add all the results to the existing list */
array = pk_results_get_package_array (results);
for (i=0; i<array->len; i++) {
- item = g_ptr_array_index (array, i);
- egg_debug ("adding %s", item->package_id);
- g_ptr_array_add (state->array, pk_item_package_ref (item));
+ package = g_ptr_array_index (array, i);
+ egg_debug ("adding %s", pk_package_get_id (package));
+ g_ptr_array_add (state->array, g_object_ref (package));
}
/* search-file then what-provides */
@@ -433,8 +433,8 @@ pk_catalog_resolve_ready_cb (GObject *source_object, GAsyncResult *res, PkCatalo
/* just exit without any error as there's nothing to do */
pk_catalog_lookup_state_finish (state, NULL);
out:
- if (error_item != NULL)
- pk_item_error_code_unref (error_item);
+ if (error_code != NULL)
+ g_object_unref (error_code);
if (array != NULL)
g_ptr_array_unref (array);
if (results != NULL)
@@ -496,7 +496,7 @@ pk_catalog_lookup_async (PkCatalog *catalog, const gchar *filename, GCancellable
state->array_packages = g_ptr_array_new_with_free_func (g_free);
state->array_files = g_ptr_array_new_with_free_func (g_free);
state->array_provides = g_ptr_array_new_with_free_func (g_free);;
- state->array = g_ptr_array_new_with_free_func ((GDestroyNotify) pk_item_package_unref);
+ state->array = g_ptr_array_new_with_free_func ((GDestroyNotify) g_object_unref);
state->progress_callback = progress_callback;
state->progress_user_data = progress_user_data;
@@ -549,7 +549,7 @@ out:
*
* Gets the result from the asynchronous function.
*
- * Return value: the #GPtrArray of #PkItemPackage's, or %NULL. Free with g_ptr_array_unref()
+ * Return value: the #GPtrArray of #PkPackage's, or %NULL. Free with g_ptr_array_unref()
**/
GPtrArray *
pk_catalog_lookup_finish (PkCatalog *catalog, GAsyncResult *res, GError **error)
@@ -637,7 +637,7 @@ pk_catalog_test_lookup_cb (GObject *object, GAsyncResult *res, EggTest *test)
GError *error = NULL;
GPtrArray *array;
guint i;
- PkItemPackage *item;
+ PkPackage *package;
/* get the results */
array = pk_catalog_lookup_finish (catalog, res, &error);
@@ -655,8 +655,8 @@ pk_catalog_test_lookup_cb (GObject *object, GAsyncResult *res, EggTest *test)
/* list for shits and giggles */
for (i=0; i<array->len; i++) {
- item = g_ptr_array_index (array, i);
- egg_debug ("%i\t%s", i, item->package_id);
+ package = g_ptr_array_index (array, i);
+ egg_debug ("%i\t%s", i, pk_package_get_id (package));
}
out:
if (array != NULL)
diff --git a/lib/packagekit-glib2/pk-category.c b/lib/packagekit-glib2/pk-category.c
new file mode 100644
index 0000000..104b8d6
--- /dev/null
+++ b/lib/packagekit-glib2/pk-category.c
@@ -0,0 +1,228 @@
+/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*-
+ *
+ * Copyright (C) 2009 Richard Hughes <richard at hughsie.com>
+ *
+ * Licensed under the GNU General Public License Version 2
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ */
+
+/**
+ * SECTION:pk-category
+ * @short_description: Category object
+ *
+ * This GObject represents a category in the group system.
+ */
+
+#include "config.h"
+
+#include <glib-object.h>
+
+#include <packagekit-glib2/pk-category.h>
+
+#include "egg-debug.h"
+
+static void pk_category_finalize (GObject *object);
+
+#define PK_CATEGORY_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), PK_TYPE_CATEGORY, PkCategoryPrivate))
+
+/**
+ * PkCategoryPrivate:
+ *
+ * Private #PkCategory data
+ **/
+struct _PkCategoryPrivate
+{
+ gchar *parent_id;
+ gchar *cat_id;
+ gchar *name;
+ gchar *summary;
+ gchar *icon;
+};
+
+enum {
+ PROP_0,
+ PROP_PARENT_ID,
+ PROP_CAT_ID,
+ PROP_NAME,
+ PROP_SUMMARY,
+ PROP_ICON,
+ PROP_LAST
+};
+
+G_DEFINE_TYPE (PkCategory, pk_category, G_TYPE_OBJECT)
+
+/**
+ * pk_category_get_property:
+ **/
+static void
+pk_category_get_property (GObject *object, guint prop_id, GValue *value, GParamSpec *pspec)
+{
+ PkCategory *category = PK_CATEGORY (object);
+ PkCategoryPrivate *priv = category->priv;
+
+ switch (prop_id) {
+ case PROP_PARENT_ID:
+ g_value_set_string (value, priv->parent_id);
+ break;
+ case PROP_CAT_ID:
+ g_value_set_string (value, priv->cat_id);
+ break;
+ case PROP_NAME:
+ g_value_set_string (value, priv->name);
+ break;
+ case PROP_SUMMARY:
+ g_value_set_string (value, priv->summary);
+ break;
+ case PROP_ICON:
+ g_value_set_string (value, priv->icon);
+ break;
+ default:
+ G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
+ break;
+ }
+}
+
+/**
+ * pk_category_set_property:
+ **/
+static void
+pk_category_set_property (GObject *object, guint prop_id, const GValue *value, GParamSpec *pspec)
+{
+ PkCategory *category = PK_CATEGORY (object);
+ PkCategoryPrivate *priv = category->priv;
+
+ switch (prop_id) {
+ case PROP_PARENT_ID:
+ g_free (priv->parent_id);
+ priv->parent_id = g_strdup (g_value_get_string (value));
+ break;
+ case PROP_CAT_ID:
+ g_free (priv->cat_id);
+ priv->cat_id = g_strdup (g_value_get_string (value));
+ break;
+ case PROP_NAME:
+ g_free (priv->name);
+ priv->name = g_strdup (g_value_get_string (value));
+ break;
+ case PROP_SUMMARY:
+ g_free (priv->summary);
+ priv->summary = g_strdup (g_value_get_string (value));
+ break;
+ case PROP_ICON:
+ g_free (priv->icon);
+ priv->icon = g_strdup (g_value_get_string (value));
+ break;
+ default:
+ G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
+ break;
+ }
+}
+
+/**
+ * pk_category_class_init:
+ **/
+static void
+pk_category_class_init (PkCategoryClass *klass)
+{
+ GParamSpec *pspec;
+ GObjectClass *object_class = G_OBJECT_CLASS (klass);
+ object_class->finalize = pk_category_finalize;
+ object_class->get_property = pk_category_get_property;
+ object_class->set_property = pk_category_set_property;
+
+ /**
+ * PkCategory:parent-id:
+ */
+ pspec = g_param_spec_string ("parent-id", NULL, NULL,
+ NULL,
+ G_PARAM_READWRITE);
+ g_object_class_install_property (object_class, PROP_PARENT_ID, pspec);
+
+ /**
+ * PkCategory:cat-id:
+ */
+ pspec = g_param_spec_string ("cat-id", NULL, NULL,
+ NULL,
+ G_PARAM_READWRITE);
+ g_object_class_install_property (object_class, PROP_CAT_ID, pspec);
+
+ /**
+ * PkCategory:name:
+ */
+ pspec = g_param_spec_string ("name", NULL, NULL,
+ NULL,
+ G_PARAM_READWRITE);
+ g_object_class_install_property (object_class, PROP_NAME, pspec);
+
+ /**
+ * PkCategory:summary:
+ */
+ pspec = g_param_spec_string ("summary", NULL, NULL,
+ NULL,
+ G_PARAM_READWRITE);
+ g_object_class_install_property (object_class, PROP_SUMMARY, pspec);
+
+ /**
+ * PkCategory:icon:
+ */
+ pspec = g_param_spec_string ("icon", NULL, NULL,
+ NULL,
+ G_PARAM_READWRITE);
+ g_object_class_install_property (object_class, PROP_ICON, pspec);
+
+ g_type_class_add_private (klass, sizeof (PkCategoryPrivate));
+}
+
+/**
+ * pk_category_init:
+ **/
+static void
+pk_category_init (PkCategory *category)
+{
+ category->priv = PK_CATEGORY_GET_PRIVATE (category);
+}
+
+/**
+ * pk_category_finalize:
+ **/
+static void
+pk_category_finalize (GObject *object)
+{
+ PkCategory *category = PK_CATEGORY (object);
+ PkCategoryPrivate *priv = category->priv;
+
+ g_free (priv->parent_id);
+ g_free (priv->cat_id);
+ g_free (priv->name);
+ g_free (priv->summary);
+ g_free (priv->icon);
+
+ G_OBJECT_CLASS (pk_category_parent_class)->finalize (object);
+}
+
+/**
+ * pk_category_new:
+ *
+ * Return value: a new PkCategory object.
+ **/
+PkCategory *
+pk_category_new (void)
+{
+ PkCategory *category;
+ category = g_object_new (PK_TYPE_CATEGORY, NULL);
+ return PK_CATEGORY (category);
+}
+
diff --git a/lib/packagekit-glib2/pk-category.h b/lib/packagekit-glib2/pk-category.h
new file mode 100644
index 0000000..aea1f02
--- /dev/null
+++ b/lib/packagekit-glib2/pk-category.h
@@ -0,0 +1,67 @@
+/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*-
+ *
+ * Copyright (C) 2009 Richard Hughes <richard at hughsie.com>
+ *
+ * Licensed under the GNU General Public License Version 2
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ */
+
+#if !defined (__PACKAGEKIT_H_INSIDE__) && !defined (PK_COMPILATION)
+#error "Only <packagekit.h> can be included directly."
+#endif
+
+#ifndef __PK_CATEGORY_H
+#define __PK_CATEGORY_H
+
+#include <glib-object.h>
+
+G_BEGIN_DECLS
+
+#define PK_TYPE_CATEGORY (pk_category_get_type ())
+#define PK_CATEGORY(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), PK_TYPE_CATEGORY, PkCategory))
+#define PK_CATEGORY_CLASS(k) (G_TYPE_CHECK_CLASS_CAST((k), PK_TYPE_CATEGORY, PkCategoryClass))
+#define PK_IS_CATEGORY(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), PK_TYPE_CATEGORY))
+#define PK_IS_CATEGORY_CLASS(k) (G_TYPE_CHECK_CLASS_TYPE ((k), PK_TYPE_CATEGORY))
+#define PK_CATEGORY_GET_CLASS(o) (G_TYPE_INSTANCE_GET_CLASS ((o), PK_TYPE_CATEGORY, PkCategoryClass))
+
+typedef struct _PkCategoryPrivate PkCategoryPrivate;
+typedef struct _PkCategory PkCategory;
+typedef struct _PkCategoryClass PkCategoryClass;
+
+struct _PkCategory
+{
+ GObject parent;
+ PkCategoryPrivate *priv;
+};
+
+struct _PkCategoryClass
+{
+ GObjectClass parent_class;
+ /* padding for future expansion */
+ void (*_pk_reserved1) (void);
+ void (*_pk_reserved2) (void);
+ void (*_pk_reserved3) (void);
+ void (*_pk_reserved4) (void);
+ void (*_pk_reserved5) (void);
+};
+
+GType pk_category_get_type (void);
+PkCategory *pk_category_new (void);
+
+G_END_DECLS
+
+#endif /* __PK_CATEGORY_H */
+
diff --git a/lib/packagekit-glib2/pk-client.c b/lib/packagekit-glib2/pk-client.c
index 5900d56..fbaeaf5 100644
--- a/lib/packagekit-glib2/pk-client.c
+++ b/lib/packagekit-glib2/pk-client.c
@@ -655,9 +655,10 @@ pk_client_state_finish (PkClientState *state, const GError *error)
static void
pk_client_copy_finished_remove_old_files (PkClientState *state)
{
- const PkItemFiles *item;
+ PkFiles *item;
GPtrArray *array = NULL;
guint i;
+ gchar **files;
/* get the data */
array = pk_results_get_files_array (state->results);
@@ -667,10 +668,14 @@ pk_client_copy_finished_remove_old_files (PkClientState *state)
/* remove any without dest path */
for (i=0; i < array->len; ) {
item = g_ptr_array_index (array, i);
- if (!g_str_has_prefix (item->files[0], state->directory))
+ g_object_get (item,
+ "files", &files,
+ NULL);
+ if (!g_str_has_prefix (files[0], state->directory))
g_ptr_array_remove_index_fast (array, i);
else
i++;
+ g_strfreev (files);
}
/* we're done modifying the data */
@@ -743,7 +748,7 @@ pk_client_copy_downloaded_file (PkClientState *state, const gchar *package_id, c
gchar **files;
GFile *source;
GFile *destination;
- PkItemFiles *item;
+ PkFiles *item;
/* generate the destination location */
basename = g_path_get_basename (source_file);
@@ -759,11 +764,15 @@ pk_client_copy_downloaded_file (PkClientState *state, const gchar *package_id, c
/* Add the result (as a GStrv) to the results set */
files = g_strsplit (path, ",", -1);
- item = pk_item_files_new (package_id, files);
+ item = pk_files_new ();
+ g_object_set (item,
+ "package-id", package_id,
+ "files", files,
+ NULL);
pk_results_add_files (state->results, item);
/* free everything we've used */
- pk_item_files_unref (item);
+ g_object_unref (item);
g_object_unref (source);
g_object_unref (destination);
g_strfreev (files);
@@ -784,9 +793,11 @@ pk_client_copy_downloaded (PkClientState *state)
guint i;
guint j;
guint len;
- const PkItemFiles *item;
+ PkFiles *item;
GPtrArray *array = NULL;
gboolean ret;
+ gchar *package_id;
+ gchar **files;
/* get data */
array = pk_results_get_files_array (state->results);
@@ -795,7 +806,11 @@ pk_client_copy_downloaded (PkClientState *state)
/* get the number of files to copy */
for (i=0; i < array->len; i++) {
item = g_ptr_array_index (array, i);
- state->refcount += g_strv_length (item->files);
+ g_object_get (item,
+ "files", &files,
+ NULL);
+ state->refcount += g_strv_length (files);
+ g_strfreev (files);
}
egg_debug ("%i files to copy", state->refcount);
@@ -810,8 +825,14 @@ pk_client_copy_downloaded (PkClientState *state)
/* do the copies pipelined */
for (i=0; i < len; i++) {
item = g_ptr_array_index (array, i);
- for (j=0; item->files[j] != NULL; j++)
- pk_client_copy_downloaded_file (state, item->package_id, item->files[j]);
+ g_object_get (item,
+ "package-id", &package_id,
+ "files", &files,
+ NULL);
+ for (j=0; files[j] != NULL; j++)
+ pk_client_copy_downloaded_file (state, package_id, files[j]);
+ g_free (package_id);
+ g_strfreev (files);
}
g_ptr_array_unref (array);
}
@@ -824,7 +845,7 @@ pk_client_finished_cb (DBusGProxy *proxy, const gchar *exit_text, guint runtime,
{
GError *error = NULL;
PkExitEnum exit_enum;
- PkItemErrorCode *error_item = NULL;
+ PkErrorCode *error_code = NULL;
egg_debug ("exit_text=%s", exit_text);
@@ -836,10 +857,10 @@ pk_client_finished_cb (DBusGProxy *proxy, const gchar *exit_text, guint runtime,
if (exit_enum == PK_EXIT_ENUM_FAILED) {
/* get error code and error message */
- error_item = pk_results_get_error_code (state->results);
- if (error_item != NULL) {
+ error_code = pk_results_get_error_code (state->results);
+ if (error_code != NULL) {
/* should only ever have one ErrorCode */
- error = g_error_new (PK_CLIENT_ERROR, 0xFF + error_item->code, "%s", error_item->details);
+ error = g_error_new (PK_CLIENT_ERROR, 0xFF + pk_error_code_get_code (error_code), "%s", pk_error_code_get_details (error_code));
} else {
/* fallback where the daemon didn't sent ErrorCode */
error = g_error_new (PK_CLIENT_ERROR, PK_CLIENT_ERROR_FAILED, "Failed: %s", exit_text);
@@ -858,8 +879,8 @@ pk_client_finished_cb (DBusGProxy *proxy, const gchar *exit_text, guint runtime,
/* we're done */
pk_client_state_finish (state, NULL);
out:
- if (error_item != NULL)
- pk_item_error_code_unref (error_item);
+ if (error_code != NULL)
+ g_object_unref (error_code);
}
/**
@@ -896,16 +917,21 @@ pk_client_package_cb (DBusGProxy *proxy, const gchar *info_text, const gchar *pa
{
gboolean ret;
PkInfoEnum info_enum;
- PkItemPackage *item;
+ PkPackage *item;
PkPackage *package;
g_return_if_fail (PK_IS_CLIENT (state->client));
/* add to results */
info_enum = pk_info_enum_from_text (info_text);
if (info_enum != PK_INFO_ENUM_FINISHED) {
- item = pk_item_package_new (info_enum, package_id, summary);
+ item = pk_package_new ();
+ g_object_set (item,
+ "info", info_enum,
+ "package-id", package_id,
+ "summary", summary,
+ NULL);
pk_results_add_package (state->results, item);
- pk_item_package_unref (item);
+ g_object_unref (item);
}
/* save package-id */
@@ -997,13 +1023,21 @@ pk_client_details_cb (DBusGProxy *proxy, const gchar *package_id, const gchar *l
guint64 size, PkClientState *state)
{
PkGroupEnum group_enum;
- PkItemDetails *item;
+ PkDetails *item;
group_enum = pk_group_enum_from_text (group_text);
/* add to results */
- item = pk_item_details_new (package_id, license, group_enum, description, url, size);
+ item = pk_details_new ();
+ g_object_set (item,
+ "package-id", package_id,
+ "license", license,
+ "group", group_enum,
+ "description", description,
+ "url", url,
+ "size", size,
+ NULL);
pk_results_add_details (state->results, item);
- pk_item_details_unref (item);
+ g_object_unref (item);
}
/**
@@ -1016,46 +1050,59 @@ pk_client_update_detail_cb (DBusGProxy *proxy, const gchar *package_id, const g
const gchar *changelog, const gchar *state_text, const gchar *issued_text,
const gchar *updated_text, PkClientState *state)
{
- GDate *issued;
- GDate *updated;
PkUpdateStateEnum state_enum;
PkRestartEnum restart_enum;
- PkItemUpdateDetail *item;
+ PkUpdateDetail *item;
restart_enum = pk_restart_enum_from_text (restart_text);
state_enum = pk_update_state_enum_from_text (state_text);
- issued = pk_iso8601_to_date (issued_text);
- updated = pk_iso8601_to_date (updated_text);
/* add to results */
- item = pk_item_update_detail_new (package_id, updates, obsoletes, vendor_url,
- bugzilla_url, cve_url, restart_enum, update_text, changelog,
- state_enum, issued, updated);
+ item = pk_update_detail_new ();
+ g_object_set (item,
+ "package-id", package_id,
+ "updates", updates,
+ "obsoletes", obsoletes,
+ "vendor-url", vendor_url,
+ "bugzilla-url", bugzilla_url,
+ "cve-url", cve_url,
+ "restart", restart_enum,
+ "update-text", update_text,
+ "changelog", changelog,
+ "state", state_enum,
+ "issued", issued_text,
+ "updated", updated_text,
+ NULL);
pk_results_add_update_detail (state->results, item);
- pk_item_update_detail_unref (item);
-
- if (issued != NULL)
- g_date_free (issued);
- if (updated != NULL)
- g_date_free (updated);
+ g_object_unref (item);
}
/**
* pk_client_transaction_cb:
*/
static void
-pk_client_transaction_cb (DBusGProxy *proxy, const gchar *old_tid, const gchar *timespec,
+pk_client_transaction_cb (DBusGProxy *proxy, const gchar *tid, const gchar *timespec,
gboolean succeeded, const gchar *role_text, guint duration,
const gchar *data, guint uid, const gchar *cmdline, PkClientState *state)
{
PkRoleEnum role_enum;
- PkItemTransaction *item;
+ PkTransactionPast *item;
role_enum = pk_role_enum_from_text (role_text);
/* add to results */
- item = pk_item_transaction_new (old_tid, timespec, succeeded, role_enum, duration, data, uid, cmdline);
+ item = pk_transaction_past_new ();
+ g_object_set (item,
+ "tid", tid,
+ "timespec", timespec,
+ "succeeded", succeeded,
+ "role", role_enum,
+ "duration", duration,
+ "data", data,
+ "uid", uid,
+ "cmdline", cmdline,
+ NULL);
pk_results_add_transaction (state->results, item);
- pk_item_transaction_unref (item);
+ g_object_unref (item);
}
/**
@@ -1066,13 +1113,18 @@ pk_client_distro_upgrade_cb (DBusGProxy *proxy, const gchar *type_text, const gc
const gchar *summary, PkClientState *state)
{
PkUpdateStateEnum type_enum;
- PkItemDistroUpgrade *item;
+ PkDistroUpgrade *item;
type_enum = pk_update_state_enum_from_text (type_text);
/* add to results */
- item = pk_item_distro_upgrade_new (type_enum, name, summary);
+ item = pk_distro_upgrade_new ();
+ g_object_set (item,
+ "type", type_enum,
+ "name", name,
+ "summary", summary,
+ NULL);
pk_results_add_distro_upgrade (state->results, item);
- pk_item_distro_upgrade_unref (item);
+ g_object_unref (item);
}
/**
@@ -1082,13 +1134,17 @@ static void
pk_client_require_restart_cb (DBusGProxy *proxy, const gchar *restart_text, const gchar *package_id, PkClientState *state)
{
PkRestartEnum restart_enum;
- PkItemRequireRestart *item;
+ PkRequireRestart *item;
restart_enum = pk_restart_enum_from_text (restart_text);
/* add to results */
- item = pk_item_require_restart_new (restart_enum, package_id);
+ item = pk_require_restart_new ();
+ g_object_set (item,
+ "restart", restart_enum,
+ "package-id", package_id,
+ NULL);
pk_results_add_require_restart (state->results, item);
- pk_item_require_restart_unref (item);
+ g_object_unref (item);
}
/**
@@ -1098,12 +1154,19 @@ static void
pk_client_category_cb (DBusGProxy *proxy, const gchar *parent_id, const gchar *cat_id,
const gchar *name, const gchar *summary, const gchar *icon, PkClientState *state)
{
- PkItemCategory *item;
+ PkCategory *item;
/* add to results */
- item = pk_item_category_new (parent_id, cat_id, name, summary, icon);
+ item = pk_category_new ();
+ g_object_set (item,
+ "parent-id", parent_id,
+ "cat-id", cat_id,
+ "name", name,
+ "summary", summary,
+ "icon", icon,
+ NULL);
pk_results_add_category (state->results, item);
- pk_item_category_unref (item);
+ g_object_unref (item);
}
/**
@@ -1113,13 +1176,17 @@ static void
pk_client_files_cb (DBusGProxy *proxy, const gchar *package_id, const gchar *filelist, PkClientState *state)
{
gchar **files;
- PkItemFiles *item;
+ PkFiles *item;
files = g_strsplit (filelist, ";", -1);
/* add to results */
- item = pk_item_files_new (package_id, files);
+ item = pk_files_new ();
+ g_object_set (item,
+ "package-id", package_id,
+ "files", files,
+ NULL);
pk_results_add_files (state->results, item);
- pk_item_files_unref (item);
+ g_object_unref (item);
g_strfreev (files);
}
@@ -1133,14 +1200,23 @@ pk_client_repo_signature_required_cb (DBusGProxy *proxy, const gchar *package_id
const gchar *type_text, PkClientState *state)
{
PkSigTypeEnum type_enum;
- PkItemRepoSignatureRequired *item;
+ PkRepoSignatureRequired *item;
type_enum = pk_sig_type_enum_from_text (type_text);
/* add to results */
- item = pk_item_repo_signature_required_new (package_id, repository_name, key_url, key_userid,
- key_id, key_fingerprint, key_timestamp, type_enum);
+ item = pk_repo_signature_required_new ();
+ g_object_set (item,
+ "package-id", package_id,
+ "repository-name", repository_name,
+ "key-url", key_url,
+ "key-userid", key_userid,
+ "key-id", key_id,
+ "key-fingerprint", key_fingerprint,
+ "key-timestamp", key_timestamp,
+ "type", type_enum,
+ NULL);
pk_results_add_repo_signature_required (state->results, item);
- pk_item_repo_signature_required_unref (item);
+ g_object_unref (item);
}
/**
@@ -1150,12 +1226,18 @@ static void
pk_client_eula_required_cb (DBusGProxy *proxy, const gchar *eula_id, const gchar *package_id,
const gchar *vendor_name, const gchar *license_agreement, PkClientState *state)
{
- PkItemEulaRequired *item;
+ PkEulaRequired *item;
/* add to results */
- item = pk_item_eula_required_new (eula_id, package_id, vendor_name, license_agreement);
+ item = pk_eula_required_new ();
+ g_object_set (item,
+ "eula-id", eula_id,
+ "package-id", package_id,
+ "vendor-name", vendor_name,
+ "license-agreement", license_agreement,
+ NULL);
pk_results_add_eula_required (state->results, item);
- pk_item_eula_required_unref (item);
+ g_object_unref (item);
}
/**
@@ -1166,13 +1248,18 @@ pk_client_media_change_required_cb (DBusGProxy *proxy, const gchar *media_type_t
const gchar *media_id, const gchar *media_text, PkClientState *state)
{
PkMediaTypeEnum media_type_enum;
- PkItemMediaChangeRequired *item;
+ PkMediaChangeRequired *item;
media_type_enum = pk_media_type_enum_from_text (media_type_text);
/* add to results */
- item = pk_item_media_change_required_new (media_type_enum, media_id, media_text);
+ item = pk_media_change_required_new ();
+ g_object_set (item,
+ "media-type", media_type_enum,
+ "media-id", media_id,
+ "media-text", media_text,
+ NULL);
pk_results_add_media_change_required (state->results, item);
- pk_item_media_change_required_unref (item);
+ g_object_unref (item);
}
/**
@@ -1182,12 +1269,17 @@ static void
pk_client_repo_detail_cb (DBusGProxy *proxy, const gchar *repo_id,
const gchar *description, gboolean enabled, PkClientState *state)
{
- PkItemRepoDetail *item;
+ PkRepoDetail *item;
/* add to results */
- item = pk_item_repo_detail_new (repo_id, description, enabled);
+ item = pk_repo_detail_new ();
+ g_object_set (item,
+ "repo-id", repo_id,
+ "description", description,
+ "enabled", enabled,
+ NULL);
pk_results_add_repo_detail (state->results, item);
- pk_item_repo_detail_unref (item);
+ g_object_unref (item);
}
/**
@@ -1197,13 +1289,17 @@ static void
pk_client_error_code_cb (DBusGProxy *proxy, const gchar *code_text, const gchar *details, PkClientState *state)
{
PkErrorCodeEnum code_enum;
- PkItemErrorCode *item;
+ PkErrorCode *item;
code_enum = pk_error_enum_from_text (code_text);
/* add to results */
- item = pk_item_error_code_new (code_enum, details);
+ item = pk_error_code_new ();
+ g_object_set (item,
+ "code", code_enum,
+ "details", details,
+ NULL);
pk_results_set_error_code (state->results, item);
- pk_item_error_code_unref (item);
+ g_object_unref (item);
}
/**
@@ -1213,13 +1309,17 @@ static void
pk_client_message_cb (DBusGProxy *proxy, const gchar *message_text, const gchar *details, PkClientState *state)
{
PkMessageEnum message_enum;
- PkItemMessage *item;
+ PkMessage *item;
message_enum = pk_message_enum_from_text (message_text);
/* add to results */
- item = pk_item_message_new (message_enum, details);
+ item = pk_message_new ();
+ g_object_set (item,
+ "message", message_enum,
+ "details", details,
+ NULL);
pk_results_add_message (state->results, item);
- pk_item_message_unref (item);
+ g_object_unref (item);
}
/**
@@ -3906,8 +4006,6 @@ pk_client_test_resolve_cb (GObject *object, GAsyncResult *res, EggTest *test)
PkResults *results = NULL;
PkExitEnum exit_enum;
GPtrArray *packages;
- const PkItemPackage *item;
- guint i;
gboolean idle;
/* get the results */
@@ -3931,12 +4029,6 @@ pk_client_test_resolve_cb (GObject *object, GAsyncResult *res, EggTest *test)
if (!idle)
egg_test_failed (test, "not idle in finished handler");
- /* list, just for shits and giggles */
- for (i=0; i<packages->len; i++) {
- item = g_ptr_array_index (packages, i);
- egg_debug ("%s\t%s\t%s", pk_info_enum_to_text (item->info), item->package_id, item->summary);
- }
-
if (packages->len != 2)
egg_test_failed (test, "invalid number of packages: %i", packages->len);
@@ -3957,8 +4049,6 @@ pk_client_test_get_details_cb (GObject *object, GAsyncResult *res, EggTest *test
PkResults *results = NULL;
PkExitEnum exit_enum;
GPtrArray *details;
- const PkItemDetails *item;
- guint i;
/* get the results */
results = pk_client_generic_finish (client, res, &error);
@@ -3976,12 +4066,6 @@ pk_client_test_get_details_cb (GObject *object, GAsyncResult *res, EggTest *test
if (details == NULL)
egg_test_failed (test, "no details!");
- /* list, just for shits and giggles */
- for (i=0; i<details->len; i++) {
- item = g_ptr_array_index (details, i);
- egg_debug ("%s\t%s\t%s", item->package_id, item->url, item->description);
- }
-
if (details->len != 1)
egg_test_failed (test, "invalid number of details: %i", details->len);
@@ -4041,7 +4125,7 @@ pk_client_test_search_name_cb (GObject *object, GAsyncResult *res, EggTest *test
GError *error = NULL;
PkResults *results = NULL;
PkExitEnum exit_enum;
- PkItemErrorCode *error_item = NULL;
+ PkErrorCode *error_code = NULL;
/* get the results */
results = pk_client_generic_finish (client, res, &error);
@@ -4056,14 +4140,14 @@ pk_client_test_search_name_cb (GObject *object, GAsyncResult *res, EggTest *test
egg_test_failed (test, "failed to cancel search: %s", pk_exit_enum_to_text (exit_enum));
/* check error code */
- error_item = pk_results_get_error_code (results);
- if (error_item->code != PK_ERROR_ENUM_TRANSACTION_CANCELLED)
- egg_test_failed (test, "failed to get error code: %i", error_item->code);
- if (g_strcmp0 (error_item->details, "The task was stopped successfully") != 0)
- egg_test_failed (test, "failed to get error message: %s", error_item->details);
+ error_code = pk_results_get_error_code (results);
+ if (pk_error_code_get_code (error_code) != PK_ERROR_ENUM_TRANSACTION_CANCELLED)
+ egg_test_failed (test, "failed to get error code: %i", pk_error_code_get_code (error_code));
+ if (g_strcmp0 (pk_error_code_get_details (error_code), "The task was stopped successfully") != 0)
+ egg_test_failed (test, "failed to get error message: %s", pk_error_code_get_details (error_code));
out:
- if (error_item != NULL)
- pk_item_error_code_unref (error_item);
+ if (error_code != NULL)
+ g_object_unref (error_code);
if (results != NULL)
g_object_unref (results);
egg_test_loop_quit (test);
@@ -4112,9 +4196,11 @@ pk_client_test_download_cb (GObject *object, GAsyncResult *res, EggTest *test)
GError *error = NULL;
PkResults *results = NULL;
PkExitEnum exit_enum;
- const PkItemFiles *item;
+ PkFiles *item;
GPtrArray *array = NULL;
guint len;
+ gchar *package_id = NULL;
+ gchar **files = NULL;
/* get the results */
results = pk_client_generic_finish (client, res, &error);
@@ -4135,14 +4221,20 @@ pk_client_test_download_cb (GObject *object, GAsyncResult *res, EggTest *test)
/* check a result */
item = g_ptr_array_index (array, 0);
- if (g_strcmp0 (item->package_id, "powertop-common;1.8-1.fc8;i386;fedora") != 0)
- egg_test_failed (test, "invalid package_id: %s", item->package_id);
- len = g_strv_length (item->files);
+ g_object_get (item,
+ "package-id", &package_id,
+ "files", &files,
+ NULL);
+ if (g_strcmp0 (package_id, "powertop-common;1.8-1.fc8;i386;fedora") != 0)
+ egg_test_failed (test, "invalid package_id: %s", package_id);
+ len = g_strv_length (files);
if (len != 1)
egg_test_failed (test, "invalid number of files: %i", len);
- if (g_strcmp0 (item->files[0], "/tmp/powertop-common-1.8-1.fc8.rpm") != 0)
- egg_test_failed (test, "invalid filename: %s, maybe not rewritten", item->files[0]);
+ if (g_strcmp0 (files[0], "/tmp/powertop-common-1.8-1.fc8.rpm") != 0)
+ egg_test_failed (test, "invalid filename: %s, maybe not rewritten", files[0]);
out:
+ g_strfreev (files);
+ g_free (package_id);
g_ptr_array_unref (array);
if (results != NULL)
g_object_unref (results);
diff --git a/lib/packagekit-glib2/pk-console-shared.c b/lib/packagekit-glib2/pk-console-shared.c
index 89a95a7..e0d6b21 100644
--- a/lib/packagekit-glib2/pk-console-shared.c
+++ b/lib/packagekit-glib2/pk-console-shared.c
@@ -133,7 +133,7 @@ pk_console_get_prompt (const gchar *question, gboolean defaultyes)
* pk_console_resolve_package:
**/
gchar *
-pk_console_resolve_package (PkClient *client, PkBitfield filter, const gchar *package, GError **error)
+pk_console_resolve_package (PkClient *client, PkBitfield filter, const gchar *package_name, GError **error)
{
gchar *package_id = NULL;
gboolean valid;
@@ -142,15 +142,15 @@ pk_console_resolve_package (PkClient *client, PkBitfield filter, const gchar *pa
GPtrArray *array = NULL;
guint i;
gchar *printable;
- const PkItemPackage *item;
+ PkPackage *package;
/* have we passed a complete package_id? */
- valid = pk_package_id_check (package);
+ valid = pk_package_id_check (package_name);
if (valid)
- return g_strdup (package);
+ return g_strdup (package_name);
/* split */
- tmp = g_strsplit (package, ",", -1);
+ tmp = g_strsplit (package_name, ",", -1);
/* get the list of possibles */
results = pk_client_resolve (client, filter, tmp, NULL, NULL, NULL, error);
@@ -160,36 +160,44 @@ pk_console_resolve_package (PkClient *client, PkBitfield filter, const gchar *pa
/* get the packages returned */
array = pk_results_get_package_array (results);
if (array == NULL) {
- *error = g_error_new (1, 0, "did not get package struct for %s", package);
+ *error = g_error_new (1, 0, "did not get package struct for %s", package_name);
goto out;
}
/* nothing found */
if (array->len == 0) {
- *error = g_error_new (1, 0, "could not find %s", package);
+ *error = g_error_new (1, 0, "could not find %s", package_name);
goto out;
}
/* just one thing found */
if (array->len == 1) {
- item = g_ptr_array_index (array, 0);
- package_id = g_strdup (item->package_id);
+ package = g_ptr_array_index (array, 0);
+ g_object_get (package,
+ "package-id", &package_id,
+ NULL);
goto out;
}
/* TRANSLATORS: more than one package could be found that matched, to follow is a list of possible packages */
g_print ("%s\n", _("More than one package matches:"));
for (i=0; i<array->len; i++) {
- item = g_ptr_array_index (array, i);
- printable = pk_package_id_to_printable (item->package_id);
+ package = g_ptr_array_index (array, i);
+ g_object_get (package,
+ "package-id", &package_id,
+ NULL);
+ printable = pk_package_id_to_printable (package_id);
g_print ("%i. %s\n", i+1, printable);
g_free (printable);
+ g_free (package_id);
}
/* TRANSLATORS: This finds out which package in the list to use */
i = pk_console_get_number (_("Please choose the correct package: "), array->len);
- item = g_ptr_array_index (array, i-1);
- package_id = g_strdup (item->package_id);
+ package = g_ptr_array_index (array, i-1);
+ g_object_get (package,
+ "package-id", &package_id,
+ NULL);
out:
if (results != NULL)
g_object_unref (results);
diff --git a/lib/packagekit-glib2/pk-details.c b/lib/packagekit-glib2/pk-details.c
new file mode 100644
index 0000000..7d18768
--- /dev/null
+++ b/lib/packagekit-glib2/pk-details.c
@@ -0,0 +1,245 @@
+/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*-
+ *
+ * Copyright (C) 2009 Richard Hughes <richard at hughsie.com>
+ *
+ * Licensed under the GNU General Public License Version 2
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ */
+
+/**
+ * SECTION:pk-details
+ * @short_description: Details object
+ *
+ * This GObject represents a details from a transaction.
+ * These objects represent single items of data from the transaction, and are
+ * often present in lists (#PkResults) or just refcounted in client programs.
+ */
+
+#include "config.h"
+
+#include <glib-object.h>
+
+#include <packagekit-glib2/pk-details.h>
+#include <packagekit-glib2/pk-enum.h>
+
+#include "egg-debug.h"
+
+static void pk_details_finalize (GObject *object);
+
+#define PK_DETAILS_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), PK_TYPE_DETAILS, PkDetailsPrivate))
+
+/**
+ * PkDetailsPrivate:
+ *
+ * Private #PkDetails data
+ **/
+struct _PkDetailsPrivate
+{
+ gchar *package_id;
+ gchar *license;
+ PkGroupEnum group;
+ gchar *description;
+ gchar *url;
+ guint64 size;
+};
+
+enum {
+ PROP_0,
+ PROP_PACKAGE_ID,
+ PROP_LICENSE,
+ PROP_GROUP,
+ PROP_DESCRIPTION,
+ PROP_URL,
+ PROP_SIZE,
+ PROP_LAST
+};
+
+G_DEFINE_TYPE (PkDetails, pk_details, G_TYPE_OBJECT)
+
+/**
+ * pk_details_get_property:
+ **/
+static void
+pk_details_get_property (GObject *object, guint prop_id, GValue *value, GParamSpec *pspec)
+{
+ PkDetails *details = PK_DETAILS (object);
+ PkDetailsPrivate *priv = details->priv;
+
+ switch (prop_id) {
+ case PROP_PACKAGE_ID:
+ g_value_set_string (value, priv->package_id);
+ break;
+ case PROP_LICENSE:
+ g_value_set_string (value, priv->license);
+ break;
+ case PROP_GROUP:
+ g_value_set_uint (value, priv->group);
+ break;
+ case PROP_DESCRIPTION:
+ g_value_set_string (value, priv->description);
+ break;
+ case PROP_URL:
+ g_value_set_string (value, priv->url);
+ break;
+ case PROP_SIZE:
+ g_value_set_uint64 (value, priv->size);
+ break;
+ default:
+ G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
+ break;
+ }
+}
+
+/**
+ * pk_details_set_property:
+ **/
+static void
+pk_details_set_property (GObject *object, guint prop_id, const GValue *value, GParamSpec *pspec)
+{
+ PkDetails *details = PK_DETAILS (object);
+ PkDetailsPrivate *priv = details->priv;
+
+ switch (prop_id) {
+ case PROP_PACKAGE_ID:
+ g_free (priv->package_id);
+ priv->package_id = g_strdup (g_value_get_string (value));
+ break;
+ case PROP_LICENSE:
+ g_free (priv->license);
+ priv->license = g_strdup (g_value_get_string (value));
+ break;
+ case PROP_GROUP:
+ priv->group = g_value_get_uint (value);
+ break;
+ case PROP_DESCRIPTION:
+ g_free (priv->description);
+ priv->description = g_strdup (g_value_get_string (value));
+ break;
+ case PROP_URL:
+ g_free (priv->url);
+ priv->url = g_strdup (g_value_get_string (value));
+ break;
+ case PROP_SIZE:
+ priv->size = g_value_get_uint64 (value);
+ break;
+ default:
+ G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
+ break;
+ }
+}
+
+/**
+ * pk_details_class_init:
+ **/
+static void
+pk_details_class_init (PkDetailsClass *klass)
+{
+ GParamSpec *pspec;
+ GObjectClass *object_class = G_OBJECT_CLASS (klass);
+ object_class->finalize = pk_details_finalize;
+ object_class->get_property = pk_details_get_property;
+ object_class->set_property = pk_details_set_property;
+
+ /**
+ * PkDetails:package-id:
+ */
+ pspec = g_param_spec_string ("package-id", NULL, NULL,
+ NULL,
+ G_PARAM_READWRITE);
+ g_object_class_install_property (object_class, PROP_PACKAGE_ID, pspec);
+
+ /**
+ * PkDetails:license:
+ */
+ pspec = g_param_spec_string ("license", NULL, NULL,
+ NULL,
+ G_PARAM_READWRITE);
+ g_object_class_install_property (object_class, PROP_LICENSE, pspec);
+
+ /**
+ * PkDetails:group:
+ */
+ pspec = g_param_spec_uint ("group", NULL, NULL,
+ 0, G_MAXUINT, PK_GROUP_ENUM_UNKNOWN,
+ G_PARAM_READWRITE);
+ g_object_class_install_property (object_class, PROP_GROUP, pspec);
+
+ /**
+ * PkDetails:description:
+ */
+ pspec = g_param_spec_string ("description", NULL, NULL,
+ NULL,
+ G_PARAM_READWRITE);
+ g_object_class_install_property (object_class, PROP_DESCRIPTION, pspec);
+
+ /**
+ * PkDetails:url:
+ */
+ pspec = g_param_spec_string ("url", NULL, NULL,
+ NULL,
+ G_PARAM_READWRITE);
+ g_object_class_install_property (object_class, PROP_URL, pspec);
+
+ /**
+ * PkDetails:size:
+ */
+ pspec = g_param_spec_uint64 ("size", NULL, NULL,
+ 0, G_MAXUINT64, 0,
+ G_PARAM_READWRITE);
+ g_object_class_install_property (object_class, PROP_SIZE, pspec);
+
+ g_type_class_add_private (klass, sizeof (PkDetailsPrivate));
+}
+
+/**
+ * pk_details_init:
+ **/
+static void
+pk_details_init (PkDetails *details)
+{
+ details->priv = PK_DETAILS_GET_PRIVATE (details);
+}
+
+/**
+ * pk_details_finalize:
+ **/
+static void
+pk_details_finalize (GObject *object)
+{
+ PkDetails *details = PK_DETAILS (object);
+ PkDetailsPrivate *priv = details->priv;
+
+ g_free (priv->package_id);
+ g_free (priv->license);
+ g_free (priv->description);
+ g_free (priv->url);
+
+ G_OBJECT_CLASS (pk_details_parent_class)->finalize (object);
+}
+
+/**
+ * pk_details_new:
+ *
+ * Return value: a new PkDetails object.
+ **/
+PkDetails *
+pk_details_new (void)
+{
+ PkDetails *details;
+ details = g_object_new (PK_TYPE_DETAILS, NULL);
+ return PK_DETAILS (details);
+}
+
diff --git a/lib/packagekit-glib2/pk-details.h b/lib/packagekit-glib2/pk-details.h
new file mode 100644
index 0000000..e8c6b87
--- /dev/null
+++ b/lib/packagekit-glib2/pk-details.h
@@ -0,0 +1,67 @@
+/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*-
+ *
+ * Copyright (C) 2009 Richard Hughes <richard at hughsie.com>
+ *
+ * Licensed under the GNU General Public License Version 2
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ */
+
+#if !defined (__PACKAGEKIT_H_INSIDE__) && !defined (PK_COMPILATION)
+#error "Only <packagekit.h> can be included directly."
+#endif
+
+#ifndef __PK_DETAILS_H
+#define __PK_DETAILS_H
+
+#include <glib-object.h>
+
+G_BEGIN_DECLS
+
+#define PK_TYPE_DETAILS (pk_details_get_type ())
+#define PK_DETAILS(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), PK_TYPE_DETAILS, PkDetails))
+#define PK_DETAILS_CLASS(k) (G_TYPE_CHECK_CLASS_CAST((k), PK_TYPE_DETAILS, PkDetailsClass))
+#define PK_IS_DETAILS(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), PK_TYPE_DETAILS))
+#define PK_IS_DETAILS_CLASS(k) (G_TYPE_CHECK_CLASS_TYPE ((k), PK_TYPE_DETAILS))
+#define PK_DETAILS_GET_CLASS(o) (G_TYPE_INSTANCE_GET_CLASS ((o), PK_TYPE_DETAILS, PkDetailsClass))
+
+typedef struct _PkDetailsPrivate PkDetailsPrivate;
+typedef struct _PkDetails PkDetails;
+typedef struct _PkDetailsClass PkDetailsClass;
+
+struct _PkDetails
+{
+ GObject parent;
+ PkDetailsPrivate *priv;
+};
+
+struct _PkDetailsClass
+{
+ GObjectClass parent_class;
+ /* padding for future expansion */
+ void (*_pk_reserved1) (void);
+ void (*_pk_reserved2) (void);
+ void (*_pk_reserved3) (void);
+ void (*_pk_reserved4) (void);
+ void (*_pk_reserved5) (void);
+};
+
+GType pk_details_get_type (void);
+PkDetails *pk_details_new (void);
+
+G_END_DECLS
+
+#endif /* __PK_DETAILS_H */
+
diff --git a/lib/packagekit-glib2/pk-distro-upgrade.c b/lib/packagekit-glib2/pk-distro-upgrade.c
new file mode 100644
index 0000000..352373f
--- /dev/null
+++ b/lib/packagekit-glib2/pk-distro-upgrade.c
@@ -0,0 +1,193 @@
+/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*-
+ *
+ * Copyright (C) 2009 Richard Hughes <richard at hughsie.com>
+ *
+ * Licensed under the GNU General Public License Version 2
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ */
+
+/**
+ * SECTION:pk-distro_upgrade
+ * @short_description: DistroUpgrade object
+ *
+ * This GObject represents a distro_upgrade from a transaction.
+ * These objects represent single items of data from the transaction, and are
+ * often present in lists (#PkResults) or just refcounted in client programs.
+ */
+
+#include "config.h"
+
+#include <glib-object.h>
+
+#include <packagekit-glib2/pk-distro-upgrade.h>
+#include <packagekit-glib2/pk-enum.h>
+
+#include "egg-debug.h"
+
+static void pk_distro_upgrade_finalize (GObject *object);
+
+#define PK_DISTRO_UPGRADE_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), PK_TYPE_DISTRO_UPGRADE, PkDistroUpgradePrivate))
+
+/**
+ * PkDistroUpgradePrivate:
+ *
+ * Private #PkDistroUpgrade data
+ **/
+struct _PkDistroUpgradePrivate
+{
+ PkUpdateStateEnum state;
+ gchar *name;
+ gchar *summary;
+};
+
+enum {
+ PROP_0,
+ PROP_STATE,
+ PROP_NAME,
+ PROP_SUMMARY,
+ PROP_LAST
+};
+
+G_DEFINE_TYPE (PkDistroUpgrade, pk_distro_upgrade, G_TYPE_OBJECT)
+
+/**
+ * pk_distro_upgrade_get_property:
+ **/
+static void
+pk_distro_upgrade_get_property (GObject *object, guint prop_id, GValue *value, GParamSpec *pspec)
+{
+ PkDistroUpgrade *distro_upgrade = PK_DISTRO_UPGRADE (object);
+ PkDistroUpgradePrivate *priv = distro_upgrade->priv;
+
+ switch (prop_id) {
+ case PROP_STATE:
+ g_value_set_uint (value, priv->state);
+ break;
+ case PROP_NAME:
+ g_value_set_string (value, priv->name);
+ break;
+ case PROP_SUMMARY:
+ g_value_set_string (value, priv->summary);
+ break;
+ default:
+ G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
+ break;
+ }
+}
+
+/**
+ * pk_distro_upgrade_set_property:
+ **/
+static void
+pk_distro_upgrade_set_property (GObject *object, guint prop_id, const GValue *value, GParamSpec *pspec)
+{
+ PkDistroUpgrade *distro_upgrade = PK_DISTRO_UPGRADE (object);
+ PkDistroUpgradePrivate *priv = distro_upgrade->priv;
+
+ switch (prop_id) {
+ case PROP_STATE:
+ priv->state = g_value_get_uint (value);
+ break;
+ case PROP_NAME:
+ g_free (priv->name);
+ priv->name = g_strdup (g_value_get_string (value));
+ break;
+ case PROP_SUMMARY:
+ g_free (priv->summary);
+ priv->summary = g_strdup (g_value_get_string (value));
+ break;
+ default:
+ G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
+ break;
+ }
+}
+
+/**
+ * pk_distro_upgrade_class_init:
+ **/
+static void
+pk_distro_upgrade_class_init (PkDistroUpgradeClass *klass)
+{
+ GParamSpec *pspec;
+ GObjectClass *object_class = G_OBJECT_CLASS (klass);
+ object_class->finalize = pk_distro_upgrade_finalize;
+ object_class->get_property = pk_distro_upgrade_get_property;
+ object_class->set_property = pk_distro_upgrade_set_property;
+
+ /**
+ * PkDistroUpgrade:state:
+ */
+ pspec = g_param_spec_uint ("state", NULL, NULL,
+ 0, G_MAXUINT, PK_DISTRO_UPGRADE_ENUM_UNKNOWN,
+ G_PARAM_READWRITE);
+ g_object_class_install_property (object_class, PROP_STATE, pspec);
+
+ /**
+ * PkDistroUpgrade:name:
+ */
+ pspec = g_param_spec_string ("name", NULL, NULL,
+ NULL,
+ G_PARAM_READWRITE);
+ g_object_class_install_property (object_class, PROP_NAME, pspec);
+
+ /**
+ * PkDistroUpgrade:summary:
+ */
+ pspec = g_param_spec_string ("summary", NULL, NULL,
+ NULL,
+ G_PARAM_READWRITE);
+ g_object_class_install_property (object_class, PROP_SUMMARY, pspec);
+
+ g_type_class_add_private (klass, sizeof (PkDistroUpgradePrivate));
+}
+
+/**
+ * pk_distro_upgrade_init:
+ **/
+static void
+pk_distro_upgrade_init (PkDistroUpgrade *distro_upgrade)
+{
+ distro_upgrade->priv = PK_DISTRO_UPGRADE_GET_PRIVATE (distro_upgrade);
+}
+
+/**
+ * pk_distro_upgrade_finalize:
+ **/
+static void
+pk_distro_upgrade_finalize (GObject *object)
+{
+ PkDistroUpgrade *distro_upgrade = PK_DISTRO_UPGRADE (object);
+ PkDistroUpgradePrivate *priv = distro_upgrade->priv;
+
+ g_free (priv->name);
+ g_free (priv->summary);
+
+ G_OBJECT_CLASS (pk_distro_upgrade_parent_class)->finalize (object);
+}
+
+/**
+ * pk_distro_upgrade_new:
+ *
+ * Return value: a new PkDistroUpgrade object.
+ **/
+PkDistroUpgrade *
+pk_distro_upgrade_new (void)
+{
+ PkDistroUpgrade *distro_upgrade;
+ distro_upgrade = g_object_new (PK_TYPE_DISTRO_UPGRADE, NULL);
+ return PK_DISTRO_UPGRADE (distro_upgrade);
+}
+
diff --git a/lib/packagekit-glib2/pk-distro-upgrade.h b/lib/packagekit-glib2/pk-distro-upgrade.h
new file mode 100644
index 0000000..de7bc04
--- /dev/null
+++ b/lib/packagekit-glib2/pk-distro-upgrade.h
@@ -0,0 +1,67 @@
+/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*-
+ *
+ * Copyright (C) 2009 Richard Hughes <richard at hughsie.com>
+ *
+ * Licensed under the GNU General Public License Version 2
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ */
+
+#if !defined (__PACKAGEKIT_H_INSIDE__) && !defined (PK_COMPILATION)
+#error "Only <packagekit.h> can be included directly."
+#endif
+
+#ifndef __PK_DISTRO_UPGRADE_H
+#define __PK_DISTRO_UPGRADE_H
+
+#include <glib-object.h>
+
+G_BEGIN_DECLS
+
+#define PK_TYPE_DISTRO_UPGRADE (pk_distro_upgrade_get_type ())
+#define PK_DISTRO_UPGRADE(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), PK_TYPE_DISTRO_UPGRADE, PkDistroUpgrade))
+#define PK_DISTRO_UPGRADE_CLASS(k) (G_TYPE_CHECK_CLASS_CAST((k), PK_TYPE_DISTRO_UPGRADE, PkDistroUpgradeClass))
+#define PK_IS_DISTRO_UPGRADE(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), PK_TYPE_DISTRO_UPGRADE))
+#define PK_IS_DISTRO_UPGRADE_CLASS(k) (G_TYPE_CHECK_CLASS_TYPE ((k), PK_TYPE_DISTRO_UPGRADE))
+#define PK_DISTRO_UPGRADE_GET_CLASS(o) (G_TYPE_INSTANCE_GET_CLASS ((o), PK_TYPE_DISTRO_UPGRADE, PkDistroUpgradeClass))
+
+typedef struct _PkDistroUpgradePrivate PkDistroUpgradePrivate;
+typedef struct _PkDistroUpgrade PkDistroUpgrade;
+typedef struct _PkDistroUpgradeClass PkDistroUpgradeClass;
+
+struct _PkDistroUpgrade
+{
+ GObject parent;
+ PkDistroUpgradePrivate *priv;
+};
+
+struct _PkDistroUpgradeClass
+{
+ GObjectClass parent_class;
+ /* padding for future expansion */
+ void (*_pk_reserved1) (void);
+ void (*_pk_reserved2) (void);
+ void (*_pk_reserved3) (void);
+ void (*_pk_reserved4) (void);
+ void (*_pk_reserved5) (void);
+};
+
+GType pk_distro_upgrade_get_type (void);
+PkDistroUpgrade *pk_distro_upgrade_new (void);
+
+G_END_DECLS
+
+#endif /* __PK_DISTRO_UPGRADE_H */
+
diff --git a/lib/packagekit-glib2/pk-error-code.c b/lib/packagekit-glib2/pk-error-code.c
new file mode 100644
index 0000000..aed3efe
--- /dev/null
+++ b/lib/packagekit-glib2/pk-error-code.c
@@ -0,0 +1,195 @@
+/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*-
+ *
+ * Copyright (C) 2009 Richard Hughes <richard at hughsie.com>
+ *
+ * Licensed under the GNU General Public License Version 2
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ */
+
+/**
+ * SECTION:pk-error_code
+ * @short_description: ErrorCode object
+ *
+ * This GObject represents a error_code from a transaction.
+ * These objects represent single items of data from the transaction, and are
+ * often present in lists (#PkResults) or just refcounted in client programs.
+ */
+
+#include "config.h"
+
+#include <glib-object.h>
+
+#include <packagekit-glib2/pk-error-code.h>
+#include <packagekit-glib2/pk-enum.h>
+
+#include "egg-debug.h"
+
+static void pk_error_code_finalize (GObject *object);
+
+#define PK_ERROR_CODE_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), PK_TYPE_ERROR_CODE, PkErrorCodePrivate))
+
+/**
+ * PkErrorCodePrivate:
+ *
+ * Private #PkErrorCode data
+ **/
+struct _PkErrorCodePrivate
+{
+ PkErrorCodeEnum code;
+ gchar *details;
+};
+
+enum {
+ PROP_0,
+ PROP_CODE,
+ PROP_DETAILS,
+ PROP_LAST
+};
+
+G_DEFINE_TYPE (PkErrorCode, pk_error_code, G_TYPE_OBJECT)
+
+/**
+ * pk_error_code_get_property:
+ **/
+static void
+pk_error_code_get_property (GObject *object, guint prop_id, GValue *value, GParamSpec *pspec)
+{
+ PkErrorCode *error_code = PK_ERROR_CODE (object);
+ PkErrorCodePrivate *priv = error_code->priv;
+
+ switch (prop_id) {
+ case PROP_CODE:
+ g_value_set_uint (value, priv->code);
+ break;
+ case PROP_DETAILS:
+ g_value_set_string (value, priv->details);
+ break;
+ default:
+ G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
+ break;
+ }
+}
+
+/**
+ * pk_error_code_set_property:
+ **/
+static void
+pk_error_code_set_property (GObject *object, guint prop_id, const GValue *value, GParamSpec *pspec)
+{
+ PkErrorCode *error_code = PK_ERROR_CODE (object);
+ PkErrorCodePrivate *priv = error_code->priv;
+
+ switch (prop_id) {
+ case PROP_CODE:
+ priv->code = g_value_get_uint (value);
+ break;
+ case PROP_DETAILS:
+ g_free (priv->details);
+ priv->details = g_strdup (g_value_get_string (value));
+ break;
+ default:
+ G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
+ break;
+ }
+}
+
+/**
+ * pk_error_code_get_code:
+ **/
+PkErrorCodeEnum
+pk_error_code_get_code (PkErrorCode *error_code)
+{
+ g_return_val_if_fail (PK_IS_ERROR_CODE (error_code), 0);
+ return error_code->priv->code;
+}
+
+/**
+ * pk_error_code_get_details:
+ **/
+const gchar *
+pk_error_code_get_details (PkErrorCode *error_code)
+{
+ g_return_val_if_fail (PK_IS_ERROR_CODE (error_code), NULL);
+ return error_code->priv->details;
+}
+
+/**
+ * pk_error_code_class_init:
+ **/
+static void
+pk_error_code_class_init (PkErrorCodeClass *klass)
+{
+ GParamSpec *pspec;
+ GObjectClass *object_class = G_OBJECT_CLASS (klass);
+ object_class->finalize = pk_error_code_finalize;
+ object_class->get_property = pk_error_code_get_property;
+ object_class->set_property = pk_error_code_set_property;
+
+ /**
+ * PkErrorCode:code:
+ */
+ pspec = g_param_spec_uint ("code", NULL, NULL,
+ 0, G_MAXUINT, PK_ERROR_ENUM_UNKNOWN,
+ G_PARAM_READWRITE);
+ g_object_class_install_property (object_class, PROP_CODE, pspec);
+
+ /**
+ * PkErrorCode:details:
+ */
+ pspec = g_param_spec_string ("details", NULL, NULL,
+ NULL,
+ G_PARAM_READWRITE);
+ g_object_class_install_property (object_class, PROP_DETAILS, pspec);
+
+ g_type_class_add_private (klass, sizeof (PkErrorCodePrivate));
+}
+
+/**
+ * pk_error_code_init:
+ **/
+static void
+pk_error_code_init (PkErrorCode *error_code)
+{
+ error_code->priv = PK_ERROR_CODE_GET_PRIVATE (error_code);
+}
+
+/**
+ * pk_error_code_finalize:
+ **/
+static void
+pk_error_code_finalize (GObject *object)
+{
+ PkErrorCode *error_code = PK_ERROR_CODE (object);
+ PkErrorCodePrivate *priv = error_code->priv;
+
+ g_free (priv->details);
+
+ G_OBJECT_CLASS (pk_error_code_parent_class)->finalize (object);
+}
+
+/**
+ * pk_error_code_new:
+ *
+ * Return value: a new PkErrorCode object.
+ **/
+PkErrorCode *
+pk_error_code_new (void)
+{
+ PkErrorCode *error_code;
+ error_code = g_object_new (PK_TYPE_ERROR_CODE, NULL);
+ return PK_ERROR_CODE (error_code);
+}
+
diff --git a/lib/packagekit-glib2/pk-error-code.h b/lib/packagekit-glib2/pk-error-code.h
new file mode 100644
index 0000000..c9406ae
--- /dev/null
+++ b/lib/packagekit-glib2/pk-error-code.h
@@ -0,0 +1,71 @@
+/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*-
+ *
+ * Copyright (C) 2009 Richard Hughes <richard at hughsie.com>
+ *
+ * Licensed under the GNU General Public License Version 2
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ */
+
+#if !defined (__PACKAGEKIT_H_INSIDE__) && !defined (PK_COMPILATION)
+#error "Only <packagekit.h> can be included directly."
+#endif
+
+#ifndef __PK_ERROR_CODE_H
+#define __PK_ERROR_CODE_H
+
+#include <glib-object.h>
+#include <packagekit-glib2/pk-enum.h>
+
+G_BEGIN_DECLS
+
+#define PK_TYPE_ERROR_CODE (pk_error_code_get_type ())
+#define PK_ERROR_CODE(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), PK_TYPE_ERROR_CODE, PkErrorCode))
+#define PK_ERROR_CODE_CLASS(k) (G_TYPE_CHECK_CLASS_CAST((k), PK_TYPE_ERROR_CODE, PkErrorCodeClass))
+#define PK_IS_ERROR_CODE(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), PK_TYPE_ERROR_CODE))
+#define PK_IS_ERROR_CODE_CLASS(k) (G_TYPE_CHECK_CLASS_TYPE ((k), PK_TYPE_ERROR_CODE))
+#define PK_ERROR_CODE_GET_CLASS(o) (G_TYPE_INSTANCE_GET_CLASS ((o), PK_TYPE_ERROR_CODE, PkErrorCodeClass))
+
+typedef struct _PkErrorCodePrivate PkErrorCodePrivate;
+typedef struct _PkErrorCode PkErrorCode;
+typedef struct _PkErrorCodeClass PkErrorCodeClass;
+
+struct _PkErrorCode
+{
+ GObject parent;
+ PkErrorCodePrivate *priv;
+};
+
+struct _PkErrorCodeClass
+{
+ GObjectClass parent_class;
+ /* padding for future expansion */
+ void (*_pk_reserved1) (void);
+ void (*_pk_reserved2) (void);
+ void (*_pk_reserved3) (void);
+ void (*_pk_reserved4) (void);
+ void (*_pk_reserved5) (void);
+};
+
+GType pk_error_code_get_type (void);
+PkErrorCode *pk_error_code_new (void);
+
+PkErrorCodeEnum pk_error_code_get_code (PkErrorCode *error_code);
+const gchar *pk_error_code_get_details (PkErrorCode *error_code);
+
+G_END_DECLS
+
+#endif /* __PK_ERROR_CODE_H */
+
diff --git a/lib/packagekit-glib2/pk-eula-required.c b/lib/packagekit-glib2/pk-eula-required.c
new file mode 100644
index 0000000..1f416ea
--- /dev/null
+++ b/lib/packagekit-glib2/pk-eula-required.c
@@ -0,0 +1,212 @@
+/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*-
+ *
+ * Copyright (C) 2009 Richard Hughes <richard at hughsie.com>
+ *
+ * Licensed under the GNU General Public License Version 2
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ */
+
+/**
+ * SECTION:pk-eula_required
+ * @short_description: EulaRequired object
+ *
+ * This GObject represents a eula_required from a transaction.
+ * These objects represent single items of data from the transaction, and are
+ * often present in lists (#PkResults) or just refcounted in client programs.
+ */
+
+#include "config.h"
+
+#include <glib-object.h>
+
+#include <packagekit-glib2/pk-eula-required.h>
+
+#include "egg-debug.h"
+
+static void pk_eula_required_finalize (GObject *object);
+
+#define PK_EULA_REQUIRED_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), PK_TYPE_EULA_REQUIRED, PkEulaRequiredPrivate))
+
+/**
+ * PkEulaRequiredPrivate:
+ *
+ * Private #PkEulaRequired data
+ **/
+struct _PkEulaRequiredPrivate
+{
+ gchar *eula_id;
+ gchar *package_id;
+ gchar *vendor_name;
+ gchar *license_agreement;
+};
+
+enum {
+ PROP_0,
+ PROP_EULA_ID,
+ PROP_PACKAGE_ID,
+ PROP_VENDOR_NAME,
+ PROP_LICENSE_AGREEMENT,
+ PROP_LAST
+};
+
+G_DEFINE_TYPE (PkEulaRequired, pk_eula_required, G_TYPE_OBJECT)
+
+/**
+ * pk_eula_required_get_property:
+ **/
+static void
+pk_eula_required_get_property (GObject *object, guint prop_id, GValue *value, GParamSpec *pspec)
+{
+ PkEulaRequired *eula_required = PK_EULA_REQUIRED (object);
+ PkEulaRequiredPrivate *priv = eula_required->priv;
+
+ switch (prop_id) {
+ case PROP_EULA_ID:
+ g_value_set_string (value, priv->eula_id);
+ break;
+ case PROP_PACKAGE_ID:
+ g_value_set_string (value, priv->package_id);
+ break;
+ case PROP_VENDOR_NAME:
+ g_value_set_string (value, priv->vendor_name);
+ break;
+ case PROP_LICENSE_AGREEMENT:
+ g_value_set_string (value, priv->license_agreement);
+ break;
+ default:
+ G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
+ break;
+ }
+}
+
+/**
+ * pk_eula_required_set_property:
+ **/
+static void
+pk_eula_required_set_property (GObject *object, guint prop_id, const GValue *value, GParamSpec *pspec)
+{
+ PkEulaRequired *eula_required = PK_EULA_REQUIRED (object);
+ PkEulaRequiredPrivate *priv = eula_required->priv;
+
+ switch (prop_id) {
+ case PROP_EULA_ID:
+ g_free (priv->eula_id);
+ priv->eula_id = g_strdup (g_value_get_string (value));
+ break;
+ case PROP_PACKAGE_ID:
+ g_free (priv->package_id);
+ priv->package_id = g_strdup (g_value_get_string (value));
+ break;
+ case PROP_VENDOR_NAME:
+ g_free (priv->vendor_name);
+ priv->vendor_name = g_strdup (g_value_get_string (value));
+ break;
+ case PROP_LICENSE_AGREEMENT:
+ g_free (priv->license_agreement);
+ priv->license_agreement = g_strdup (g_value_get_string (value));
+ break;
+ default:
+ G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
+ break;
+ }
+}
+
+/**
+ * pk_eula_required_class_init:
+ **/
+static void
+pk_eula_required_class_init (PkEulaRequiredClass *klass)
+{
+ GParamSpec *pspec;
+ GObjectClass *object_class = G_OBJECT_CLASS (klass);
+ object_class->finalize = pk_eula_required_finalize;
+ object_class->get_property = pk_eula_required_get_property;
+ object_class->set_property = pk_eula_required_set_property;
+
+ /**
+ * PkEulaRequired:eula-id:
+ */
+ pspec = g_param_spec_string ("eula-id", NULL, NULL,
+ NULL,
+ G_PARAM_READWRITE);
+ g_object_class_install_property (object_class, PROP_EULA_ID, pspec);
+
+ /**
+ * PkEulaRequired:package-id:
+ */
+ pspec = g_param_spec_string ("package-id", NULL, NULL,
+ NULL,
+ G_PARAM_READWRITE);
+ g_object_class_install_property (object_class, PROP_PACKAGE_ID, pspec);
+
+ /**
+ * PkEulaRequired:vendor-name:
+ */
+ pspec = g_param_spec_string ("vendor-name", NULL, NULL,
+ NULL,
+ G_PARAM_READWRITE);
+ g_object_class_install_property (object_class, PROP_VENDOR_NAME, pspec);
+
+ /**
+ * PkEulaRequired:license-agreement:
+ */
+ pspec = g_param_spec_string ("license-agreement", NULL, NULL,
+ NULL,
+ G_PARAM_READWRITE);
+ g_object_class_install_property (object_class, PROP_LICENSE_AGREEMENT, pspec);
+
+ g_type_class_add_private (klass, sizeof (PkEulaRequiredPrivate));
+}
+
+/**
+ * pk_eula_required_init:
+ **/
+static void
+pk_eula_required_init (PkEulaRequired *eula_required)
+{
+ eula_required->priv = PK_EULA_REQUIRED_GET_PRIVATE (eula_required);
+}
+
+/**
+ * pk_eula_required_finalize:
+ **/
+static void
+pk_eula_required_finalize (GObject *object)
+{
+ PkEulaRequired *eula_required = PK_EULA_REQUIRED (object);
+ PkEulaRequiredPrivate *priv = eula_required->priv;
+
+ g_free (priv->eula_id);
+ g_free (priv->package_id);
+ g_free (priv->vendor_name);
+ g_free (priv->license_agreement);
+
+ G_OBJECT_CLASS (pk_eula_required_parent_class)->finalize (object);
+}
+
+/**
+ * pk_eula_required_new:
+ *
+ * Return value: a new PkEulaRequired object.
+ **/
+PkEulaRequired *
+pk_eula_required_new (void)
+{
+ PkEulaRequired *eula_required;
+ eula_required = g_object_new (PK_TYPE_EULA_REQUIRED, NULL);
+ return PK_EULA_REQUIRED (eula_required);
+}
+
diff --git a/lib/packagekit-glib2/pk-eula-required.h b/lib/packagekit-glib2/pk-eula-required.h
new file mode 100644
index 0000000..9a69b35
--- /dev/null
+++ b/lib/packagekit-glib2/pk-eula-required.h
@@ -0,0 +1,67 @@
+/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*-
+ *
+ * Copyright (C) 2009 Richard Hughes <richard at hughsie.com>
+ *
+ * Licensed under the GNU General Public License Version 2
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ */
+
+#if !defined (__PACKAGEKIT_H_INSIDE__) && !defined (PK_COMPILATION)
+#error "Only <packagekit.h> can be included directly."
+#endif
+
+#ifndef __PK_EULA_REQUIRED_H
+#define __PK_EULA_REQUIRED_H
+
+#include <glib-object.h>
+
+G_BEGIN_DECLS
+
+#define PK_TYPE_EULA_REQUIRED (pk_eula_required_get_type ())
+#define PK_EULA_REQUIRED(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), PK_TYPE_EULA_REQUIRED, PkEulaRequired))
+#define PK_EULA_REQUIRED_CLASS(k) (G_TYPE_CHECK_CLASS_CAST((k), PK_TYPE_EULA_REQUIRED, PkEulaRequiredClass))
+#define PK_IS_EULA_REQUIRED(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), PK_TYPE_EULA_REQUIRED))
+#define PK_IS_EULA_REQUIRED_CLASS(k) (G_TYPE_CHECK_CLASS_TYPE ((k), PK_TYPE_EULA_REQUIRED))
+#define PK_EULA_REQUIRED_GET_CLASS(o) (G_TYPE_INSTANCE_GET_CLASS ((o), PK_TYPE_EULA_REQUIRED, PkEulaRequiredClass))
+
+typedef struct _PkEulaRequiredPrivate PkEulaRequiredPrivate;
+typedef struct _PkEulaRequired PkEulaRequired;
+typedef struct _PkEulaRequiredClass PkEulaRequiredClass;
+
+struct _PkEulaRequired
+{
+ GObject parent;
+ PkEulaRequiredPrivate *priv;
+};
+
+struct _PkEulaRequiredClass
+{
+ GObjectClass parent_class;
+ /* padding for future expansion */
+ void (*_pk_reserved1) (void);
+ void (*_pk_reserved2) (void);
+ void (*_pk_reserved3) (void);
+ void (*_pk_reserved4) (void);
+ void (*_pk_reserved5) (void);
+};
+
+GType pk_eula_required_get_type (void);
+PkEulaRequired *pk_eula_required_new (void);
+
+G_END_DECLS
+
+#endif /* __PK_EULA_REQUIRED_H */
+
diff --git a/lib/packagekit-glib2/pk-files.c b/lib/packagekit-glib2/pk-files.c
new file mode 100644
index 0000000..5d54684
--- /dev/null
+++ b/lib/packagekit-glib2/pk-files.c
@@ -0,0 +1,178 @@
+/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*-
+ *
+ * Copyright (C) 2009 Richard Hughes <richard at hughsie.com>
+ *
+ * Licensed under the GNU General Public License Version 2
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ */
+
+/**
+ * SECTION:pk-files
+ * @short_description: Files object
+ *
+ * This GObject represents a files from a transaction.
+ * These objects represent single items of data from the transaction, and are
+ * often present in lists (#PkResults) or just refcounted in client programs.
+ */
+
+#include "config.h"
+
+#include <glib-object.h>
+
+#include <packagekit-glib2/pk-files.h>
+
+#include "egg-debug.h"
+
+static void pk_files_finalize (GObject *object);
+
+#define PK_FILES_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), PK_TYPE_FILES, PkFilesPrivate))
+
+/**
+ * PkFilesPrivate:
+ *
+ * Private #PkFiles data
+ **/
+struct _PkFilesPrivate
+{
+ gchar *package_id;
+ gchar **files;
+};
+
+enum {
+ PROP_0,
+ PROP_PACKAGE_ID,
+ PROP_FILES,
+ PROP_LAST
+};
+
+G_DEFINE_TYPE (PkFiles, pk_files, G_TYPE_OBJECT)
+
+/**
+ * pk_files_get_property:
+ **/
+static void
+pk_files_get_property (GObject *object, guint prop_id, GValue *value, GParamSpec *pspec)
+{
+ PkFiles *files = PK_FILES (object);
+ PkFilesPrivate *priv = files->priv;
+
+ switch (prop_id) {
+ case PROP_PACKAGE_ID:
+ g_value_set_string (value, priv->package_id);
+ break;
+ case PROP_FILES:
+ g_value_set_boxed (value, priv->files);
+ break;
+ default:
+ G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
+ break;
+ }
+}
+
+/**
+ * pk_files_set_property:
+ **/
+static void
+pk_files_set_property (GObject *object, guint prop_id, const GValue *value, GParamSpec *pspec)
+{
+ PkFiles *files = PK_FILES (object);
+ PkFilesPrivate *priv = files->priv;
+
+ switch (prop_id) {
+ case PROP_PACKAGE_ID:
+ g_free (priv->package_id);
+ priv->package_id = g_strdup (g_value_get_string (value));
+ break;
+ case PROP_FILES:
+ g_strfreev (priv->files);
+ priv->files = g_strdupv (g_value_get_boxed (value));
+ break;
+ default:
+ G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
+ break;
+ }
+}
+
+/**
+ * pk_files_class_init:
+ **/
+static void
+pk_files_class_init (PkFilesClass *klass)
+{
+ GParamSpec *pspec;
+ GObjectClass *object_class = G_OBJECT_CLASS (klass);
+ object_class->finalize = pk_files_finalize;
+ object_class->get_property = pk_files_get_property;
+ object_class->set_property = pk_files_set_property;
+
+ /**
+ * PkFiles:package-id:
+ */
+ pspec = g_param_spec_string ("package-id", NULL, NULL,
+ NULL,
+ G_PARAM_READWRITE);
+ g_object_class_install_property (object_class, PROP_PACKAGE_ID, pspec);
+
+ /**
+ * PkFiles:files:
+ */
+ pspec = g_param_spec_boxed ("files", NULL, NULL,
+ G_TYPE_STRV,
+ G_PARAM_READWRITE);
+ g_object_class_install_property (object_class, PROP_FILES, pspec);
+
+ g_type_class_add_private (klass, sizeof (PkFilesPrivate));
+}
+
+/**
+ * pk_files_init:
+ **/
+static void
+pk_files_init (PkFiles *files)
+{
+ files->priv = PK_FILES_GET_PRIVATE (files);
+ files->priv->package_id = NULL;
+ files->priv->files = NULL;
+}
+
+/**
+ * pk_files_finalize:
+ **/
+static void
+pk_files_finalize (GObject *object)
+{
+ PkFiles *files = PK_FILES (object);
+ PkFilesPrivate *priv = files->priv;
+
+ g_free (priv->package_id);
+ g_strfreev (priv->files);
+
+ G_OBJECT_CLASS (pk_files_parent_class)->finalize (object);
+}
+
+/**
+ * pk_files_new:
+ *
+ * Return value: a new PkFiles object.
+ **/
+PkFiles *
+pk_files_new (void)
+{
+ PkFiles *files;
+ files = g_object_new (PK_TYPE_FILES, NULL);
+ return PK_FILES (files);
+}
+
diff --git a/lib/packagekit-glib2/pk-files.h b/lib/packagekit-glib2/pk-files.h
new file mode 100644
index 0000000..728d99f
--- /dev/null
+++ b/lib/packagekit-glib2/pk-files.h
@@ -0,0 +1,67 @@
+/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*-
+ *
+ * Copyright (C) 2009 Richard Hughes <richard at hughsie.com>
+ *
+ * Licensed under the GNU General Public License Version 2
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ */
+
+#if !defined (__PACKAGEKIT_H_INSIDE__) && !defined (PK_COMPILATION)
+#error "Only <packagekit.h> can be included directly."
+#endif
+
+#ifndef __PK_FILES_H
+#define __PK_FILES_H
+
+#include <glib-object.h>
+
+G_BEGIN_DECLS
+
+#define PK_TYPE_FILES (pk_files_get_type ())
+#define PK_FILES(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), PK_TYPE_FILES, PkFiles))
+#define PK_FILES_CLASS(k) (G_TYPE_CHECK_CLASS_CAST((k), PK_TYPE_FILES, PkFilesClass))
+#define PK_IS_FILES(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), PK_TYPE_FILES))
+#define PK_IS_FILES_CLASS(k) (G_TYPE_CHECK_CLASS_TYPE ((k), PK_TYPE_FILES))
+#define PK_FILES_GET_CLASS(o) (G_TYPE_INSTANCE_GET_CLASS ((o), PK_TYPE_FILES, PkFilesClass))
+
+typedef struct _PkFilesPrivate PkFilesPrivate;
+typedef struct _PkFiles PkFiles;
+typedef struct _PkFilesClass PkFilesClass;
+
+struct _PkFiles
+{
+ GObject parent;
+ PkFilesPrivate *priv;
+};
+
+struct _PkFilesClass
+{
+ GObjectClass parent_class;
+ /* padding for future expansion */
+ void (*_pk_reserved1) (void);
+ void (*_pk_reserved2) (void);
+ void (*_pk_reserved3) (void);
+ void (*_pk_reserved4) (void);
+ void (*_pk_reserved5) (void);
+};
+
+GType pk_files_get_type (void);
+PkFiles *pk_files_new (void);
+
+G_END_DECLS
+
+#endif /* __PK_FILES_H */
+
diff --git a/lib/packagekit-glib2/pk-item.c b/lib/packagekit-glib2/pk-item.c
deleted file mode 100644
index 890bf3e..0000000
--- a/lib/packagekit-glib2/pk-item.c
+++ /dev/null
@@ -1,997 +0,0 @@
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*-
- *
- * Copyright (C) 2009 Richard Hughes <richard at hughsie.com>
- *
- * Licensed under the GNU General Public License Version 2
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
- */
-
-/**
- * SECTION:pk-item
- * @short_description: A single piece of information from a transaction
- *
- * These objects represent single items of data from the transaction, and are
- * often present in lists (#PkResults) or just refcounted in client programs.
- */
-
-#include "config.h"
-
-#include <glib.h>
-
-#include <packagekit-glib2/pk-item.h>
-#include <packagekit-glib2/pk-enum.h>
-
-#include "egg-debug.h"
-
-/**
- * pk_item_package_ref:
- * @item: the #PkItemPackage
- *
- * Increases the reference count by one.
- *
- * Return value: the @item
- **/
-PkItemPackage *
-pk_item_package_ref (PkItemPackage *item)
-{
- g_return_val_if_fail (item != NULL, NULL);
- item->refcount++;
- return item;
-}
-
-/**
- * pk_item_details_ref:
- * @item: the #PkItemDetails
- *
- * Increases the reference count by one.
- *
- * Return value: the @item
- **/
-PkItemDetails *
-pk_item_details_ref (PkItemDetails *item)
-{
- g_return_val_if_fail (item != NULL, NULL);
- item->refcount++;
- return item;
-}
-
-/**
- * pk_item_update_detail_ref:
- * @item: the #PkItemUpdateDetail
- *
- * Increases the reference count by one.
- *
- * Return value: the @item
- **/
-PkItemUpdateDetail *
-pk_item_update_detail_ref (PkItemUpdateDetail *item)
-{
- g_return_val_if_fail (item != NULL, NULL);
- item->refcount++;
- return item;
-}
-
-/**
- * pk_item_category_ref:
- * @item: the #PkItemCategory
- *
- * Increases the reference count by one.
- *
- * Return value: the @item
- **/
-PkItemCategory *
-pk_item_category_ref (PkItemCategory *item)
-{
- g_return_val_if_fail (item != NULL, NULL);
- item->refcount++;
- return item;
-}
-
-/**
- * pk_item_distro_upgrade_ref:
- * @item: the #PkItemDistroUpgrade
- *
- * Increases the reference count by one.
- *
- * Return value: the @item
- **/
-PkItemDistroUpgrade *
-pk_item_distro_upgrade_ref (PkItemDistroUpgrade *item)
-{
- g_return_val_if_fail (item != NULL, NULL);
- item->refcount++;
- return item;
-}
-
-/**
- * pk_item_require_restart_ref:
- * @item: the #PkItemRequireRestart
- *
- * Increases the reference count by one.
- *
- * Return value: the @item
- **/
-PkItemRequireRestart *
-pk_item_require_restart_ref (PkItemRequireRestart *item)
-{
- g_return_val_if_fail (item != NULL, NULL);
- item->refcount++;
- return item;
-}
-
-/**
- * pk_item_transaction_ref:
- * @item: the #PkItemTransaction
- *
- * Increases the reference count by one.
- *
- * Return value: the @item
- **/
-PkItemTransaction *
-pk_item_transaction_ref (PkItemTransaction *item)
-{
- g_return_val_if_fail (item != NULL, NULL);
- item->refcount++;
- return item;
-}
-
-/**
- * pk_item_files_ref:
- * @item: the #PkItemFiles
- *
- * Increases the reference count by one.
- *
- * Return value: the @item
- **/
-PkItemFiles *
-pk_item_files_ref (PkItemFiles *item)
-{
- g_return_val_if_fail (item != NULL, NULL);
- item->refcount++;
- return item;
-}
-
-/**
- * pk_item_repo_signature_required_ref:
- * @item: the #PkItemRepoSignatureRequired
- *
- * Increases the reference count by one.
- *
- * Return value: the @item
- **/
-PkItemRepoSignatureRequired *
-pk_item_repo_signature_required_ref (PkItemRepoSignatureRequired *item)
-{
- g_return_val_if_fail (item != NULL, NULL);
- item->refcount++;
- return item;
-}
-
-/**
- * pk_item_eula_required_ref:
- * @item: the #PkItemEulaRequired
- *
- * Increases the reference count by one.
- *
- * Return value: the @item
- **/
-PkItemEulaRequired *
-pk_item_eula_required_ref (PkItemEulaRequired *item)
-{
- g_return_val_if_fail (item != NULL, NULL);
- item->refcount++;
- return item;
-}
-
-/**
- * pk_item_media_change_required_ref:
- * @item: the #PkItemMediaChangeRequired
- *
- * Increases the reference count by one.
- *
- * Return value: the @item
- **/
-PkItemMediaChangeRequired *
-pk_item_media_change_required_ref (PkItemMediaChangeRequired *item)
-{
- g_return_val_if_fail (item != NULL, NULL);
- item->refcount++;
- return item;
-}
-
-/**
- * pk_item_repo_detail_ref:
- * @item: the #PkItemRepoDetail
- *
- * Increases the reference count by one.
- *
- * Return value: the @item
- **/
-PkItemRepoDetail *
-pk_item_repo_detail_ref (PkItemRepoDetail *item)
-{
- g_return_val_if_fail (item != NULL, NULL);
- item->refcount++;
- return item;
-}
-
-/**
- * pk_item_error_code_ref:
- * @item: the #PkItemErrorCode
- *
- * Increases the reference count by one.
- *
- * Return value: the @item
- **/
-PkItemErrorCode *
-pk_item_error_code_ref (PkItemErrorCode *item)
-{
- g_return_val_if_fail (item != NULL, NULL);
- item->refcount++;
- return item;
-}
-
-/**
- * pk_item_message_ref:
- * @item: the #PkItemMessage
- *
- * Increases the reference count by one.
- *
- * Return value: the @item
- **/
-PkItemMessage *
-pk_item_message_ref (PkItemMessage *item)
-{
- g_return_val_if_fail (item != NULL, NULL);
- item->refcount++;
- return item;
-}
-
-/**
- * pk_item_package_unref:
- * @item: the #PkItemPackage
- *
- * Decreases the reference count by one.
- *
- * Return value: the @item, or %NULL if the object is no longer valid
- **/
-PkItemPackage *
-pk_item_package_unref (PkItemPackage *item)
-{
- g_return_val_if_fail (item != NULL, NULL);
-
- /* post decrement */
- if (item->refcount-- != 0)
- return item;
-
- g_free (item->package_id);
- g_free (item->summary);
- g_free (item);
- return NULL;
-}
-
-/**
- * pk_item_details_unref:
- * @item: the #PkItemDetails
- *
- * Decreases the reference count by one.
- *
- * Return value: the @item, or %NULL if the object is no longer valid
- **/
-PkItemDetails *
-pk_item_details_unref (PkItemDetails *item)
-{
- g_return_val_if_fail (item != NULL, NULL);
-
- /* post decrement */
- if (item->refcount-- != 0)
- return item;
-
- g_free (item->package_id);
- g_free (item->license);
- g_free (item->description);
- g_free (item->url);
- g_free (item);
- return NULL;
-}
-
-/**
- * pk_item_update_detail_unref:
- * @item: the #PkItemUpdateDetail
- *
- * Decreases the reference count by one.
- *
- * Return value: the @item, or %NULL if the object is no longer valid
- **/
-PkItemUpdateDetail *
-pk_item_update_detail_unref (PkItemUpdateDetail *item)
-{
- g_return_val_if_fail (item != NULL, NULL);
-
- /* post decrement */
- if (item->refcount-- != 0)
- return item;
-
- g_free (item->package_id);
- g_free (item->updates);
- g_free (item->obsoletes);
- g_free (item->vendor_url);
- g_free (item->bugzilla_url);
- g_free (item->cve_url);
- g_free (item->update_text);
- g_free (item->changelog);
- if (item->issued != NULL)
- g_date_free (item->issued);
- if (item->updated != NULL)
- g_date_free (item->updated);
- g_free (item);
- return NULL;
-}
-
-/**
- * pk_item_category_unref:
- * @item: the #PkItemCategory
- *
- * Decreases the reference count by one.
- *
- * Return value: the @item, or %NULL if the object is no longer valid
- **/
-PkItemCategory *
-pk_item_category_unref (PkItemCategory *item)
-{
- g_return_val_if_fail (item != NULL, NULL);
-
- /* post decrement */
- if (item->refcount-- != 0)
- return item;
-
- g_free (item->parent_id);
- g_free (item->cat_id);
- g_free (item->name);
- g_free (item->summary);
- g_free (item->icon);
- g_free (item);
- return NULL;
-}
-
-/**
- * pk_item_distro_upgrade_unref:
- * @item: the #PkItemDistroUpgrade
- *
- * Decreases the reference count by one.
- *
- * Return value: the @item, or %NULL if the object is no longer valid
- **/
-PkItemDistroUpgrade *
-pk_item_distro_upgrade_unref (PkItemDistroUpgrade *item)
-{
- g_return_val_if_fail (item != NULL, NULL);
-
- /* post decrement */
- if (item->refcount-- != 0)
- return item;
-
- g_free (item->name);
- g_free (item->summary);
- g_free (item);
- return NULL;
-}
-
-/**
- * pk_item_require_restart_unref:
- * @item: the #PkItemRequireRestart
- *
- * Decreases the reference count by one.
- *
- * Return value: the @item, or %NULL if the object is no longer valid
- **/
-PkItemRequireRestart *
-pk_item_require_restart_unref (PkItemRequireRestart *item)
-{
- g_return_val_if_fail (item != NULL, NULL);
-
- /* post decrement */
- if (item->refcount-- != 0)
- return item;
-
- g_free (item->package_id);
- g_free (item);
- return NULL;
-}
-
-/**
- * pk_item_transaction_unref:
- * @item: the #PkItemTransaction
- *
- * Decreases the reference count by one.
- *
- * Return value: the @item, or %NULL if the object is no longer valid
- **/
-PkItemTransaction *
-pk_item_transaction_unref (PkItemTransaction *item)
-{
- g_return_val_if_fail (item != NULL, NULL);
-
- /* post decrement */
- if (item->refcount-- != 0)
- return item;
-
- g_free (item->tid);
- g_free (item->timespec);
- g_free (item->data);
- g_free (item->cmdline);
- g_free (item);
- return NULL;
-}
-
-/**
- * pk_item_files_unref:
- * @item: the #PkItemFiles
- *
- * Decreases the reference count by one.
- *
- * Return value: the @item, or %NULL if the object is no longer valid
- **/
-PkItemFiles *
-pk_item_files_unref (PkItemFiles *item)
-{
- g_return_val_if_fail (item != NULL, NULL);
-
- /* post decrement */
- if (item->refcount-- != 0)
- return item;
-
- g_free (item->package_id);
- g_strfreev (item->files);
- g_free (item);
- return NULL;
-}
-
-/**
- * pk_item_repo_signature_required_unref:
- * @item: the #PkItemRepoSignatureRequired
- *
- * Decreases the reference count by one.
- *
- * Return value: the @item, or %NULL if the object is no longer valid
- **/
-PkItemRepoSignatureRequired *
-pk_item_repo_signature_required_unref (PkItemRepoSignatureRequired *item)
-{
- g_return_val_if_fail (item != NULL, NULL);
-
- /* post decrement */
- if (item->refcount-- != 0)
- return item;
-
- g_free (item->package_id);
- g_free (item->repository_name);
- g_free (item->key_url);
- g_free (item->key_userid);
- g_free (item->key_id);
- g_free (item->key_fingerprint);
- g_free (item->key_timestamp);
- g_free (item);
- return NULL;
-}
-
-/**
- * pk_item_eula_required_unref:
- * @item: the #PkItemEulaRequired
- *
- * Decreases the reference count by one.
- *
- * Return value: the @item, or %NULL if the object is no longer valid
- **/
-PkItemEulaRequired *
-pk_item_eula_required_unref (PkItemEulaRequired *item)
-{
- g_return_val_if_fail (item != NULL, NULL);
-
- /* post decrement */
- if (item->refcount-- != 0)
- return item;
-
- g_free (item->eula_id);
- g_free (item->package_id);
- g_free (item->vendor_name);
- g_free (item->license_agreement);
- g_free (item);
- return NULL;
-}
-
-/**
- * pk_item_media_change_required_unref:
- * @item: the #PkItemMediaChangeRequired
- *
- * Decreases the reference count by one.
- *
- * Return value: the @item, or %NULL if the object is no longer valid
- **/
-PkItemMediaChangeRequired *
-pk_item_media_change_required_unref (PkItemMediaChangeRequired *item)
-{
- g_return_val_if_fail (item != NULL, NULL);
-
- /* post decrement */
- if (item->refcount-- != 0)
- return item;
-
- g_free (item->media_id);
- g_free (item->media_text);
- g_free (item);
- return NULL;
-}
-
-/**
- * pk_item_repo_detail_unref:
- * @item: the #PkItemRepoDetail
- *
- * Decreases the reference count by one.
- *
- * Return value: the @item, or %NULL if the object is no longer valid
- **/
-PkItemRepoDetail *
-pk_item_repo_detail_unref (PkItemRepoDetail *item)
-{
- g_return_val_if_fail (item != NULL, NULL);
-
- /* post decrement */
- if (item->refcount-- != 0)
- return item;
-
- g_free (item->repo_id);
- g_free (item->description);
- g_free (item);
- return NULL;
-}
-
-/**
- * pk_item_error_code_unref:
- * @item: the #PkItemErrorCode
- *
- * Decreases the reference count by one.
- *
- * Return value: the @item, or %NULL if the object is no longer valid
- **/
-PkItemErrorCode *
-pk_item_error_code_unref (PkItemErrorCode *item)
-{
- g_return_val_if_fail (item != NULL, NULL);
-
- /* post decrement */
- if (item->refcount-- != 0)
- return item;
-
- g_free (item->details);
- g_free (item);
- return NULL;
-}
-
-/**
- * pk_item_message_unref:
- * @item: the #PkItemMessage
- *
- * Decreases the reference count by one.
- *
- * Return value: the @item, or %NULL if the object is no longer valid
- **/
-PkItemMessage *
-pk_item_message_unref (PkItemMessage *item)
-{
- g_return_val_if_fail (item != NULL, NULL);
-
- /* post decrement */
- if (item->refcount-- != 0)
- return item;
-
- g_free (item->details);
- g_free (item);
- return NULL;
-}
-
-
-/**
- * pk_item_package_new:
- *
- * Adds a package to the results set.
- *
- * Return value: %TRUE if the value was set
- **/
-PkItemPackage *
-pk_item_package_new (PkInfoEnum info_enum, const gchar *package_id, const gchar *summary)
-{
- PkItemPackage *item;
-
- g_return_val_if_fail (info_enum != PK_INFO_ENUM_UNKNOWN, FALSE);
- g_return_val_if_fail (package_id != NULL, FALSE);
-
- /* copy and add to array */
- item = g_new0 (PkItemPackage, 1);
- item->info = info_enum;
- item->package_id = g_strdup (package_id);
- item->summary = g_strdup (summary);
- return item;
-}
-
-/**
- * pk_item_details_new:
- *
- * Adds some package details to the results set.
- *
- * Return value: %TRUE if the value was set
- **/
-PkItemDetails *
-pk_item_details_new (const gchar *package_id, const gchar *license,
- PkGroupEnum group_enum, const gchar *description, const gchar *url, guint64 size)
-{
- PkItemDetails *item;
-
- g_return_val_if_fail (package_id != NULL, FALSE);
-
- /* copy and add to array */
- item = g_new0 (PkItemDetails, 1);
- item->package_id = g_strdup (package_id);
- item->license = g_strdup (license);
- item->group = group_enum;
- item->description = g_strdup (description);
- item->url = g_strdup (url);
- item->size = size;
- return item;
-}
-
-/**
- * pk_item_update_detail_new:
- *
- * Adds some update details to the results set.
- *
- * Return value: %TRUE if the value was set
- **/
-PkItemUpdateDetail *
-pk_item_update_detail_new (const gchar *package_id, const gchar *updates,
- const gchar *obsoletes, const gchar *vendor_url, const gchar *bugzilla_url,
- const gchar *cve_url, PkRestartEnum restart_enum, const gchar *update_text,
- const gchar *changelog, PkUpdateStateEnum state_enum, GDate *issued, GDate *updated)
-{
- PkItemUpdateDetail *item;
-
- g_return_val_if_fail (package_id != NULL, FALSE);
-
- /* copy and add to array */
- item = g_new0 (PkItemUpdateDetail, 1);
- item->package_id = g_strdup (package_id);
- item->updates = g_strdup (updates);
- item->obsoletes = g_strdup (obsoletes);
- item->vendor_url = g_strdup (vendor_url);
- item->bugzilla_url = g_strdup (bugzilla_url);
- item->cve_url = g_strdup (cve_url);
- item->restart = restart_enum;
- item->update_text = g_strdup (update_text);
- item->changelog = g_strdup (changelog);
- item->state = state_enum;
- if (issued != NULL)
- item->issued = g_date_new_dmy (issued->day, issued->month, issued->year);
- if (updated != NULL)
- item->updated = g_date_new_dmy (updated->day, updated->month, updated->year);
- return item;
-}
-
-/**
- * pk_item_category_new:
- *
- * Adds a category item to the results set.
- *
- * Return value: %TRUE if the value was set
- **/
-PkItemCategory *
-pk_item_category_new (const gchar *parent_id, const gchar *cat_id, const gchar *name,
- const gchar *summary, const gchar *icon)
-{
- PkItemCategory *item;
-
- g_return_val_if_fail (name != NULL, FALSE);
-
- /* copy and add to array */
- item = g_new0 (PkItemCategory, 1);
- item->parent_id = g_strdup (parent_id);
- item->cat_id = g_strdup (cat_id);
- item->name = g_strdup (name);
- item->summary = g_strdup (summary);
- item->icon = g_strdup (icon);
- return item;
-}
-
-/**
- * pk_item_distro_upgrade_new:
- *
- * Adds a distribution upgrade item to the results set.
- *
- * Return value: %TRUE if the value was set
- **/
-PkItemDistroUpgrade *
-pk_item_distro_upgrade_new (PkUpdateStateEnum state_enum, const gchar *name, const gchar *summary)
-{
- PkItemDistroUpgrade *item;
-
- g_return_val_if_fail (state_enum != PK_UPDATE_STATE_ENUM_UNKNOWN, FALSE);
- g_return_val_if_fail (name != NULL, FALSE);
-
- /* copy and add to array */
- item = g_new0 (PkItemDistroUpgrade, 1);
- item->state = state_enum;
- item->name = g_strdup (name);
- item->summary = g_strdup (summary);
- return item;
-}
-
-/**
- * pk_item_require_restart_new:
- *
- * Adds a require restart item to the results set.
- *
- * Return value: %TRUE if the value was set
- **/
-PkItemRequireRestart *
-pk_item_require_restart_new (PkRestartEnum restart_enum, const gchar *package_id)
-{
- PkItemRequireRestart *item;
-
- g_return_val_if_fail (restart_enum != PK_RESTART_ENUM_UNKNOWN, FALSE);
- g_return_val_if_fail (package_id != NULL, FALSE);
-
- /* copy and add to array */
- item = g_new0 (PkItemRequireRestart, 1);
- item->restart = restart_enum;
- item->package_id = g_strdup (package_id);
- return item;
-}
-
-/**
- * pk_item_transaction_new:
- *
- * Adds a transaction item to the results set.
- *
- * Return value: %TRUE if the value was set
- **/
-PkItemTransaction *
-pk_item_transaction_new (const gchar *tid, const gchar *timespec,
- gboolean succeeded, PkRoleEnum role_enum,
- guint duration, const gchar *data,
- guint uid, const gchar *cmdline)
-{
- PkItemTransaction *item;
-
- g_return_val_if_fail (role_enum != PK_ROLE_ENUM_UNKNOWN, FALSE);
- g_return_val_if_fail (tid != NULL, FALSE);
-
- /* copy and add to array */
- item = g_new0 (PkItemTransaction, 1);
- item->tid = g_strdup (tid);
- item->timespec = g_strdup (timespec);
- item->succeeded = succeeded;
- item->role = role_enum;
- item->duration = duration;
- item->data = g_strdup (data);
- item->uid = uid;
- item->cmdline = g_strdup (cmdline);
- return item;
-}
-
-/**
- * pk_item_files_new:
- *
- * Adds some files details to the results set.
- *
- * Return value: %TRUE if the value was set
- **/
-PkItemFiles *
-pk_item_files_new (const gchar *package_id, gchar **files)
-{
- PkItemFiles *item;
-
- g_return_val_if_fail (package_id != NULL, FALSE);
- g_return_val_if_fail (files != NULL, FALSE);
-
- /* copy and add to array */
- item = g_new0 (PkItemFiles, 1);
- item->package_id = g_strdup (package_id);
- item->files = g_strdupv (files);
- return item;
-}
-
-/**
- * pk_item_repo_signature_required_new:
- *
- * Adds some repository signature details to the results set.
- *
- * Return value: %TRUE if the value was set
- **/
-PkItemRepoSignatureRequired *
-pk_item_repo_signature_required_new (const gchar *package_id, const gchar *repository_name,
- const gchar *key_url, const gchar *key_userid, const gchar *key_id,
- const gchar *key_fingerprint, const gchar *key_timestamp,
- PkSigTypeEnum type_enum)
-{
- PkItemRepoSignatureRequired *item;
-
- g_return_val_if_fail (package_id != NULL, FALSE);
-
- /* copy and add to array */
- item = g_new0 (PkItemRepoSignatureRequired, 1);
- item->package_id = g_strdup (package_id);
- item->repository_name = g_strdup (repository_name);
- item->key_url = g_strdup (key_url);
- item->key_userid = g_strdup (key_userid);
- item->key_id = g_strdup (key_id);
- item->key_fingerprint = g_strdup (key_fingerprint);
- item->key_timestamp = g_strdup (key_timestamp);
- item->type = type_enum;
- return item;
-}
-
-/**
- * pk_item_eula_required_new:
- *
- * Adds some EULA details to the results set.
- *
- * Return value: %TRUE if the value was set
- **/
-PkItemEulaRequired *
-pk_item_eula_required_new (const gchar *eula_id, const gchar *package_id,
- const gchar *vendor_name, const gchar *license_agreement)
-{
- PkItemEulaRequired *item;
-
- g_return_val_if_fail (eula_id != NULL, FALSE);
-
- /* copy and add to array */
- item = g_new0 (PkItemEulaRequired, 1);
- item->eula_id = g_strdup (eula_id);
- item->package_id = g_strdup (package_id);
- item->vendor_name = g_strdup (vendor_name);
- item->license_agreement = g_strdup (license_agreement);
- return item;
-}
-
-/**
- * pk_item_media_change_required_new:
- *
- * Adds some media change details to the results set.
- *
- * Return value: %TRUE if the value was set
- **/
-PkItemMediaChangeRequired *
-pk_item_media_change_required_new (PkMediaTypeEnum media_type_enum, const gchar *media_id, const gchar *media_text)
-{
- PkItemMediaChangeRequired *item;
-
- g_return_val_if_fail (media_id != NULL, FALSE);
-
- /* copy and add to array */
- item = g_new0 (PkItemMediaChangeRequired, 1);
- item->media_type = media_type_enum;
- item->media_id = g_strdup (media_id);
- item->media_text = g_strdup (media_text);
- return item;
-}
-
-/**
- * pk_item_repo_detail_new:
- *
- * Adds some repository details to the results set.
- *
- * Return value: %TRUE if the value was set
- **/
-PkItemRepoDetail *
-pk_item_repo_detail_new (const gchar *repo_id, const gchar *description, gboolean enabled)
-{
- PkItemRepoDetail *item;
-
- g_return_val_if_fail (repo_id != NULL, FALSE);
-
- /* copy and add to array */
- item = g_new0 (PkItemRepoDetail, 1);
- item->repo_id = g_strdup (repo_id);
- item->description = g_strdup (description);
- item->enabled = enabled;
- return item;
-}
-
-/**
- * pk_item_error_code_new:
- *
- * Adds some error details to the results set.
- *
- * Return value: %TRUE if the value was set
- **/
-PkItemErrorCode *
-pk_item_error_code_new (PkErrorCodeEnum code_enum, const gchar *details)
-{
- PkItemErrorCode *item;
-
- /* copy and add to array */
- item = g_new0 (PkItemErrorCode, 1);
- item->code = code_enum;
- item->details = g_strdup (details);
- return item;
-}
-
-/**
- * pk_item_message_new:
- *
- * Adds some message details to the results set.
- *
- * Return value: %TRUE if the value was set
- **/
-PkItemMessage *
-pk_item_message_new (PkMessageEnum type_enum, const gchar *details)
-{
- PkItemMessage *item;
-
- /* copy and add to array */
- item = g_new0 (PkItemMessage, 1);
- item->type = type_enum;
- item->details = g_strdup (details);
- return item;
-}
-
-
-/***************************************************************************
- *** MAKE CHECK TESTS ***
- ***************************************************************************/
-#ifdef EGG_TEST
-#include "egg-test.h"
-
-void
-pk_item_test (gpointer user_data)
-{
- EggTest *test = (EggTest *) user_data;
- PkItemPackage *item;
-
- if (!egg_test_start (test, "PkItem"))
- return;
-
- item = pk_item_package_new (PK_INFO_ENUM_AVAILABLE, "gnome-power-manager;0.1.2;i386;fedora", "Power manager for GNOME");
-
- /************************************************************/
- egg_test_title (test, "check refcount");
- egg_test_assert (test, (item->refcount == 0));
-
- /************************************************************/
- egg_test_title (test, "check set");
- egg_test_assert (test, (item->info == PK_INFO_ENUM_AVAILABLE &&
- g_strcmp0 ("gnome-power-manager;0.1.2;i386;fedora", item->package_id) == 0 &&
- g_strcmp0 ("Power manager for GNOME", item->summary) == 0));
-
- /************************************************************/
- egg_test_title (test, "check refcount up");
- item = pk_item_package_ref (item);
- egg_test_assert (test, (item->refcount == 1));
-
- /************************************************************/
- egg_test_title (test, "check refcount down");
- item = pk_item_package_unref (item);
- egg_test_assert (test, (item->refcount == 0));
-
- /************************************************************/
- egg_test_title (test, "check NULL");
- item = pk_item_package_unref (item);
- egg_test_assert (test, (item == NULL));
-
- egg_test_end (test);
-}
-#endif
-
diff --git a/lib/packagekit-glib2/pk-item.h b/lib/packagekit-glib2/pk-item.h
deleted file mode 100644
index 77d18c7..0000000
--- a/lib/packagekit-glib2/pk-item.h
+++ /dev/null
@@ -1,348 +0,0 @@
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*-
- *
- * Copyright (C) 2009 Richard Hughes <richard at hughsie.com>
- *
- * Licensed under the GNU General Public License Version 2
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
- */
-
-#if !defined (__PACKAGEKIT_H_INSIDE__) && !defined (PK_COMPILATION)
-#error "Only <packagekit.h> can be included directly."
-#endif
-
-#ifndef __PK_ITEM_H
-#define __PK_ITEM_H
-
-#include <glib.h>
-#include <packagekit-glib2/pk-enum.h>
-
-G_BEGIN_DECLS
-
-/**
- * PkItemRequireRestart:
- *
- * Object to represent details about the require_restart.
- **/
-typedef struct
-{
- guint refcount;
- PkRestartEnum restart;
- gchar *package_id;
- gpointer user_data;
-} PkItemRequireRestart;
-
-/**
- * PkItemTransaction:
- *
- * Object to represent details about the transaction.
- **/
-typedef struct
-{
- guint refcount;
- gchar *tid;
- gchar *timespec;
- gboolean succeeded;
- PkRoleEnum role;
- guint duration;
- gchar *data;
- guint uid;
- gchar *cmdline;
- gpointer user_data;
-} PkItemTransaction;
-
-/**
- * PkItemDetails:
- *
- * Object to represent details about the update.
- **/
-typedef struct {
- guint refcount;
- gchar *package_id;
- gchar *license;
- PkGroupEnum group;
- gchar *description;
- gchar *url;
- guint64 size;
- gpointer user_data;
-} PkItemDetails;
-
-/**
- * PkItemUpdateDetail:
- *
- * Object to represent details about the update.
- **/
-typedef struct {
- guint refcount;
- gchar *package_id;
- gchar *updates;
- gchar *obsoletes;
- gchar *vendor_url;
- gchar *bugzilla_url;
- gchar *cve_url;
- PkRestartEnum restart;
- gchar *update_text;
- gchar *changelog;
- PkUpdateStateEnum state;
- GDate *issued;
- GDate *updated;
- gpointer user_data;
-} PkItemUpdateDetail;
-
-/**
- * PkItemPackage:
- *
- * Object to represent details about a package.
- **/
-typedef struct {
- guint refcount;
- PkInfoEnum info;
- gchar *package_id;
- gchar *summary;
- gpointer user_data;
-} PkItemPackage;
-
-/**
- * PkItemDistroUpgrade:
- *
- * Object to represent details about the distribution update.
- **/
-typedef struct
-{
- guint refcount;
- PkUpdateStateEnum state;
- gchar *name;
- gchar *summary;
- gpointer user_data;
-} PkItemDistroUpgrade;
-
-/**
- * PkItemCategory:
- *
- * Object to represent details about the category.
- **/
-typedef struct
-{
- guint refcount;
- gchar *parent_id;
- gchar *cat_id;
- gchar *name;
- gchar *summary;
- gchar *icon;
- gpointer user_data;
-} PkItemCategory;
-
-/**
- * PkItemFiles:
- *
- * Object to represent details about the files.
- **/
-typedef struct
-{
- guint refcount;
- gchar *package_id;
- gchar **files;
- gpointer user_data;
-} PkItemFiles;
-
-/**
- * PkItemRepoSignatureRequired:
- *
- * Object to represent details about the repository signature request.
- **/
-typedef struct
-{
- guint refcount;
- gchar *package_id;
- gchar *repository_name;
- gchar *key_url;
- gchar *key_userid;
- gchar *key_id;
- gchar *key_fingerprint;
- gchar *key_timestamp;
- PkSigTypeEnum type;
- gpointer user_data;
-} PkItemRepoSignatureRequired;
-
-/**
- * PkItemEulaRequired:
- *
- * Object to represent details about the EULA request.
- **/
-typedef struct
-{
- guint refcount;
- gchar *eula_id;
- gchar *package_id;
- gchar *vendor_name;
- gchar *license_agreement;
- gpointer user_data;
-} PkItemEulaRequired;
-
-/**
- * PkItemMediaChangeRequired:
- *
- * Object to represent details about the media change request.
- **/
-typedef struct
-{
- guint refcount;
- PkMediaTypeEnum media_type;
- gchar *media_id;
- gchar *media_text;
- gpointer user_data;
-} PkItemMediaChangeRequired;
-
-/**
- * PkItemRepoDetail:
- *
- * Object to represent details about the remote repository.
- **/
-typedef struct
-{
- guint refcount;
- gchar *repo_id;
- gchar *description;
- gboolean enabled;
- gpointer user_data;
-} PkItemRepoDetail;
-
-/**
- * PkItemErrorCode:
- *
- * Object to represent details about the error code.
- **/
-typedef struct
-{
- guint refcount;
- PkErrorCodeEnum code;
- gchar *details;
- gpointer user_data;
-} PkItemErrorCode;
-
-/**
- * PkItemMessage:
- *
- * Object to represent details about the message.
- **/
-typedef struct
-{
- guint refcount;
- PkMessageEnum type;
- gchar *details;
- gpointer user_data;
-} PkItemMessage;
-
-void pk_item_test (gpointer user_data);
-
-/* refcount */
-PkItemPackage *pk_item_package_ref (PkItemPackage *item);
-PkItemPackage *pk_item_package_unref (PkItemPackage *item);
-PkItemDetails *pk_item_details_ref (PkItemDetails *item);
-PkItemDetails *pk_item_details_unref (PkItemDetails *item);
-PkItemUpdateDetail *pk_item_update_detail_ref (PkItemUpdateDetail *item);
-PkItemUpdateDetail *pk_item_update_detail_unref (PkItemUpdateDetail *item);
-PkItemCategory *pk_item_category_ref (PkItemCategory *item);
-PkItemCategory *pk_item_category_unref (PkItemCategory *item);
-PkItemDistroUpgrade *pk_item_distro_upgrade_ref (PkItemDistroUpgrade *item);
-PkItemDistroUpgrade *pk_item_distro_upgrade_unref (PkItemDistroUpgrade *item);
-PkItemRequireRestart *pk_item_require_restart_ref (PkItemRequireRestart *item);
-PkItemRequireRestart *pk_item_require_restart_unref (PkItemRequireRestart *item);
-PkItemTransaction *pk_item_transaction_ref (PkItemTransaction *item);
-PkItemTransaction *pk_item_transaction_unref (PkItemTransaction *item);
-PkItemFiles *pk_item_files_ref (PkItemFiles *item);
-PkItemFiles *pk_item_files_unref (PkItemFiles *item);
-PkItemRepoSignatureRequired *pk_item_repo_signature_required_ref (PkItemRepoSignatureRequired *item);
-PkItemRepoSignatureRequired *pk_item_repo_signature_required_unref (PkItemRepoSignatureRequired *item);
-PkItemEulaRequired *pk_item_eula_required_ref (PkItemEulaRequired *item);
-PkItemEulaRequired *pk_item_eula_required_unref (PkItemEulaRequired *item);
-PkItemMediaChangeRequired *pk_item_media_change_required_ref (PkItemMediaChangeRequired *item);
-PkItemMediaChangeRequired *pk_item_media_change_required_unref (PkItemMediaChangeRequired *item);
-PkItemRepoDetail *pk_item_repo_detail_ref (PkItemRepoDetail *item);
-PkItemRepoDetail *pk_item_repo_detail_unref (PkItemRepoDetail *item);
-PkItemErrorCode *pk_item_error_code_ref (PkItemErrorCode *item);
-PkItemErrorCode *pk_item_error_code_unref (PkItemErrorCode *item);
-PkItemMessage *pk_item_message_ref (PkItemMessage *item);
-PkItemMessage *pk_item_message_unref (PkItemMessage *item);
-
-/* create */
-PkItemPackage *pk_item_package_new (PkInfoEnum info_enum,
- const gchar *package_id,
- const gchar *summary);
-PkItemDetails *pk_item_details_new (const gchar *package_id,
- const gchar *license,
- PkGroupEnum group_enum,
- const gchar *description,
- const gchar *url,
- guint64 size);
-PkItemUpdateDetail *pk_item_update_detail_new (const gchar *package_id,
- const gchar *updates,
- const gchar *obsoletes,
- const gchar *vendor_url,
- const gchar *bugzilla_url,
- const gchar *cve_url,
- PkRestartEnum restart_enum,
- const gchar *update_text,
- const gchar *changelog,
- PkUpdateStateEnum state_enum,
- GDate *issued,
- GDate *updated);
-PkItemCategory *pk_item_category_new (const gchar *parent_id,
- const gchar *cat_id,
- const gchar *name,
- const gchar *summary,
- const gchar *icon);
-PkItemDistroUpgrade *pk_item_distro_upgrade_new (PkUpdateStateEnum state_enum,
- const gchar *name,
- const gchar *summary);
-PkItemRequireRestart *pk_item_require_restart_new (PkRestartEnum restart_enum,
- const gchar *package_id);
-PkItemTransaction *pk_item_transaction_new (const gchar *tid,
- const gchar *timespec,
- gboolean succeeded,
- PkRoleEnum role_enum,
- guint duration,
- const gchar *data,
- guint uid,
- const gchar *cmdline);
-PkItemFiles *pk_item_files_new (const gchar *package_id,
- gchar **files);
-PkItemRepoSignatureRequired *pk_item_repo_signature_required_new (const gchar *package_id,
- const gchar *repository_name,
- const gchar *key_url,
- const gchar *key_userid,
- const gchar *key_id,
- const gchar *key_fingerprint,
- const gchar *key_timestamp,
- PkSigTypeEnum type_enum);
-PkItemEulaRequired *pk_item_eula_required_new (const gchar *eula_id,
- const gchar *package_id,
- const gchar *vendor_name,
- const gchar *license_agreement);
-PkItemMediaChangeRequired *pk_item_media_change_required_new (PkMediaTypeEnum media_type_enum,
- const gchar *media_id,
- const gchar *media_text);
-PkItemRepoDetail *pk_item_repo_detail_new (const gchar *repo_id,
- const gchar *description,
- gboolean enabled);
-PkItemErrorCode *pk_item_error_code_new (PkErrorCodeEnum code_enum,
- const gchar *details);
-PkItemMessage *pk_item_message_new (PkMessageEnum type_enum,
- const gchar *details);
-
-G_END_DECLS
-
-#endif /* __PK_ITEM_H */
-
diff --git a/lib/packagekit-glib2/pk-media-change-required.c b/lib/packagekit-glib2/pk-media-change-required.c
new file mode 100644
index 0000000..45ad254
--- /dev/null
+++ b/lib/packagekit-glib2/pk-media-change-required.c
@@ -0,0 +1,193 @@
+/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*-
+ *
+ * Copyright (C) 2009 Richard Hughes <richard at hughsie.com>
+ *
+ * Licensed under the GNU General Public License Version 2
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ */
+
+/**
+ * SECTION:pk-media_change_required
+ * @short_description: MediaChangeRequired object
+ *
+ * This GObject represents a media_change_required from a transaction.
+ * These objects represent single items of data from the transaction, and are
+ * often present in lists (#PkResults) or just refcounted in client programs.
+ */
+
+#include "config.h"
+
+#include <glib-object.h>
+
+#include <packagekit-glib2/pk-media-change-required.h>
+#include <packagekit-glib2/pk-enum.h>
+
+#include "egg-debug.h"
+
+static void pk_media_change_required_finalize (GObject *object);
+
+#define PK_MEDIA_CHANGE_REQUIRED_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), PK_TYPE_MEDIA_CHANGE_REQUIRED, PkMediaChangeRequiredPrivate))
+
+/**
+ * PkMediaChangeRequiredPrivate:
+ *
+ * Private #PkMediaChangeRequired data
+ **/
+struct _PkMediaChangeRequiredPrivate
+{
+ PkMediaTypeEnum media_type;
+ gchar *media_id;
+ gchar *media_text;
+};
+
+enum {
+ PROP_0,
+ PROP_MEDIA_TYPE,
+ PROP_MEDIA_ID,
+ PROP_MEDIA_TEXT,
+ PROP_LAST
+};
+
+G_DEFINE_TYPE (PkMediaChangeRequired, pk_media_change_required, G_TYPE_OBJECT)
+
+/**
+ * pk_media_change_required_get_property:
+ **/
+static void
+pk_media_change_required_get_property (GObject *object, guint prop_id, GValue *value, GParamSpec *pspec)
+{
+ PkMediaChangeRequired *media_change_required = PK_MEDIA_CHANGE_REQUIRED (object);
+ PkMediaChangeRequiredPrivate *priv = media_change_required->priv;
+
+ switch (prop_id) {
+ case PROP_MEDIA_TYPE:
+ g_value_set_uint (value, priv->media_type);
+ break;
+ case PROP_MEDIA_ID:
+ g_value_set_string (value, priv->media_id);
+ break;
+ case PROP_MEDIA_TEXT:
+ g_value_set_string (value, priv->media_text);
+ break;
+ default:
+ G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
+ break;
+ }
+}
+
+/**
+ * pk_media_change_required_set_property:
+ **/
+static void
+pk_media_change_required_set_property (GObject *object, guint prop_id, const GValue *value, GParamSpec *pspec)
+{
+ PkMediaChangeRequired *media_change_required = PK_MEDIA_CHANGE_REQUIRED (object);
+ PkMediaChangeRequiredPrivate *priv = media_change_required->priv;
+
+ switch (prop_id) {
+ case PROP_MEDIA_TYPE:
+ priv->media_type = g_value_get_uint (value);
+ break;
+ case PROP_MEDIA_ID:
+ g_free (priv->media_id);
+ priv->media_id = g_strdup (g_value_get_string (value));
+ break;
+ case PROP_MEDIA_TEXT:
+ g_free (priv->media_text);
+ priv->media_text = g_strdup (g_value_get_string (value));
+ break;
+ default:
+ G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
+ break;
+ }
+}
+
+/**
+ * pk_media_change_required_class_init:
+ **/
+static void
+pk_media_change_required_class_init (PkMediaChangeRequiredClass *klass)
+{
+ GParamSpec *pspec;
+ GObjectClass *object_class = G_OBJECT_CLASS (klass);
+ object_class->finalize = pk_media_change_required_finalize;
+ object_class->get_property = pk_media_change_required_get_property;
+ object_class->set_property = pk_media_change_required_set_property;
+
+ /**
+ * PkMediaChangeRequired:media-type:
+ */
+ pspec = g_param_spec_uint ("media-type", NULL, NULL,
+ 0, G_MAXUINT, PK_MEDIA_TYPE_ENUM_UNKNOWN,
+ G_PARAM_READWRITE);
+ g_object_class_install_property (object_class, PROP_MEDIA_TYPE, pspec);
+
+ /**
+ * PkMediaChangeRequired:media-id:
+ */
+ pspec = g_param_spec_string ("media-id", NULL, NULL,
+ NULL,
+ G_PARAM_READWRITE);
+ g_object_class_install_property (object_class, PROP_MEDIA_ID, pspec);
+
+ /**
+ * PkMediaChangeRequired:media-text:
+ */
+ pspec = g_param_spec_string ("media-text", NULL, NULL,
+ NULL,
+ G_PARAM_READWRITE);
+ g_object_class_install_property (object_class, PROP_MEDIA_TEXT, pspec);
+
+ g_type_class_add_private (klass, sizeof (PkMediaChangeRequiredPrivate));
+}
+
+/**
+ * pk_media_change_required_init:
+ **/
+static void
+pk_media_change_required_init (PkMediaChangeRequired *media_change_required)
+{
+ media_change_required->priv = PK_MEDIA_CHANGE_REQUIRED_GET_PRIVATE (media_change_required);
+}
+
+/**
+ * pk_media_change_required_finalize:
+ **/
+static void
+pk_media_change_required_finalize (GObject *object)
+{
+ PkMediaChangeRequired *media_change_required = PK_MEDIA_CHANGE_REQUIRED (object);
+ PkMediaChangeRequiredPrivate *priv = media_change_required->priv;
+
+ g_free (priv->media_id);
+ g_free (priv->media_text);
+
+ G_OBJECT_CLASS (pk_media_change_required_parent_class)->finalize (object);
+}
+
+/**
+ * pk_media_change_required_new:
+ *
+ * Return value: a new PkMediaChangeRequired object.
+ **/
+PkMediaChangeRequired *
+pk_media_change_required_new (void)
+{
+ PkMediaChangeRequired *media_change_required;
+ media_change_required = g_object_new (PK_TYPE_MEDIA_CHANGE_REQUIRED, NULL);
+ return PK_MEDIA_CHANGE_REQUIRED (media_change_required);
+}
+
diff --git a/lib/packagekit-glib2/pk-media-change-required.h b/lib/packagekit-glib2/pk-media-change-required.h
new file mode 100644
index 0000000..ffedb61
--- /dev/null
+++ b/lib/packagekit-glib2/pk-media-change-required.h
@@ -0,0 +1,67 @@
+/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*-
+ *
+ * Copyright (C) 2009 Richard Hughes <richard at hughsie.com>
+ *
+ * Licensed under the GNU General Public License Version 2
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ */
+
+#if !defined (__PACKAGEKIT_H_INSIDE__) && !defined (PK_COMPILATION)
+#error "Only <packagekit.h> can be included directly."
+#endif
+
+#ifndef __PK_MEDIA_CHANGE_REQUIRED_H
+#define __PK_MEDIA_CHANGE_REQUIRED_H
+
+#include <glib-object.h>
+
+G_BEGIN_DECLS
+
+#define PK_TYPE_MEDIA_CHANGE_REQUIRED (pk_media_change_required_get_type ())
+#define PK_MEDIA_CHANGE_REQUIRED(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), PK_TYPE_MEDIA_CHANGE_REQUIRED, PkMediaChangeRequired))
+#define PK_MEDIA_CHANGE_REQUIRED_CLASS(k) (G_TYPE_CHECK_CLASS_CAST((k), PK_TYPE_MEDIA_CHANGE_REQUIRED, PkMediaChangeRequiredClass))
+#define PK_IS_MEDIA_CHANGE_REQUIRED(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), PK_TYPE_MEDIA_CHANGE_REQUIRED))
+#define PK_IS_MEDIA_CHANGE_REQUIRED_CLASS(k) (G_TYPE_CHECK_CLASS_TYPE ((k), PK_TYPE_MEDIA_CHANGE_REQUIRED))
+#define PK_MEDIA_CHANGE_REQUIRED_GET_CLASS(o) (G_TYPE_INSTANCE_GET_CLASS ((o), PK_TYPE_MEDIA_CHANGE_REQUIRED, PkMediaChangeRequiredClass))
+
+typedef struct _PkMediaChangeRequiredPrivate PkMediaChangeRequiredPrivate;
+typedef struct _PkMediaChangeRequired PkMediaChangeRequired;
+typedef struct _PkMediaChangeRequiredClass PkMediaChangeRequiredClass;
+
+struct _PkMediaChangeRequired
+{
+ GObject parent;
+ PkMediaChangeRequiredPrivate *priv;
+};
+
+struct _PkMediaChangeRequiredClass
+{
+ GObjectClass parent_class;
+ /* padding for future expansion */
+ void (*_pk_reserved1) (void);
+ void (*_pk_reserved2) (void);
+ void (*_pk_reserved3) (void);
+ void (*_pk_reserved4) (void);
+ void (*_pk_reserved5) (void);
+};
+
+GType pk_media_change_required_get_type (void);
+PkMediaChangeRequired *pk_media_change_required_new (void);
+
+G_END_DECLS
+
+#endif /* __PK_MEDIA_CHANGE_REQUIRED_H */
+
diff --git a/lib/packagekit-glib2/pk-message.c b/lib/packagekit-glib2/pk-message.c
new file mode 100644
index 0000000..cd1b072
--- /dev/null
+++ b/lib/packagekit-glib2/pk-message.c
@@ -0,0 +1,175 @@
+/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*-
+ *
+ * Copyright (C) 2009 Richard Hughes <richard at hughsie.com>
+ *
+ * Licensed under the GNU General Public License Version 2
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ */
+
+/**
+ * SECTION:pk-message
+ * @short_description: Message object
+ *
+ * This GObject represents a message from a transaction.
+ * These objects represent single items of data from the transaction, and are
+ * often present in lists (#PkResults) or just refcounted in client programs.
+ */
+
+#include "config.h"
+
+#include <glib-object.h>
+
+#include <packagekit-glib2/pk-message.h>
+#include <packagekit-glib2/pk-enum.h>
+
+#include "egg-debug.h"
+
+static void pk_message_finalize (GObject *object);
+
+#define PK_MESSAGE_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), PK_TYPE_MESSAGE, PkMessagePrivate))
+
+/**
+ * PkMessagePrivate:
+ *
+ * Private #PkMessage data
+ **/
+struct _PkMessagePrivate
+{
+ PkMessageEnum type;
+ gchar *details;
+};
+
+enum {
+ PROP_0,
+ PROP_TYPE,
+ PROP_DETAILS,
+ PROP_LAST
+};
+
+G_DEFINE_TYPE (PkMessage, pk_message, G_TYPE_OBJECT)
+
+/**
+ * pk_message_get_property:
+ **/
+static void
+pk_message_get_property (GObject *object, guint prop_id, GValue *value, GParamSpec *pspec)
+{
+ PkMessage *message = PK_MESSAGE (object);
+ PkMessagePrivate *priv = message->priv;
+
+ switch (prop_id) {
+ case PROP_TYPE:
+ g_value_set_uint (value, priv->type);
+ break;
+ case PROP_DETAILS:
+ g_value_set_string (value, priv->details);
+ break;
+ default:
+ G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
+ break;
+ }
+}
+
+/**
+ * pk_message_set_property:
+ **/
+static void
+pk_message_set_property (GObject *object, guint prop_id, const GValue *value, GParamSpec *pspec)
+{
+ PkMessage *message = PK_MESSAGE (object);
+ PkMessagePrivate *priv = message->priv;
+
+ switch (prop_id) {
+ case PROP_TYPE:
+ priv->type = g_value_get_uint (value);
+ break;
+ case PROP_DETAILS:
+ g_free (priv->details);
+ priv->details = g_strdup (g_value_get_string (value));
+ break;
+ default:
+ G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
+ break;
+ }
+}
+
+/**
+ * pk_message_class_init:
+ **/
+static void
+pk_message_class_init (PkMessageClass *klass)
+{
+ GParamSpec *pspec;
+ GObjectClass *object_class = G_OBJECT_CLASS (klass);
+ object_class->finalize = pk_message_finalize;
+ object_class->get_property = pk_message_get_property;
+ object_class->set_property = pk_message_set_property;
+
+ /**
+ * PkMessage:type:
+ */
+ pspec = g_param_spec_uint ("type", NULL, NULL,
+ 0, G_MAXUINT, PK_MESSAGE_ENUM_UNKNOWN,
+ G_PARAM_READWRITE);
+ g_object_class_install_property (object_class, PROP_TYPE, pspec);
+
+ /**
+ * PkMessage:details:
+ */
+ pspec = g_param_spec_string ("details", NULL, NULL,
+ NULL,
+ G_PARAM_READWRITE);
+ g_object_class_install_property (object_class, PROP_DETAILS, pspec);
+
+ g_type_class_add_private (klass, sizeof (PkMessagePrivate));
+}
+
+/**
+ * pk_message_init:
+ **/
+static void
+pk_message_init (PkMessage *message)
+{
+ message->priv = PK_MESSAGE_GET_PRIVATE (message);
+}
+
+/**
+ * pk_message_finalize:
+ **/
+static void
+pk_message_finalize (GObject *object)
+{
+ PkMessage *message = PK_MESSAGE (object);
+ PkMessagePrivate *priv = message->priv;
+
+ g_free (priv->details);
+
+ G_OBJECT_CLASS (pk_message_parent_class)->finalize (object);
+}
+
+/**
+ * pk_message_new:
+ *
+ * Return value: a new PkMessage object.
+ **/
+PkMessage *
+pk_message_new (void)
+{
+ PkMessage *message;
+ message = g_object_new (PK_TYPE_MESSAGE, NULL);
+ return PK_MESSAGE (message);
+}
+
diff --git a/lib/packagekit-glib2/pk-message.h b/lib/packagekit-glib2/pk-message.h
new file mode 100644
index 0000000..9b602fb
--- /dev/null
+++ b/lib/packagekit-glib2/pk-message.h
@@ -0,0 +1,67 @@
+/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*-
+ *
+ * Copyright (C) 2009 Richard Hughes <richard at hughsie.com>
+ *
+ * Licensed under the GNU General Public License Version 2
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ */
+
+#if !defined (__PACKAGEKIT_H_INSIDE__) && !defined (PK_COMPILATION)
+#error "Only <packagekit.h> can be included directly."
+#endif
+
+#ifndef __PK_MESSAGE_H
+#define __PK_MESSAGE_H
+
+#include <glib-object.h>
+
+G_BEGIN_DECLS
+
+#define PK_TYPE_MESSAGE (pk_message_get_type ())
+#define PK_MESSAGE(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), PK_TYPE_MESSAGE, PkMessage))
+#define PK_MESSAGE_CLASS(k) (G_TYPE_CHECK_CLASS_CAST((k), PK_TYPE_MESSAGE, PkMessageClass))
+#define PK_IS_MESSAGE(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), PK_TYPE_MESSAGE))
+#define PK_IS_MESSAGE_CLASS(k) (G_TYPE_CHECK_CLASS_TYPE ((k), PK_TYPE_MESSAGE))
+#define PK_MESSAGE_GET_CLASS(o) (G_TYPE_INSTANCE_GET_CLASS ((o), PK_TYPE_MESSAGE, PkMessageClass))
+
+typedef struct _PkMessagePrivate PkMessagePrivate;
+typedef struct _PkMessage PkMessage;
+typedef struct _PkMessageClass PkMessageClass;
+
+struct _PkMessage
+{
+ GObject parent;
+ PkMessagePrivate *priv;
+};
+
+struct _PkMessageClass
+{
+ GObjectClass parent_class;
+ /* padding for future expansion */
+ void (*_pk_reserved1) (void);
+ void (*_pk_reserved2) (void);
+ void (*_pk_reserved3) (void);
+ void (*_pk_reserved4) (void);
+ void (*_pk_reserved5) (void);
+};
+
+GType pk_message_get_type (void);
+PkMessage *pk_message_new (void);
+
+G_END_DECLS
+
+#endif /* __PK_MESSAGE_H */
+
diff --git a/lib/packagekit-glib2/pk-package-sack.c b/lib/packagekit-glib2/pk-package-sack.c
index b438fa8..3074904 100644
--- a/lib/packagekit-glib2/pk-package-sack.c
+++ b/lib/packagekit-glib2/pk-package-sack.c
@@ -481,9 +481,12 @@ pk_package_sack_merge_resolve_cb (GObject *source_object, GAsyncResult *res, PkP
GError *error = NULL;
PkResults *results;
GPtrArray *packages = NULL;
- const PkItemPackage *item;
+ PkPackage *item;
guint i;
PkPackage *package;
+ PkInfoEnum info;
+ gchar *summary;
+ gchar *package_id;
/* get the results */
results = pk_client_generic_finish (client, res, &error);
@@ -507,22 +510,28 @@ pk_package_sack_merge_resolve_cb (GObject *source_object, GAsyncResult *res, PkP
/* set data on each item */
for (i=0; i<packages->len; i++) {
item = g_ptr_array_index (packages, i);
-
- egg_debug ("%s\t%s\t%s", pk_info_enum_to_text (item->info), item->package_id, item->summary);
+ g_object_get (item,
+ "info", &info,
+ "package-id", &package_id,
+ "summary", &summary,
+ NULL);
/* get package, and set data */
- package = pk_package_sack_find_by_id (state->sack, item->package_id);
+ package = pk_package_sack_find_by_id (state->sack, package_id);
if (package == NULL) {
- egg_warning ("failed to find %s", item->package_id);
- continue;
+ egg_warning ("failed to find %s", package_id);
+ goto skip;
}
/* set data */
g_object_set (package,
- "info", item->info,
- "summary", item->summary,
+ "info", info,
+ "summary", summary,
NULL);
g_object_unref (package);
+skip:
+ g_free (summary);
+ g_free (package_id);
}
/* all okay */
@@ -619,9 +628,15 @@ pk_package_sack_merge_details_cb (GObject *source_object, GAsyncResult *res, PkP
GError *error = NULL;
PkResults *results;
GPtrArray *details = NULL;
- const PkItemDetails *item;
+ PkDetails *item;
guint i;
PkPackage *package;
+ PkGroupEnum group;
+ gchar *license;
+ gchar *url;
+ gchar *description;
+ gchar *package_id;
+ guint64 size;
/* get the results */
results = pk_client_generic_finish (client, res, &error);
@@ -645,24 +660,36 @@ pk_package_sack_merge_details_cb (GObject *source_object, GAsyncResult *res, PkP
for (i=0; i<details->len; i++) {
item = g_ptr_array_index (details, i);
- egg_debug ("%s\t%s\t%s", item->package_id, item->url, item->license);
+ g_object_get (item,
+ "package-id", &package_id,
+ "group", &group,
+ "license", &license,
+ "url", &url,
+ "description", &description,
+ "size", &size,
+ NULL);
/* get package, and set data */
- package = pk_package_sack_find_by_id (state->sack, item->package_id);
+ package = pk_package_sack_find_by_id (state->sack, package_id);
if (package == NULL) {
- egg_warning ("failed to find %s", item->package_id);
- continue;
+ egg_warning ("failed to find %s", package_id);
+ goto skip;
}
/* set data */
g_object_set (package,
- "license", item->license,
- "group", item->group,
- "description", item->description,
- "url", item->url,
- "size", item->size,
+ "license", license,
+ "group", group,
+ "description", description,
+ "url", url,
+ "size", size,
NULL);
g_object_unref (package);
+skip:
+ g_free (package_id);
+ g_free (license);
+ g_free (url);
+ g_free (description);
}
/* all okay */
@@ -733,9 +760,21 @@ pk_package_sack_merge_update_detail_cb (GObject *source_object, GAsyncResult *re
GError *error = NULL;
PkResults *results;
GPtrArray *update_details = NULL;
- const PkItemUpdateDetail *item;
+ PkUpdateDetail *item;
guint i;
PkPackage *package;
+ gchar *package_id;
+ gchar *updates;
+ gchar *obsoletes;
+ gchar *vendor_url;
+ gchar *bugzilla_url;
+ gchar *cve_url;
+ PkRestartEnum restart;
+ gchar *update_text;
+ gchar *changelog;
+ PkUpdateStateEnum state_enum;
+ gchar *issued;
+ gchar *updated;
/* get the results */
results = pk_client_generic_finish (client, res, &error);
@@ -758,31 +797,54 @@ pk_package_sack_merge_update_detail_cb (GObject *source_object, GAsyncResult *re
/* set data on each item */
for (i=0; i<update_details->len; i++) {
item = g_ptr_array_index (update_details, i);
-
- egg_debug ("%s\t%s\t%s", item->package_id, item->updates, item->changelog);
+ g_object_get (item,
+ "package-id", &package_id,
+ "updates", &updates,
+ "obsoletes", &obsoletes,
+ "vendor-url", &vendor_url,
+ "bugzilla-url", &bugzilla_url,
+ "cve-url", &cve_url,
+ "restart", &restart,
+ "update-text", &update_text,
+ "changelog", &changelog,
+ "state", &state_enum,
+ "issued", &issued,
+ "updated", &updated,
+ NULL);
/* get package, and set data */
- package = pk_package_sack_find_by_id (state->sack, item->package_id);
+ package = pk_package_sack_find_by_id (state->sack, package_id);
if (package == NULL) {
- egg_warning ("failed to find %s", item->package_id);
- continue;
+ egg_warning ("failed to find %s", package_id);
+ goto skip;
}
/* set data */
g_object_set (package,
- "update-updates", item->updates,
- "update-obsoletes", item->obsoletes,
- "update-vendor-url", item->vendor_url,
- "update-bugzilla-url", item->bugzilla_url,
- "update-cve-url", item->cve_url,
- "update-restart", item->restart,
- "update-text", item->update_text,
- "update-changelog", item->changelog,
- "update-state", item->state,
- "update-issued", item->issued,
- "update-updated", item->updated,
+ "update-updates", updates,
+ "update-obsoletes", obsoletes,
+ "update-vendor-url", vendor_url,
+ "update-bugzilla-url", bugzilla_url,
+ "update-cve-url", cve_url,
+ "update-restart", restart,
+ "update-text", update_text,
+ "update-changelog", changelog,
+ "update-state", state_enum,
+ "update-issued", issued,
+ "update-updated", updated,
NULL);
g_object_unref (package);
+skip:
+ g_free (package_id);
+ g_free (updates);
+ g_free (obsoletes);
+ g_free (vendor_url);
+ g_free (bugzilla_url);
+ g_free (cve_url);
+ g_free (update_text);
+ g_free (changelog);
+ g_free (issued);
+ g_free (updated);
}
/* all okay */
diff --git a/lib/packagekit-glib2/pk-package.c b/lib/packagekit-glib2/pk-package.c
index 1eb1841..10623b4 100644
--- a/lib/packagekit-glib2/pk-package.c
+++ b/lib/packagekit-glib2/pk-package.c
@@ -21,7 +21,11 @@
/**
* SECTION:pk-package
- * @short_description: TODO
+ * @short_description: Package object
+ *
+ * This GObject represents a package from a transaction.
+ * These objects represent single items of data from the transaction, and are
+ * often present in lists (#PkResults) or just refcounted in client programs.
*/
#include "config.h"
@@ -46,9 +50,9 @@ static void pk_package_finalize (GObject *object);
**/
struct _PkPackagePrivate
{
+ PkInfoEnum info;
gchar *package_id;
gchar *summary;
- PkInfoEnum info;
gchar *license;
PkGroupEnum group;
gchar *description;
@@ -63,8 +67,8 @@ struct _PkPackagePrivate
gchar *update_text;
gchar *update_changelog;
PkUpdateStateEnum update_state;
- GDate *update_issued;
- GDate *update_updated;
+ gchar *update_issued;
+ gchar *update_updated;
};
enum {
@@ -74,9 +78,9 @@ enum {
enum {
PROP_0,
+ PROP_INFO,
PROP_PACKAGE_ID,
PROP_SUMMARY,
- PROP_INFO,
PROP_LICENSE,
PROP_GROUP,
PROP_DESCRIPTION,
@@ -101,6 +105,42 @@ static guint signals [SIGNAL_LAST] = { 0 };
G_DEFINE_TYPE (PkPackage, pk_package, G_TYPE_OBJECT)
/**
+ * pk_package_equal:
+ * @package1: a valid #PkPackage instance
+ * @package2: a valid #PkPackage instance
+ *
+ * Do the #PkPackage's have the same ID.
+ *
+ * Return value: %TRUE if the packages have the same package_id, info and summary.
+ **/
+gboolean
+pk_package_equal (PkPackage *package1, PkPackage *package2)
+{
+ g_return_val_if_fail (PK_IS_PACKAGE (package1), FALSE);
+ g_return_val_if_fail (PK_IS_PACKAGE (package2), FALSE);
+ return (g_strcmp0 (package1->priv->summary, package2->priv->summary) == 0 &&
+ g_strcmp0 (package1->priv->package_id, package2->priv->package_id) == 0 &&
+ package1->priv->info == package2->priv->info);
+}
+
+/**
+ * pk_package_equal_id:
+ * @package1: a valid #PkPackage instance
+ * @package2: a valid #PkPackage instance
+ *
+ * Do the #PkPackage's have the same ID.
+ *
+ * Return value: %TRUE if the packages have the same package_id.
+ **/
+gboolean
+pk_package_equal_id (PkPackage *package1, PkPackage *package2)
+{
+ g_return_val_if_fail (PK_IS_PACKAGE (package1), FALSE);
+ g_return_val_if_fail (PK_IS_PACKAGE (package2), FALSE);
+ return (g_strcmp0 (package1->priv->package_id, package2->priv->package_id) == 0);
+}
+
+/**
* pk_package_set_id:
* @package: a valid #PkPackage instance
* @package_id: the valid package_id
@@ -153,6 +193,21 @@ out:
}
/**
+ * pk_package_get_info:
+ * @package: a valid #PkPackage instance
+ *
+ * Gets the package object ID
+ *
+ * Return value: the %PkInfoEnum
+ **/
+PkInfoEnum
+pk_package_get_info (PkPackage *package)
+{
+ g_return_val_if_fail (PK_IS_PACKAGE (package), FALSE);
+ return package->priv->info;
+}
+
+/**
* pk_package_get_id:
* @package: a valid #PkPackage instance
*
@@ -168,6 +223,21 @@ pk_package_get_id (PkPackage *package)
}
/**
+ * pk_package_get_summary:
+ * @package: a valid #PkPackage instance
+ *
+ * Gets the package object ID
+ *
+ * Return value: the summary, or %NULL if unset
+ **/
+const gchar *
+pk_package_get_summary (PkPackage *package)
+{
+ g_return_val_if_fail (PK_IS_PACKAGE (package), FALSE);
+ return package->priv->summary;
+}
+
+/**
* pk_package_print:
* @package: a valid #PkPackage instance
*
@@ -251,10 +321,10 @@ pk_package_get_property (GObject *object, guint prop_id, GValue *value, GParamSp
g_value_set_uint (value, priv->update_state);
break;
case PROP_UPDATE_ISSUED:
- g_value_set_pointer (value, priv->update_issued);
+ g_value_set_string (value, priv->update_issued);
break;
case PROP_UPDATE_UPDATED:
- g_value_set_pointer (value, priv->update_updated);
+ g_value_set_string (value, priv->update_updated);
break;
default:
G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
@@ -270,16 +340,19 @@ pk_package_set_property (GObject *object, guint prop_id, const GValue *value, GP
{
PkPackage *package = PK_PACKAGE (object);
PkPackagePrivate *priv = package->priv;
- GDate *date;
switch (prop_id) {
+ case PROP_INFO:
+ priv->info = g_value_get_uint (value);
+ break;
+ case PROP_PACKAGE_ID:
+ g_free (priv->package_id);
+ priv->package_id = g_strdup (g_value_get_string (value));
+ break;
case PROP_SUMMARY:
g_free (priv->summary);
priv->summary = g_strdup (g_value_get_string (value));
break;
- case PROP_INFO:
- priv->info = g_value_get_uint (value);
- break;
case PROP_LICENSE:
g_free (priv->license);
priv->license = g_strdup (g_value_get_string (value));
@@ -333,22 +406,12 @@ pk_package_set_property (GObject *object, guint prop_id, const GValue *value, GP
priv->update_state = g_value_get_uint (value);
break;
case PROP_UPDATE_ISSUED:
- if (priv->update_issued != NULL) {
- g_date_free (priv->update_issued);
- priv->update_issued = NULL;
- }
- date = g_value_get_pointer (value);
- if (date != NULL)
- priv->update_issued = g_date_new_dmy (date->day, date->month, date->year);
+ g_free (priv->update_issued);
+ priv->update_issued = g_strdup (g_value_get_string (value));
break;
case PROP_UPDATE_UPDATED:
- if (priv->update_updated != NULL) {
- g_date_free (priv->update_updated);
- priv->update_updated = NULL;
- }
- date = g_value_get_pointer (value);
- if (date != NULL)
- priv->update_updated = g_date_new_dmy (date->day, date->month, date->year);
+ g_free (priv->update_updated);
+ priv->update_updated = g_strdup (g_value_get_string (value));
break;
default:
G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
@@ -370,12 +433,21 @@ pk_package_class_init (PkPackageClass *klass)
object_class->finalize = pk_package_finalize;
/**
+ * PkPackage:info:
+ */
+ pspec = g_param_spec_uint ("info", NULL,
+ "The PkInfoEnum package type, e.g. PK_INFO_ENUM_NORMAL",
+ 0, G_MAXUINT, PK_INFO_ENUM_UNKNOWN,
+ G_PARAM_READWRITE);
+ g_object_class_install_property (object_class, PROP_INFO, pspec);
+
+ /**
* PkPackage:package-id:
*/
pspec = g_param_spec_string ("package-id", NULL,
"The full package_id, e.g. 'gnome-power-manager;0.1.2;i386;fedora'",
NULL,
- G_PARAM_READABLE);
+ G_PARAM_READWRITE);
g_object_class_install_property (object_class, PROP_PACKAGE_ID, pspec);
/**
@@ -388,15 +460,6 @@ pk_package_class_init (PkPackageClass *klass)
g_object_class_install_property (object_class, PROP_SUMMARY, pspec);
/**
- * PkPackage:info:
- */
- pspec = g_param_spec_uint ("info", NULL,
- "The PkInfoEnum package type, e.g. PK_INFO_ENUM_NORMAL",
- 0, G_MAXUINT, PK_INFO_ENUM_UNKNOWN,
- G_PARAM_READWRITE);
- g_object_class_install_property (object_class, PROP_INFO, pspec);
-
- /**
* PkPackage:license:
*/
pspec = g_param_spec_string ("license", NULL,
@@ -525,17 +588,19 @@ pk_package_class_init (PkPackageClass *klass)
/**
* PkPackage:update-issued:
*/
- pspec = g_param_spec_pointer ("update-issued", NULL,
- "When the update was issued",
- G_PARAM_READWRITE);
+ pspec = g_param_spec_string ("update-issued", NULL,
+ "When the update was issued",
+ NULL,
+ G_PARAM_READWRITE);
g_object_class_install_property (object_class, PROP_UPDATE_ISSUED, pspec);
/**
* PkPackage:update-updated:
*/
- pspec = g_param_spec_pointer ("update-updated", NULL,
- "When the update was last updated",
- G_PARAM_READWRITE);
+ pspec = g_param_spec_string ("update-updated", NULL,
+ "When the update was last updated",
+ NULL,
+ G_PARAM_READWRITE);
g_object_class_install_property (object_class, PROP_UPDATE_UPDATED, pspec);
/**
@@ -586,10 +651,8 @@ pk_package_finalize (GObject *object)
g_free (priv->update_cve_url);
g_free (priv->update_text);
g_free (priv->update_changelog);
- if (priv->update_issued != NULL)
- g_date_free (priv->update_issued);
- if (priv->update_updated != NULL)
- g_date_free (priv->update_updated);
+ g_free (priv->update_issued);
+ g_free (priv->update_updated);
G_OBJECT_CLASS (pk_package_parent_class)->finalize (object);
}
diff --git a/lib/packagekit-glib2/pk-package.h b/lib/packagekit-glib2/pk-package.h
index fed7031..d4f7d76 100644
--- a/lib/packagekit-glib2/pk-package.h
+++ b/lib/packagekit-glib2/pk-package.h
@@ -27,6 +27,7 @@
#define __PK_PACKAGE_H
#include <glib-object.h>
+#include <packagekit-glib2/pk-enum.h>
G_BEGIN_DECLS
@@ -72,7 +73,13 @@ gboolean pk_package_set_id (PkPackage *package,
const gchar *package_id,
GError **error);
const gchar *pk_package_get_id (PkPackage *package);
+PkInfoEnum pk_package_get_info (PkPackage *package);
+const gchar *pk_package_get_summary (PkPackage *package);
void pk_package_print (PkPackage *package);
+gboolean pk_package_equal (PkPackage *package1,
+ PkPackage *package2);
+gboolean pk_package_equal_id (PkPackage *package1,
+ PkPackage *package2);
G_END_DECLS
diff --git a/lib/packagekit-glib2/pk-repo-detail.c b/lib/packagekit-glib2/pk-repo-detail.c
new file mode 100644
index 0000000..cf63604
--- /dev/null
+++ b/lib/packagekit-glib2/pk-repo-detail.c
@@ -0,0 +1,192 @@
+/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*-
+ *
+ * Copyright (C) 2009 Richard Hughes <richard at hughsie.com>
+ *
+ * Licensed under the GNU General Public License Version 2
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ */
+
+/**
+ * SECTION:pk-repo_detail
+ * @short_description: RepoDetail object
+ *
+ * This GObject represents a repo_detail from a transaction.
+ * These objects represent single items of data from the transaction, and are
+ * often present in lists (#PkResults) or just refcounted in client programs.
+ */
+
+#include "config.h"
+
+#include <glib-object.h>
+
+#include <packagekit-glib2/pk-repo-detail.h>
+
+#include "egg-debug.h"
+
+static void pk_repo_detail_finalize (GObject *object);
+
+#define PK_REPO_DETAIL_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), PK_TYPE_REPO_DETAIL, PkRepoDetailPrivate))
+
+/**
+ * PkRepoDetailPrivate:
+ *
+ * Private #PkRepoDetail data
+ **/
+struct _PkRepoDetailPrivate
+{
+ gchar *repo_id;
+ gchar *description;
+ gboolean enabled;
+};
+
+enum {
+ PROP_0,
+ PROP_REPO_ID,
+ PROP_DESCRIPTION,
+ PROP_ENABLED,
+ PROP_LAST
+};
+
+G_DEFINE_TYPE (PkRepoDetail, pk_repo_detail, G_TYPE_OBJECT)
+
+/**
+ * pk_repo_detail_get_property:
+ **/
+static void
+pk_repo_detail_get_property (GObject *object, guint prop_id, GValue *value, GParamSpec *pspec)
+{
+ PkRepoDetail *repo_detail = PK_REPO_DETAIL (object);
+ PkRepoDetailPrivate *priv = repo_detail->priv;
+
+ switch (prop_id) {
+ case PROP_REPO_ID:
+ g_value_set_string (value, priv->repo_id);
+ break;
+ case PROP_DESCRIPTION:
+ g_value_set_string (value, priv->description);
+ break;
+ case PROP_ENABLED:
+ g_value_set_boolean (value, priv->enabled);
+ break;
+ default:
+ G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
+ break;
+ }
+}
+
+/**
+ * pk_repo_detail_set_property:
+ **/
+static void
+pk_repo_detail_set_property (GObject *object, guint prop_id, const GValue *value, GParamSpec *pspec)
+{
+ PkRepoDetail *repo_detail = PK_REPO_DETAIL (object);
+ PkRepoDetailPrivate *priv = repo_detail->priv;
+
+ switch (prop_id) {
+ case PROP_REPO_ID:
+ g_free (priv->repo_id);
+ priv->repo_id = g_strdup (g_value_get_string (value));
+ break;
+ case PROP_DESCRIPTION:
+ g_free (priv->description);
+ priv->description = g_strdup (g_value_get_string (value));
+ break;
+ case PROP_ENABLED:
+ priv->enabled = g_value_get_boolean (value);
+ break;
+ default:
+ G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
+ break;
+ }
+}
+
+/**
+ * pk_repo_detail_class_init:
+ **/
+static void
+pk_repo_detail_class_init (PkRepoDetailClass *klass)
+{
+ GParamSpec *pspec;
+ GObjectClass *object_class = G_OBJECT_CLASS (klass);
+ object_class->finalize = pk_repo_detail_finalize;
+ object_class->get_property = pk_repo_detail_get_property;
+ object_class->set_property = pk_repo_detail_set_property;
+
+ /**
+ * PkRepoDetail:repo-id:
+ */
+ pspec = g_param_spec_string ("repo-id", NULL, NULL,
+ NULL,
+ G_PARAM_READWRITE);
+ g_object_class_install_property (object_class, PROP_REPO_ID, pspec);
+
+ /**
+ * PkRepoDetail:description:
+ */
+ pspec = g_param_spec_string ("description", NULL, NULL,
+ NULL,
+ G_PARAM_READWRITE);
+ g_object_class_install_property (object_class, PROP_DESCRIPTION, pspec);
+
+ /**
+ * PkRepoDetail:enabled:
+ */
+ pspec = g_param_spec_boolean ("enabled", NULL, NULL,
+ FALSE,
+ G_PARAM_READWRITE);
+ g_object_class_install_property (object_class, PROP_ENABLED, pspec);
+
+ g_type_class_add_private (klass, sizeof (PkRepoDetailPrivate));
+}
+
+/**
+ * pk_repo_detail_init:
+ **/
+static void
+pk_repo_detail_init (PkRepoDetail *repo_detail)
+{
+ repo_detail->priv = PK_REPO_DETAIL_GET_PRIVATE (repo_detail);
+}
+
+/**
+ * pk_repo_detail_finalize:
+ **/
+static void
+pk_repo_detail_finalize (GObject *object)
+{
+ PkRepoDetail *repo_detail = PK_REPO_DETAIL (object);
+ PkRepoDetailPrivate *priv = repo_detail->priv;
+
+ g_free (priv->repo_id);
+ g_free (priv->description);
+
+ G_OBJECT_CLASS (pk_repo_detail_parent_class)->finalize (object);
+}
+
+/**
+ * pk_repo_detail_new:
+ *
+ * Return value: a new PkRepoDetail object.
+ **/
+PkRepoDetail *
+pk_repo_detail_new (void)
+{
+ PkRepoDetail *repo_detail;
+ repo_detail = g_object_new (PK_TYPE_REPO_DETAIL, NULL);
+ return PK_REPO_DETAIL (repo_detail);
+}
+
diff --git a/lib/packagekit-glib2/pk-repo-detail.h b/lib/packagekit-glib2/pk-repo-detail.h
new file mode 100644
index 0000000..6a66244
--- /dev/null
+++ b/lib/packagekit-glib2/pk-repo-detail.h
@@ -0,0 +1,67 @@
+/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*-
+ *
+ * Copyright (C) 2009 Richard Hughes <richard at hughsie.com>
+ *
+ * Licensed under the GNU General Public License Version 2
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ */
+
+#if !defined (__PACKAGEKIT_H_INSIDE__) && !defined (PK_COMPILATION)
+#error "Only <packagekit.h> can be included directly."
+#endif
+
+#ifndef __PK_REPO_DETAIL_H
+#define __PK_REPO_DETAIL_H
+
+#include <glib-object.h>
+
+G_BEGIN_DECLS
+
+#define PK_TYPE_REPO_DETAIL (pk_repo_detail_get_type ())
+#define PK_REPO_DETAIL(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), PK_TYPE_REPO_DETAIL, PkRepoDetail))
+#define PK_REPO_DETAIL_CLASS(k) (G_TYPE_CHECK_CLASS_CAST((k), PK_TYPE_REPO_DETAIL, PkRepoDetailClass))
+#define PK_IS_REPO_DETAIL(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), PK_TYPE_REPO_DETAIL))
+#define PK_IS_REPO_DETAIL_CLASS(k) (G_TYPE_CHECK_CLASS_TYPE ((k), PK_TYPE_REPO_DETAIL))
+#define PK_REPO_DETAIL_GET_CLASS(o) (G_TYPE_INSTANCE_GET_CLASS ((o), PK_TYPE_REPO_DETAIL, PkRepoDetailClass))
+
+typedef struct _PkRepoDetailPrivate PkRepoDetailPrivate;
+typedef struct _PkRepoDetail PkRepoDetail;
+typedef struct _PkRepoDetailClass PkRepoDetailClass;
+
+struct _PkRepoDetail
+{
+ GObject parent;
+ PkRepoDetailPrivate *priv;
+};
+
+struct _PkRepoDetailClass
+{
+ GObjectClass parent_class;
+ /* padding for future expansion */
+ void (*_pk_reserved1) (void);
+ void (*_pk_reserved2) (void);
+ void (*_pk_reserved3) (void);
+ void (*_pk_reserved4) (void);
+ void (*_pk_reserved5) (void);
+};
+
+GType pk_repo_detail_get_type (void);
+PkRepoDetail *pk_repo_detail_new (void);
+
+G_END_DECLS
+
+#endif /* __PK_REPO_DETAIL_H */
+
diff --git a/lib/packagekit-glib2/pk-repo-signature-required.c b/lib/packagekit-glib2/pk-repo-signature-required.c
new file mode 100644
index 0000000..27ba133
--- /dev/null
+++ b/lib/packagekit-glib2/pk-repo-signature-required.c
@@ -0,0 +1,283 @@
+/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*-
+ *
+ * Copyright (C) 2009 Richard Hughes <richard at hughsie.com>
+ *
+ * Licensed under the GNU General Public License Version 2
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ */
+
+/**
+ * SECTION:pk-repo_signature_required
+ * @short_description: RepoSignatureRequired object
+ *
+ * This GObject represents a repo_signature_required from a transaction.
+ * These objects represent single items of data from the transaction, and are
+ * often present in lists (#PkResults) or just refcounted in client programs.
+ */
+
+#include "config.h"
+
+#include <glib-object.h>
+
+#include <packagekit-glib2/pk-repo-signature-required.h>
+#include <packagekit-glib2/pk-enum.h>
+
+#include "egg-debug.h"
+
+static void pk_repo_signature_required_finalize (GObject *object);
+
+#define PK_REPO_SIGNATURE_REQUIRED_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), PK_TYPE_REPO_SIGNATURE_REQUIRED, PkRepoSignatureRequiredPrivate))
+
+/**
+ * PkRepoSignatureRequiredPrivate:
+ *
+ * Private #PkRepoSignatureRequired data
+ **/
+struct _PkRepoSignatureRequiredPrivate
+{
+ gchar *package_id;
+ gchar *repository_name;
+ gchar *key_url;
+ gchar *key_userid;
+ gchar *key_id;
+ gchar *key_fingerprint;
+ gchar *key_timestamp;
+ PkSigTypeEnum type;
+};
+
+enum {
+ PROP_0,
+ PROP_PACKAGE_ID,
+ PROP_REPOSITORY_NAME,
+ PROP_KEY_URL,
+ PROP_KEY_USERID,
+ PROP_KEY_ID,
+ PROP_KEY_FINGERPRINT,
+ PROP_KEY_TIMESTAMP,
+ PROP_TYPE,
+ PROP_LAST
+};
+
+G_DEFINE_TYPE (PkRepoSignatureRequired, pk_repo_signature_required, G_TYPE_OBJECT)
+
+/**
+ * pk_repo_signature_required_get_property:
+ **/
+static void
+pk_repo_signature_required_get_property (GObject *object, guint prop_id, GValue *value, GParamSpec *pspec)
+{
+ PkRepoSignatureRequired *repo_signature_required = PK_REPO_SIGNATURE_REQUIRED (object);
+ PkRepoSignatureRequiredPrivate *priv = repo_signature_required->priv;
+
+ switch (prop_id) {
+ case PROP_PACKAGE_ID:
+ g_value_set_string (value, priv->package_id);
+ break;
+ case PROP_REPOSITORY_NAME:
+ g_value_set_string (value, priv->repository_name);
+ break;
+ case PROP_KEY_URL:
+ g_value_set_string (value, priv->key_url);
+ break;
+ case PROP_KEY_USERID:
+ g_value_set_string (value, priv->key_userid);
+ break;
+ case PROP_KEY_ID:
+ g_value_set_string (value, priv->key_id);
+ break;
+ case PROP_KEY_FINGERPRINT:
+ g_value_set_string (value, priv->key_fingerprint);
+ break;
+ case PROP_KEY_TIMESTAMP:
+ g_value_set_string (value, priv->key_timestamp);
+ break;
+ case PROP_TYPE:
+ g_value_set_uint (value, priv->type);
+ break;
+ default:
+ G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
+ break;
+ }
+}
+
+/**
+ * pk_repo_signature_required_set_property:
+ **/
+static void
+pk_repo_signature_required_set_property (GObject *object, guint prop_id, const GValue *value, GParamSpec *pspec)
+{
+ PkRepoSignatureRequired *repo_signature_required = PK_REPO_SIGNATURE_REQUIRED (object);
+ PkRepoSignatureRequiredPrivate *priv = repo_signature_required->priv;
+
+ switch (prop_id) {
+ case PROP_PACKAGE_ID:
+ g_free (priv->package_id);
+ priv->package_id = g_strdup (g_value_get_string (value));
+ break;
+ case PROP_REPOSITORY_NAME:
+ g_free (priv->repository_name);
+ priv->repository_name = g_strdup (g_value_get_string (value));
+ break;
+ case PROP_KEY_URL:
+ g_free (priv->key_url);
+ priv->key_url = g_strdup (g_value_get_string (value));
+ break;
+ case PROP_KEY_USERID:
+ g_free (priv->key_userid);
+ priv->key_userid = g_strdup (g_value_get_string (value));
+ break;
+ case PROP_KEY_ID:
+ g_free (priv->key_id);
+ priv->key_id = g_strdup (g_value_get_string (value));
+ break;
+ case PROP_KEY_FINGERPRINT:
+ g_free (priv->key_fingerprint);
+ priv->key_fingerprint = g_strdup (g_value_get_string (value));
+ break;
+ case PROP_KEY_TIMESTAMP:
+ g_free (priv->key_timestamp);
+ priv->key_timestamp = g_strdup (g_value_get_string (value));
+ break;
+ case PROP_TYPE:
+ priv->type = g_value_get_uint (value);
+ break;
+ default:
+ G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
+ break;
+ }
+}
+
+/**
+ * pk_repo_signature_required_class_init:
+ **/
+static void
+pk_repo_signature_required_class_init (PkRepoSignatureRequiredClass *klass)
+{
+ GParamSpec *pspec;
+ GObjectClass *object_class = G_OBJECT_CLASS (klass);
+ object_class->finalize = pk_repo_signature_required_finalize;
+ object_class->get_property = pk_repo_signature_required_get_property;
+ object_class->set_property = pk_repo_signature_required_set_property;
+
+ /**
+ * PkRepoSignatureRequired:package-id:
+ */
+ pspec = g_param_spec_string ("package-id", NULL, NULL,
+ NULL,
+ G_PARAM_READWRITE);
+ g_object_class_install_property (object_class, PROP_PACKAGE_ID, pspec);
+
+ /**
+ * PkRepoSignatureRequired:repository-name:
+ */
+ pspec = g_param_spec_string ("repository-name", NULL, NULL,
+ NULL,
+ G_PARAM_READWRITE);
+ g_object_class_install_property (object_class, PROP_REPOSITORY_NAME, pspec);
+
+ /**
+ * PkRepoSignatureRequired:key-url:
+ */
+ pspec = g_param_spec_string ("key-url", NULL, NULL,
+ NULL,
+ G_PARAM_READWRITE);
+ g_object_class_install_property (object_class, PROP_KEY_URL, pspec);
+
+ /**
+ * PkRepoSignatureRequired:key-userid:
+ */
+ pspec = g_param_spec_string ("key-userid", NULL, NULL,
+ NULL,
+ G_PARAM_READWRITE);
+ g_object_class_install_property (object_class, PROP_KEY_USERID, pspec);
+
+ /**
+ * PkRepoSignatureRequired:key-id:
+ */
+ pspec = g_param_spec_string ("key-id", NULL, NULL,
+ NULL,
+ G_PARAM_READWRITE);
+ g_object_class_install_property (object_class, PROP_KEY_ID, pspec);
+
+ /**
+ * PkRepoSignatureRequired:key-fingerprint:
+ */
+ pspec = g_param_spec_string ("key-fingerprint", NULL, NULL,
+ NULL,
+ G_PARAM_READWRITE);
+ g_object_class_install_property (object_class, PROP_KEY_FINGERPRINT, pspec);
+
+ /**
+ * PkRepoSignatureRequired:key-timestamp:
+ */
+ pspec = g_param_spec_string ("key-timestamp", NULL, NULL,
+ NULL,
+ G_PARAM_READWRITE);
+ g_object_class_install_property (object_class, PROP_KEY_TIMESTAMP, pspec);
+
+ /**
+ * PkRepoSignatureRequired:type:
+ */
+ pspec = g_param_spec_uint ("type", NULL, NULL,
+ 0, G_MAXUINT, PK_SIGTYPE_ENUM_UNKNOWN,
+ G_PARAM_READWRITE);
+ g_object_class_install_property (object_class, PROP_TYPE, pspec);
+
+ g_type_class_add_private (klass, sizeof (PkRepoSignatureRequiredPrivate));
+}
+
+/**
+ * pk_repo_signature_required_init:
+ **/
+static void
+pk_repo_signature_required_init (PkRepoSignatureRequired *repo_signature_required)
+{
+ repo_signature_required->priv = PK_REPO_SIGNATURE_REQUIRED_GET_PRIVATE (repo_signature_required);
+}
+
+/**
+ * pk_repo_signature_required_finalize:
+ **/
+static void
+pk_repo_signature_required_finalize (GObject *object)
+{
+ PkRepoSignatureRequired *repo_signature_required = PK_REPO_SIGNATURE_REQUIRED (object);
+ PkRepoSignatureRequiredPrivate *priv = repo_signature_required->priv;
+
+ g_free (priv->package_id);
+ g_free (priv->repository_name);
+ g_free (priv->key_url);
+ g_free (priv->key_userid);
+ g_free (priv->key_id);
+ g_free (priv->key_fingerprint);
+ g_free (priv->key_timestamp);
+
+ G_OBJECT_CLASS (pk_repo_signature_required_parent_class)->finalize (object);
+}
+
+/**
+ * pk_repo_signature_required_new:
+ *
+ * Return value: a new PkRepoSignatureRequired object.
+ **/
+PkRepoSignatureRequired *
+pk_repo_signature_required_new (void)
+{
+ PkRepoSignatureRequired *repo_signature_required;
+ repo_signature_required = g_object_new (PK_TYPE_REPO_SIGNATURE_REQUIRED, NULL);
+ return PK_REPO_SIGNATURE_REQUIRED (repo_signature_required);
+}
+
diff --git a/lib/packagekit-glib2/pk-repo-signature-required.h b/lib/packagekit-glib2/pk-repo-signature-required.h
new file mode 100644
index 0000000..2ca6066
--- /dev/null
+++ b/lib/packagekit-glib2/pk-repo-signature-required.h
@@ -0,0 +1,67 @@
+/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*-
+ *
+ * Copyright (C) 2009 Richard Hughes <richard at hughsie.com>
+ *
+ * Licensed under the GNU General Public License Version 2
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ */
+
+#if !defined (__PACKAGEKIT_H_INSIDE__) && !defined (PK_COMPILATION)
+#error "Only <packagekit.h> can be included directly."
+#endif
+
+#ifndef __PK_REPO_SIGNATURE_REQUIRED_H
+#define __PK_REPO_SIGNATURE_REQUIRED_H
+
+#include <glib-object.h>
+
+G_BEGIN_DECLS
+
+#define PK_TYPE_REPO_SIGNATURE_REQUIRED (pk_repo_signature_required_get_type ())
+#define PK_REPO_SIGNATURE_REQUIRED(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), PK_TYPE_REPO_SIGNATURE_REQUIRED, PkRepoSignatureRequired))
+#define PK_REPO_SIGNATURE_REQUIRED_CLASS(k) (G_TYPE_CHECK_CLASS_CAST((k), PK_TYPE_REPO_SIGNATURE_REQUIRED, PkRepoSignatureRequiredClass))
+#define PK_IS_REPO_SIGNATURE_REQUIRED(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), PK_TYPE_REPO_SIGNATURE_REQUIRED))
+#define PK_IS_REPO_SIGNATURE_REQUIRED_CLASS(k) (G_TYPE_CHECK_CLASS_TYPE ((k), PK_TYPE_REPO_SIGNATURE_REQUIRED))
+#define PK_REPO_SIGNATURE_REQUIRED_GET_CLASS(o) (G_TYPE_INSTANCE_GET_CLASS ((o), PK_TYPE_REPO_SIGNATURE_REQUIRED, PkRepoSignatureRequiredClass))
+
+typedef struct _PkRepoSignatureRequiredPrivate PkRepoSignatureRequiredPrivate;
+typedef struct _PkRepoSignatureRequired PkRepoSignatureRequired;
+typedef struct _PkRepoSignatureRequiredClass PkRepoSignatureRequiredClass;
+
+struct _PkRepoSignatureRequired
+{
+ GObject parent;
+ PkRepoSignatureRequiredPrivate *priv;
+};
+
+struct _PkRepoSignatureRequiredClass
+{
+ GObjectClass parent_class;
+ /* padding for future expansion */
+ void (*_pk_reserved1) (void);
+ void (*_pk_reserved2) (void);
+ void (*_pk_reserved3) (void);
+ void (*_pk_reserved4) (void);
+ void (*_pk_reserved5) (void);
+};
+
+GType pk_repo_signature_required_get_type (void);
+PkRepoSignatureRequired *pk_repo_signature_required_new (void);
+
+G_END_DECLS
+
+#endif /* __PK_REPO_SIGNATURE_REQUIRED_H */
+
diff --git a/lib/packagekit-glib2/pk-require-restart.c b/lib/packagekit-glib2/pk-require-restart.c
new file mode 100644
index 0000000..dd1101d
--- /dev/null
+++ b/lib/packagekit-glib2/pk-require-restart.c
@@ -0,0 +1,175 @@
+/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*-
+ *
+ * Copyright (C) 2009 Richard Hughes <richard at hughsie.com>
+ *
+ * Licensed under the GNU General Public License Version 2
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ */
+
+/**
+ * SECTION:pk-require-restart
+ * @short_description: RequireRestart object
+ *
+ * This GObject represents a requirement of restart from a transaction.
+ * These objects represent single items of data from the transaction, and are
+ * often present in lists (#PkResults) or just refcounted in client programs.
+ */
+
+#include "config.h"
+
+#include <glib-object.h>
+
+#include <packagekit-glib2/pk-require-restart.h>
+#include <packagekit-glib2/pk-enum.h>
+
+#include "egg-debug.h"
+
+static void pk_require_restart_finalize (GObject *object);
+
+#define PK_REQUIRE_RESTART_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), PK_TYPE_REQUIRE_RESTART, PkRequireRestartPrivate))
+
+/**
+ * PkRequireRestartPrivate:
+ *
+ * Private #PkRequireRestart data
+ **/
+struct _PkRequireRestartPrivate
+{
+ PkRestartEnum restart;
+ gchar *package_id;
+};
+
+enum {
+ PROP_0,
+ PROP_RESTART,
+ PROP_PACKAGE_ID,
+ PROP_LAST
+};
+
+G_DEFINE_TYPE (PkRequireRestart, pk_require_restart, G_TYPE_OBJECT)
+
+/**
+ * pk_require_restart_get_property:
+ **/
+static void
+pk_require_restart_get_property (GObject *object, guint prop_id, GValue *value, GParamSpec *pspec)
+{
+ PkRequireRestart *require_restart = PK_REQUIRE_RESTART (object);
+ PkRequireRestartPrivate *priv = require_restart->priv;
+
+ switch (prop_id) {
+ case PROP_RESTART:
+ g_value_set_uint (value, priv->restart);
+ break;
+ case PROP_PACKAGE_ID:
+ g_value_set_string (value, priv->package_id);
+ break;
+ default:
+ G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
+ break;
+ }
+}
+
+/**
+ * pk_require_restart_set_property:
+ **/
+static void
+pk_require_restart_set_property (GObject *object, guint prop_id, const GValue *value, GParamSpec *pspec)
+{
+ PkRequireRestart *require_restart = PK_REQUIRE_RESTART (object);
+ PkRequireRestartPrivate *priv = require_restart->priv;
+
+ switch (prop_id) {
+ case PROP_RESTART:
+ priv->restart = g_value_get_uint (value);
+ break;
+ case PROP_PACKAGE_ID:
+ g_free (priv->package_id);
+ priv->package_id = g_strdup (g_value_get_string (value));
+ break;
+ default:
+ G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
+ break;
+ }
+}
+
+/**
+ * pk_require_restart_class_init:
+ **/
+static void
+pk_require_restart_class_init (PkRequireRestartClass *klass)
+{
+ GParamSpec *pspec;
+ GObjectClass *object_class = G_OBJECT_CLASS (klass);
+ object_class->finalize = pk_require_restart_finalize;
+ object_class->get_property = pk_require_restart_get_property;
+ object_class->set_property = pk_require_restart_set_property;
+
+ /**
+ * PkRequireRestart:restart:
+ */
+ pspec = g_param_spec_uint ("restart", NULL, NULL,
+ 0, G_MAXUINT, PK_RESTART_ENUM_UNKNOWN,
+ G_PARAM_READWRITE);
+ g_object_class_install_property (object_class, PROP_RESTART, pspec);
+
+ /**
+ * PkRequireRestart:package-id:
+ */
+ pspec = g_param_spec_string ("package-id", NULL, NULL,
+ NULL,
+ G_PARAM_READWRITE);
+ g_object_class_install_property (object_class, PROP_PACKAGE_ID, pspec);
+
+ g_type_class_add_private (klass, sizeof (PkRequireRestartPrivate));
+}
+
+/**
+ * pk_require_restart_init:
+ **/
+static void
+pk_require_restart_init (PkRequireRestart *require_restart)
+{
+ require_restart->priv = PK_REQUIRE_RESTART_GET_PRIVATE (require_restart);
+}
+
+/**
+ * pk_require_restart_finalize:
+ **/
+static void
+pk_require_restart_finalize (GObject *object)
+{
+ PkRequireRestart *require_restart = PK_REQUIRE_RESTART (object);
+ PkRequireRestartPrivate *priv = require_restart->priv;
+
+ g_free (priv->package_id);
+
+ G_OBJECT_CLASS (pk_require_restart_parent_class)->finalize (object);
+}
+
+/**
+ * pk_require_restart_new:
+ *
+ * Return value: a new PkRequireRestart object.
+ **/
+PkRequireRestart *
+pk_require_restart_new (void)
+{
+ PkRequireRestart *require_restart;
+ require_restart = g_object_new (PK_TYPE_REQUIRE_RESTART, NULL);
+ return PK_REQUIRE_RESTART (require_restart);
+}
+
diff --git a/lib/packagekit-glib2/pk-require-restart.h b/lib/packagekit-glib2/pk-require-restart.h
new file mode 100644
index 0000000..a13f7c2
--- /dev/null
+++ b/lib/packagekit-glib2/pk-require-restart.h
@@ -0,0 +1,67 @@
+/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*-
+ *
+ * Copyright (C) 2009 Richard Hughes <richard at hughsie.com>
+ *
+ * Licensed under the GNU General Public License Version 2
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ */
+
+#if !defined (__PACKAGEKIT_H_INSIDE__) && !defined (PK_COMPILATION)
+#error "Only <packagekit.h> can be included directly."
+#endif
+
+#ifndef __PK_REQUIRE_RESTART_H
+#define __PK_REQUIRE_RESTART_H
+
+#include <glib-object.h>
+
+G_BEGIN_DECLS
+
+#define PK_TYPE_REQUIRE_RESTART (pk_require_restart_get_type ())
+#define PK_REQUIRE_RESTART(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), PK_TYPE_REQUIRE_RESTART, PkRequireRestart))
+#define PK_REQUIRE_RESTART_CLASS(k) (G_TYPE_CHECK_CLASS_CAST((k), PK_TYPE_REQUIRE_RESTART, PkRequireRestartClass))
+#define PK_IS_REQUIRE_RESTART(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), PK_TYPE_REQUIRE_RESTART))
+#define PK_IS_REQUIRE_RESTART_CLASS(k) (G_TYPE_CHECK_CLASS_TYPE ((k), PK_TYPE_REQUIRE_RESTART))
+#define PK_REQUIRE_RESTART_GET_CLASS(o) (G_TYPE_INSTANCE_GET_CLASS ((o), PK_TYPE_REQUIRE_RESTART, PkRequireRestartClass))
+
+typedef struct _PkRequireRestartPrivate PkRequireRestartPrivate;
+typedef struct _PkRequireRestart PkRequireRestart;
+typedef struct _PkRequireRestartClass PkRequireRestartClass;
+
+struct _PkRequireRestart
+{
+ GObject parent;
+ PkRequireRestartPrivate *priv;
+};
+
+struct _PkRequireRestartClass
+{
+ GObjectClass parent_class;
+ /* padding for future expansion */
+ void (*_pk_reserved1) (void);
+ void (*_pk_reserved2) (void);
+ void (*_pk_reserved3) (void);
+ void (*_pk_reserved4) (void);
+ void (*_pk_reserved5) (void);
+};
+
+GType pk_require_restart_get_type (void);
+PkRequireRestart *pk_require_restart_new (void);
+
+G_END_DECLS
+
+#endif /* __PK_REQUIRE_RESTART_H */
+
diff --git a/lib/packagekit-glib2/pk-results.c b/lib/packagekit-glib2/pk-results.c
index 7f623f2..c599bd9 100644
--- a/lib/packagekit-glib2/pk-results.c
+++ b/lib/packagekit-glib2/pk-results.c
@@ -34,7 +34,6 @@
#include <glib-object.h>
#include <packagekit-glib2/pk-results.h>
-#include <packagekit-glib2/pk-item.h>
#include <packagekit-glib2/pk-enum.h>
#include "egg-debug.h"
@@ -54,7 +53,7 @@ struct _PkResultsPrivate
guint inputs;
PkProgress *progress;
PkExitEnum exit_enum;
- PkItemErrorCode *error_code;
+ PkErrorCode *error_code;
GPtrArray *package_array;
GPtrArray *details_array;
GPtrArray *update_detail_array;
@@ -162,13 +161,13 @@ pk_results_set_exit_code (PkResults *results, PkExitEnum exit_enum)
* Return value: %TRUE if the value was set
**/
gboolean
-pk_results_add_package (PkResults *results, PkItemPackage *item)
+pk_results_add_package (PkResults *results, PkPackage *item)
{
g_return_val_if_fail (PK_IS_RESULTS (results), FALSE);
g_return_val_if_fail (item != NULL, FALSE);
/* copy and add to array */
- g_ptr_array_add (results->priv->package_array, pk_item_package_ref (item));
+ g_ptr_array_add (results->priv->package_array, g_object_ref (item));
return TRUE;
}
@@ -183,13 +182,13 @@ pk_results_add_package (PkResults *results, PkItemPackage *item)
* Return value: %TRUE if the value was set
**/
gboolean
-pk_results_add_details (PkResults *results, PkItemDetails *item)
+pk_results_add_details (PkResults *results, PkDetails *item)
{
g_return_val_if_fail (PK_IS_RESULTS (results), FALSE);
g_return_val_if_fail (item != NULL, FALSE);
/* copy and add to array */
- g_ptr_array_add (results->priv->details_array, pk_item_details_ref (item));
+ g_ptr_array_add (results->priv->details_array, g_object_ref (item));
return TRUE;
}
@@ -204,13 +203,13 @@ pk_results_add_details (PkResults *results, PkItemDetails *item)
* Return value: %TRUE if the value was set
**/
gboolean
-pk_results_add_update_detail (PkResults *results, PkItemUpdateDetail *item)
+pk_results_add_update_detail (PkResults *results, PkUpdateDetail *item)
{
g_return_val_if_fail (PK_IS_RESULTS (results), FALSE);
g_return_val_if_fail (item != NULL, FALSE);
/* copy and add to array */
- g_ptr_array_add (results->priv->update_detail_array, pk_item_update_detail_ref (item));
+ g_ptr_array_add (results->priv->update_detail_array, g_object_ref (item));
return TRUE;
}
@@ -225,13 +224,13 @@ pk_results_add_update_detail (PkResults *results, PkItemUpdateDetail *item)
* Return value: %TRUE if the value was set
**/
gboolean
-pk_results_add_category (PkResults *results, PkItemCategory *item)
+pk_results_add_category (PkResults *results, PkCategory *item)
{
g_return_val_if_fail (PK_IS_RESULTS (results), FALSE);
g_return_val_if_fail (item != NULL, FALSE);
/* copy and add to array */
- g_ptr_array_add (results->priv->category_array, pk_item_category_ref (item));
+ g_ptr_array_add (results->priv->category_array, g_object_ref (item));
return TRUE;
}
@@ -246,13 +245,13 @@ pk_results_add_category (PkResults *results, PkItemCategory *item)
* Return value: %TRUE if the value was set
**/
gboolean
-pk_results_add_distro_upgrade (PkResults *results, PkItemDistroUpgrade *item)
+pk_results_add_distro_upgrade (PkResults *results, PkDistroUpgrade *item)
{
g_return_val_if_fail (PK_IS_RESULTS (results), FALSE);
g_return_val_if_fail (item != NULL, FALSE);
/* copy and add to array */
- g_ptr_array_add (results->priv->distro_upgrade_array, pk_item_distro_upgrade_ref (item));
+ g_ptr_array_add (results->priv->distro_upgrade_array, g_object_ref (item));
return TRUE;
}
@@ -267,13 +266,13 @@ pk_results_add_distro_upgrade (PkResults *results, PkItemDistroUpgrade *item)
* Return value: %TRUE if the value was set
**/
gboolean
-pk_results_add_require_restart (PkResults *results, PkItemRequireRestart *item)
+pk_results_add_require_restart (PkResults *results, PkRequireRestart *item)
{
g_return_val_if_fail (PK_IS_RESULTS (results), FALSE);
g_return_val_if_fail (item != NULL, FALSE);
/* copy and add to array */
- g_ptr_array_add (results->priv->require_restart_array, pk_item_require_restart_ref (item));
+ g_ptr_array_add (results->priv->require_restart_array, g_object_ref (item));
return TRUE;
}
@@ -288,13 +287,13 @@ pk_results_add_require_restart (PkResults *results, PkItemRequireRestart *item)
* Return value: %TRUE if the value was set
**/
gboolean
-pk_results_add_transaction (PkResults *results, PkItemTransaction *item)
+pk_results_add_transaction (PkResults *results, PkTransactionPast *item)
{
g_return_val_if_fail (PK_IS_RESULTS (results), FALSE);
g_return_val_if_fail (item != NULL, FALSE);
/* copy and add to array */
- g_ptr_array_add (results->priv->transaction_array, pk_item_transaction_ref (item));
+ g_ptr_array_add (results->priv->transaction_array, g_object_ref (item));
return TRUE;
}
@@ -309,13 +308,13 @@ pk_results_add_transaction (PkResults *results, PkItemTransaction *item)
* Return value: %TRUE if the value was set
**/
gboolean
-pk_results_add_files (PkResults *results, PkItemFiles *item)
+pk_results_add_files (PkResults *results, PkFiles *item)
{
g_return_val_if_fail (PK_IS_RESULTS (results), FALSE);
g_return_val_if_fail (item != NULL, FALSE);
/* copy and add to array */
- g_ptr_array_add (results->priv->files_array, pk_item_files_ref (item));
+ g_ptr_array_add (results->priv->files_array, g_object_ref (item));
return TRUE;
}
@@ -330,13 +329,13 @@ pk_results_add_files (PkResults *results, PkItemFiles *item)
* Return value: %TRUE if the value was set
**/
gboolean
-pk_results_add_repo_signature_required (PkResults *results, PkItemRepoSignatureRequired *item)
+pk_results_add_repo_signature_required (PkResults *results, PkRepoSignatureRequired *item)
{
g_return_val_if_fail (PK_IS_RESULTS (results), FALSE);
g_return_val_if_fail (item != NULL, FALSE);
/* copy and add to array */
- g_ptr_array_add (results->priv->repo_signature_required_array, pk_item_repo_signature_required_ref (item));
+ g_ptr_array_add (results->priv->repo_signature_required_array, g_object_ref (item));
return TRUE;
}
@@ -351,13 +350,13 @@ pk_results_add_repo_signature_required (PkResults *results, PkItemRepoSignatureR
* Return value: %TRUE if the value was set
**/
gboolean
-pk_results_add_eula_required (PkResults *results, PkItemEulaRequired *item)
+pk_results_add_eula_required (PkResults *results, PkEulaRequired *item)
{
g_return_val_if_fail (PK_IS_RESULTS (results), FALSE);
g_return_val_if_fail (item != NULL, FALSE);
/* copy and add to array */
- g_ptr_array_add (results->priv->eula_required_array, pk_item_eula_required_ref (item));
+ g_ptr_array_add (results->priv->eula_required_array, g_object_ref (item));
return TRUE;
}
@@ -372,13 +371,13 @@ pk_results_add_eula_required (PkResults *results, PkItemEulaRequired *item)
* Return value: %TRUE if the value was set
**/
gboolean
-pk_results_add_media_change_required (PkResults *results, PkItemMediaChangeRequired *item)
+pk_results_add_media_change_required (PkResults *results, PkMediaChangeRequired *item)
{
g_return_val_if_fail (PK_IS_RESULTS (results), FALSE);
g_return_val_if_fail (item != NULL, FALSE);
/* copy and add to array */
- g_ptr_array_add (results->priv->media_change_required_array, pk_item_media_change_required_ref (item));
+ g_ptr_array_add (results->priv->media_change_required_array, g_object_ref (item));
return TRUE;
}
@@ -393,13 +392,13 @@ pk_results_add_media_change_required (PkResults *results, PkItemMediaChangeRequi
* Return value: %TRUE if the value was set
**/
gboolean
-pk_results_add_repo_detail (PkResults *results, PkItemRepoDetail *item)
+pk_results_add_repo_detail (PkResults *results, PkRepoDetail *item)
{
g_return_val_if_fail (PK_IS_RESULTS (results), FALSE);
g_return_val_if_fail (item != NULL, FALSE);
/* copy and add to array */
- g_ptr_array_add (results->priv->repo_detail_array, pk_item_repo_detail_ref (item));
+ g_ptr_array_add (results->priv->repo_detail_array, g_object_ref (item));
return TRUE;
}
@@ -414,15 +413,15 @@ pk_results_add_repo_detail (PkResults *results, PkItemRepoDetail *item)
* Return value: %TRUE if the value was set
**/
gboolean
-pk_results_set_error_code (PkResults *results, PkItemErrorCode *item)
+pk_results_set_error_code (PkResults *results, PkErrorCode *item)
{
g_return_val_if_fail (PK_IS_RESULTS (results), FALSE);
g_return_val_if_fail (item != NULL, FALSE);
/* unref old error, then ref */
if (results->priv->error_code != NULL)
- pk_item_error_code_unref (results->priv->error_code);
- results->priv->error_code = pk_item_error_code_ref (item);
+ g_object_unref (results->priv->error_code);
+ results->priv->error_code = g_object_ref (item);
return TRUE;
}
@@ -437,13 +436,13 @@ pk_results_set_error_code (PkResults *results, PkItemErrorCode *item)
* Return value: %TRUE if the value was set
**/
gboolean
-pk_results_add_message (PkResults *results, PkItemMessage *item)
+pk_results_add_message (PkResults *results, PkMessage *item)
{
g_return_val_if_fail (PK_IS_RESULTS (results), FALSE);
g_return_val_if_fail (item != NULL, FALSE);
/* copy and add to array */
- g_ptr_array_add (results->priv->message_array, pk_item_message_ref (item));
+ g_ptr_array_add (results->priv->message_array, g_object_ref (item));
return TRUE;
}
@@ -470,9 +469,9 @@ pk_results_get_exit_code (PkResults *results)
*
* Gets the last error code from the transaction.
*
- * Return value: A #PkItemErrorCode, or %NULL, free with pk_item_error_code_unref()
+ * Return value: A #PkErrorCode, or %NULL, free with g_object_unref()
**/
-PkItemErrorCode *
+PkErrorCode *
pk_results_get_error_code (PkResults *results)
{
g_return_val_if_fail (PK_IS_RESULTS (results), FALSE);
@@ -483,7 +482,7 @@ pk_results_get_error_code (PkResults *results)
if (results->priv->error_code == NULL)
return NULL;
- return pk_item_error_code_ref (results->priv->error_code);
+ return g_object_ref (results->priv->error_code);
}
/**
@@ -492,7 +491,7 @@ pk_results_get_error_code (PkResults *results)
*
* Gets the packages from the transaction.
*
- * Return value: A #GPtrArray array of #PkItemDetails's, free with g_ptr_array_unref().
+ * Return value: A #GPtrArray array of #PkDetails's, free with g_ptr_array_unref().
**/
GPtrArray *
pk_results_get_package_array (PkResults *results)
@@ -516,8 +515,6 @@ pk_results_get_package_sack (PkResults *results)
PkPackageSack *sack;
GPtrArray *array;
guint i;
- const PkItemPackage *item;
- gboolean ret;
g_return_val_if_fail (PK_IS_RESULTS (results), NULL);
@@ -527,22 +524,8 @@ pk_results_get_package_sack (PkResults *results)
/* go through each of the bare packages */
array = results->priv->package_array;
for (i=0; i<array->len; i++) {
- item = g_ptr_array_index (array, i);
-
- /* create a PkPackage object */
- package = pk_package_new ();
- ret = pk_package_set_id (package, item->package_id, NULL);
- if (!ret)
- egg_error ("couldn't add package ID, internal error");
-
- /* set data we already know */
- g_object_set (package,
- "info", item->info,
- "summary", item->summary,
- NULL);
-
- /* add to sack */
- pk_package_sack_add_package (sack, package);
+ package = g_ptr_array_index (array, i);
+ pk_package_sack_add_package (sack, g_object_ref (package));
g_object_unref (package);
}
@@ -555,7 +538,7 @@ pk_results_get_package_sack (PkResults *results)
*
* Gets the package details from the transaction.
*
- * Return value: A #GPtrArray array of #PkItemPackage's, free with g_ptr_array_unref().
+ * Return value: A #GPtrArray array of #PkPackage's, free with g_ptr_array_unref().
**/
GPtrArray *
pk_results_get_details_array (PkResults *results)
@@ -570,7 +553,7 @@ pk_results_get_details_array (PkResults *results)
*
* Gets the update details from the transaction.
*
- * Return value: A #GPtrArray array of #PkItemUpdateDetail's, free with g_ptr_array_unref().
+ * Return value: A #GPtrArray array of #PkUpdateDetail's, free with g_ptr_array_unref().
**/
GPtrArray *
pk_results_get_update_detail_array (PkResults *results)
@@ -585,7 +568,7 @@ pk_results_get_update_detail_array (PkResults *results)
*
* Gets the categories from the transaction.
*
- * Return value: A #GPtrArray array of #PkItemCategory's, free with g_ptr_array_unref().
+ * Return value: A #GPtrArray array of #PkCategory's, free with g_ptr_array_unref().
**/
GPtrArray *
pk_results_get_category_array (PkResults *results)
@@ -600,7 +583,7 @@ pk_results_get_category_array (PkResults *results)
*
* Gets the distribution upgrades from the transaction.
*
- * Return value: A #GPtrArray array of #PkItemDistroUpgrade's, free with g_ptr_array_unref().
+ * Return value: A #GPtrArray array of #PkDistroUpgrade's, free with g_ptr_array_unref().
**/
GPtrArray *
pk_results_get_distro_upgrade_array (PkResults *results)
@@ -615,7 +598,7 @@ pk_results_get_distro_upgrade_array (PkResults *results)
*
* Gets the require restarts from the transaction.
*
- * Return value: A #GPtrArray array of #PkItemRequireRestart's, free with g_ptr_array_unref().
+ * Return value: A #GPtrArray array of #PkRequireRestart's, free with g_ptr_array_unref().
**/
GPtrArray *
pk_results_get_require_restart_array (PkResults *results)
@@ -643,16 +626,20 @@ pk_results_get_require_restart_worst (PkResults *results)
{
GPtrArray *array;
PkRestartEnum worst = 0;
+ PkRestartEnum restart;
guint i;
- const PkItemRequireRestart *item;
+ PkRequireRestart *item;
g_return_val_if_fail (PK_IS_RESULTS (results), 0);
array = results->priv->require_restart_array;
for (i=0; i<array->len; i++) {
item = g_ptr_array_index (array, i);
- if (item->restart > worst)
- worst = item->restart;
+ g_object_get (item,
+ "restart", &restart,
+ NULL);
+ if (restart > worst)
+ worst = restart;
}
return worst;
@@ -664,7 +651,7 @@ pk_results_get_require_restart_worst (PkResults *results)
*
* Gets the transactions from the transaction.
*
- * Return value: A #GPtrArray array of #PkItemTransaction's, free with g_ptr_array_unref().
+ * Return value: A #GPtrArray array of #PkTransactionPast's, free with g_ptr_array_unref().
**/
GPtrArray *
pk_results_get_transaction_array (PkResults *results)
@@ -679,7 +666,7 @@ pk_results_get_transaction_array (PkResults *results)
*
* Gets the files from the transaction.
*
- * Return value: A #GPtrArray array of #PkItemFiles's, free with g_ptr_array_unref().
+ * Return value: A #GPtrArray array of #PkFiles's, free with g_ptr_array_unref().
**/
GPtrArray *
pk_results_get_files_array (PkResults *results)
@@ -694,7 +681,7 @@ pk_results_get_files_array (PkResults *results)
*
* Gets the repository signatures required from the transaction.
*
- * Return value: A #GPtrArray array of #PkItemRepoSignatureRequired's, free with g_ptr_array_unref().
+ * Return value: A #GPtrArray array of #PkRepoSignatureRequired's, free with g_ptr_array_unref().
**/
GPtrArray *
pk_results_get_repo_signature_required_array (PkResults *results)
@@ -709,7 +696,7 @@ pk_results_get_repo_signature_required_array (PkResults *results)
*
* Gets the eulas required from the transaction.
*
- * Return value: A #GPtrArray array of #PkItemEulaRequired's, free with g_ptr_array_unref().
+ * Return value: A #GPtrArray array of #PkEulaRequired's, free with g_ptr_array_unref().
**/
GPtrArray *
pk_results_get_eula_required_array (PkResults *results)
@@ -724,7 +711,7 @@ pk_results_get_eula_required_array (PkResults *results)
*
* Gets the media changes required from the transaction.
*
- * Return value: A #GPtrArray array of #PkItemMediaChangeRequired's, free with g_ptr_array_unref().
+ * Return value: A #GPtrArray array of #PkMediaChangeRequired's, free with g_ptr_array_unref().
**/
GPtrArray *
pk_results_get_media_change_required_array (PkResults *results)
@@ -739,7 +726,7 @@ pk_results_get_media_change_required_array (PkResults *results)
*
* Gets the repository details from the transaction.
*
- * Return value: A #GPtrArray array of #PkItemRepoDetail's, free with g_ptr_array_unref().
+ * Return value: A #GPtrArray array of #PkRepoDetail's, free with g_ptr_array_unref().
**/
GPtrArray *
pk_results_get_repo_detail_array (PkResults *results)
@@ -754,7 +741,7 @@ pk_results_get_repo_detail_array (PkResults *results)
*
* Gets the messages from the transaction.
*
- * Return value: A #GPtrArray array of #PkItemMessage's, free with g_ptr_array_unref().
+ * Return value: A #GPtrArray array of #PkMessage's, free with g_ptr_array_unref().
**/
GPtrArray *
pk_results_get_message_array (PkResults *results)
@@ -815,19 +802,19 @@ pk_results_init (PkResults *results)
results->priv->inputs = 0;
results->priv->progress = NULL;
results->priv->error_code = NULL;
- results->priv->package_array = g_ptr_array_new_with_free_func ((GDestroyNotify) pk_item_package_unref);
- results->priv->details_array = g_ptr_array_new_with_free_func ((GDestroyNotify) pk_item_details_unref);
- results->priv->update_detail_array = g_ptr_array_new_with_free_func ((GDestroyNotify) pk_item_update_detail_unref);
- results->priv->category_array = g_ptr_array_new_with_free_func ((GDestroyNotify) pk_item_category_unref);
- results->priv->distro_upgrade_array = g_ptr_array_new_with_free_func ((GDestroyNotify) pk_item_distro_upgrade_unref);
- results->priv->require_restart_array = g_ptr_array_new_with_free_func ((GDestroyNotify) pk_item_require_restart_unref);
- results->priv->transaction_array = g_ptr_array_new_with_free_func ((GDestroyNotify) pk_item_transaction_unref);
- results->priv->files_array = g_ptr_array_new_with_free_func ((GDestroyNotify) pk_item_files_unref);
- results->priv->repo_signature_required_array = g_ptr_array_new_with_free_func ((GDestroyNotify) pk_item_repo_signature_required_unref);
- results->priv->eula_required_array = g_ptr_array_new_with_free_func ((GDestroyNotify) pk_item_eula_required_unref);
- results->priv->media_change_required_array = g_ptr_array_new_with_free_func ((GDestroyNotify) pk_item_media_change_required_unref);
- results->priv->repo_detail_array = g_ptr_array_new_with_free_func ((GDestroyNotify) pk_item_repo_detail_unref);
- results->priv->message_array = g_ptr_array_new_with_free_func ((GDestroyNotify) pk_item_message_unref);
+ results->priv->package_array = g_ptr_array_new_with_free_func ((GDestroyNotify) g_object_unref);
+ results->priv->details_array = g_ptr_array_new_with_free_func ((GDestroyNotify) g_object_unref);
+ results->priv->update_detail_array = g_ptr_array_new_with_free_func ((GDestroyNotify) g_object_unref);
+ results->priv->category_array = g_ptr_array_new_with_free_func ((GDestroyNotify) g_object_unref);
+ results->priv->distro_upgrade_array = g_ptr_array_new_with_free_func ((GDestroyNotify) g_object_unref);
+ results->priv->require_restart_array = g_ptr_array_new_with_free_func ((GDestroyNotify) g_object_unref);
+ results->priv->transaction_array = g_ptr_array_new_with_free_func ((GDestroyNotify) g_object_unref);
+ results->priv->files_array = g_ptr_array_new_with_free_func ((GDestroyNotify) g_object_unref);
+ results->priv->repo_signature_required_array = g_ptr_array_new_with_free_func ((GDestroyNotify) g_object_unref);
+ results->priv->eula_required_array = g_ptr_array_new_with_free_func ((GDestroyNotify) g_object_unref);
+ results->priv->media_change_required_array = g_ptr_array_new_with_free_func ((GDestroyNotify) g_object_unref);
+ results->priv->repo_detail_array = g_ptr_array_new_with_free_func ((GDestroyNotify) g_object_unref);
+ results->priv->message_array = g_ptr_array_new_with_free_func ((GDestroyNotify) g_object_unref);
}
/**
@@ -855,7 +842,7 @@ pk_results_finalize (GObject *object)
if (results->priv->progress != NULL)
g_object_unref (results->priv->progress);
if (results->priv->error_code != NULL)
- pk_item_error_code_unref (results->priv->error_code);
+ g_object_unref (results->priv->error_code);
G_OBJECT_CLASS (pk_results_parent_class)->finalize (object);
}
@@ -887,7 +874,10 @@ pk_results_test (gpointer user_data)
PkResults *results;
PkExitEnum exit_enum;
GPtrArray *packages;
- PkItemPackage *item;
+ PkPackage *item;
+ PkInfoEnum info;
+ gchar *package_id;
+ gchar *summary;
if (!egg_test_start (test, "PkResults"))
return;
@@ -920,9 +910,14 @@ pk_results_test (gpointer user_data)
/************************************************************/
egg_test_title (test, "add package");
- item = pk_item_package_new (PK_INFO_ENUM_AVAILABLE, "gnome-power-manager;0.1.2;i386;fedora", "Power manager for GNOME");
+ item = pk_package_new ();
+ g_object_set (item,
+ "info", PK_INFO_ENUM_AVAILABLE,
+ "package-id", "gnome-power-manager;0.1.2;i386;fedora",
+ "summary", "Power manager for GNOME",
+ NULL);
ret = pk_results_add_package (results, item);
- pk_item_package_unref (item);
+ g_object_unref (item);
egg_test_assert (test, ret);
/************************************************************/
@@ -933,18 +928,32 @@ pk_results_test (gpointer user_data)
/************************************************************/
egg_test_title (test, "check data");
item = g_ptr_array_index (packages, 0);
- egg_test_assert (test, (item->info == PK_INFO_ENUM_AVAILABLE &&
- g_strcmp0 ("gnome-power-manager;0.1.2;i386;fedora", item->package_id) == 0 &&
- g_strcmp0 ("Power manager for GNOME", item->summary) == 0));
- pk_item_package_ref (item);
+ g_object_get (item,
+ "info", &info,
+ "package-id", &package_id,
+ "summary", &summary,
+ NULL);
+ egg_test_assert (test, (info == PK_INFO_ENUM_AVAILABLE &&
+ g_strcmp0 ("gnome-power-manager;0.1.2;i386;fedora", package_id) == 0 &&
+ g_strcmp0 ("Power manager for GNOME", summary) == 0));
+ g_object_ref (item);
g_ptr_array_unref (packages);
+ g_free (package_id);
+ g_free (summary);
/************************************************************/
egg_test_title (test, "check ref");
- egg_test_assert (test, (item->info == PK_INFO_ENUM_AVAILABLE &&
- g_strcmp0 ("gnome-power-manager;0.1.2;i386;fedora", item->package_id) == 0 &&
- g_strcmp0 ("Power manager for GNOME", item->summary) == 0));
- pk_item_package_unref (item);
+ g_object_get (item,
+ "info", &info,
+ "package-id", &package_id,
+ "summary", &summary,
+ NULL);
+ egg_test_assert (test, (info == PK_INFO_ENUM_AVAILABLE &&
+ g_strcmp0 ("gnome-power-manager;0.1.2;i386;fedora", package_id) == 0 &&
+ g_strcmp0 ("Power manager for GNOME", summary) == 0));
+ g_object_unref (item);
+ g_free (package_id);
+ g_free (summary);
g_object_unref (results);
egg_test_end (test);
diff --git a/lib/packagekit-glib2/pk-results.h b/lib/packagekit-glib2/pk-results.h
index 713fe94..fce6386 100644
--- a/lib/packagekit-glib2/pk-results.h
+++ b/lib/packagekit-glib2/pk-results.h
@@ -27,9 +27,21 @@
#define __PK_RESULTS_H
#include <glib-object.h>
+#include <packagekit-glib2/pk-category.h>
+#include <packagekit-glib2/pk-details.h>
+#include <packagekit-glib2/pk-distro-upgrade.h>
#include <packagekit-glib2/pk-enum.h>
+#include <packagekit-glib2/pk-error-code.h>
+#include <packagekit-glib2/pk-eula-required.h>
+#include <packagekit-glib2/pk-files.h>
+#include <packagekit-glib2/pk-media-change-required.h>
+#include <packagekit-glib2/pk-message.h>
#include <packagekit-glib2/pk-package-sack.h>
-#include <packagekit-glib2/pk-item.h>
+#include <packagekit-glib2/pk-repo-detail.h>
+#include <packagekit-glib2/pk-repo-signature-required.h>
+#include <packagekit-glib2/pk-require-restart.h>
+#include <packagekit-glib2/pk-transaction-past.h>
+#include <packagekit-glib2/pk-update-detail.h>
G_BEGIN_DECLS
@@ -72,40 +84,40 @@ void pk_results_test (gpointer user_data);
gboolean pk_results_set_exit_code (PkResults *results,
PkExitEnum exit_enum);
gboolean pk_results_set_error_code (PkResults *results,
- PkItemErrorCode *item);
+ PkErrorCode *item);
/* add */
gboolean pk_results_add_package (PkResults *results,
- PkItemPackage *item);
+ PkPackage *item);
gboolean pk_results_add_details (PkResults *results,
- PkItemDetails *item);
+ PkDetails *item);
gboolean pk_results_add_update_detail (PkResults *results,
- PkItemUpdateDetail *item);
+ PkUpdateDetail *item);
gboolean pk_results_add_category (PkResults *results,
- PkItemCategory *item);
+ PkCategory *item);
gboolean pk_results_add_distro_upgrade (PkResults *results,
- PkItemDistroUpgrade *item);
+ PkDistroUpgrade *item);
gboolean pk_results_add_require_restart (PkResults *results,
- PkItemRequireRestart *item);
+ PkRequireRestart *item);
gboolean pk_results_add_transaction (PkResults *results,
- PkItemTransaction *item);
+ PkTransactionPast *item);
gboolean pk_results_add_files (PkResults *results,
- PkItemFiles *item);
+ PkFiles *item);
gboolean pk_results_add_repo_signature_required (PkResults *results,
- PkItemRepoSignatureRequired *item);
+ PkRepoSignatureRequired *item);
gboolean pk_results_add_eula_required (PkResults *results,
- PkItemEulaRequired *item);
+ PkEulaRequired *item);
gboolean pk_results_add_media_change_required (PkResults *results,
- PkItemMediaChangeRequired *item);
+ PkMediaChangeRequired *item);
gboolean pk_results_add_repo_detail (PkResults *results,
- PkItemRepoDetail *item);
+ PkRepoDetail *item);
gboolean pk_results_add_message (PkResults *results,
- PkItemMessage *item);
+ PkMessage *item);
/* get single data */
PkExitEnum pk_results_get_exit_code (PkResults *results);
PkPackageSack *pk_results_get_package_sack (PkResults *results);
-PkItemErrorCode *pk_results_get_error_code (PkResults *results);
+PkErrorCode *pk_results_get_error_code (PkResults *results);
PkRestartEnum pk_results_get_require_restart_worst (PkResults *results);
/* get array objects */
diff --git a/lib/packagekit-glib2/pk-self-test.c b/lib/packagekit-glib2/pk-self-test.c
index 081a5ff..4719d42 100644
--- a/lib/packagekit-glib2/pk-self-test.c
+++ b/lib/packagekit-glib2/pk-self-test.c
@@ -62,7 +62,6 @@ main (int argc, char **argv)
pk_package_id_test (test);
pk_package_ids_test (test);
pk_progress_test (test);
- pk_item_test (test);
pk_results_test (test);
pk_package_test (test);
pk_control_test (test);
diff --git a/lib/packagekit-glib2/pk-service-pack.c b/lib/packagekit-glib2/pk-service-pack.c
index 24b6bed..ef945cc 100644
--- a/lib/packagekit-glib2/pk-service-pack.c
+++ b/lib/packagekit-glib2/pk-service-pack.c
@@ -665,7 +665,8 @@ pk_service_pack_get_files_from_array (const GPtrArray *array)
{
gchar **files = NULL;
guint i;
- const PkItemFiles *item;
+ PkFiles *item;
+ gchar **files_tmp = NULL;
/* internal error */
if (array == NULL) {
@@ -677,8 +678,12 @@ pk_service_pack_get_files_from_array (const GPtrArray *array)
files = g_new0 (gchar *, array->len + 1);
for (i=0; i<array->len; i++) {
item = g_ptr_array_index (array, i);
+ g_object_get (item,
+ "files", &files_tmp,
+ NULL);
/* assume only one file per package */
- files[i] = g_strdup (item->files[0]);
+ files[i] = g_strdup (files_tmp[0]);
+ g_strfreev (files_tmp);
}
out:
return files;
@@ -696,7 +701,7 @@ pk_service_pack_download_ready_cb (GObject *source_object, GAsyncResult *res, Pk
gboolean ret;
gchar **files = NULL;
GPtrArray *array = NULL;
- PkItemErrorCode *error_item = NULL;
+ PkErrorCode *error_code = NULL;
/* get the results */
results = pk_client_generic_finish (client, res, &error);
@@ -707,9 +712,9 @@ pk_service_pack_download_ready_cb (GObject *source_object, GAsyncResult *res, Pk
}
/* check error code */
- error_item = pk_results_get_error_code (results);
- if (error_item != NULL) {
- error = g_error_new (1, 0, "failed to download: %s", error_item->details);
+ error_code = pk_results_get_error_code (results);
+ if (error_code != NULL) {
+ error = g_error_new (1, 0, "failed to download: %s", pk_error_code_get_details (error_code));
pk_service_pack_generic_state_finish (state, error);
g_error_free (error);
goto out;
@@ -734,8 +739,8 @@ pk_service_pack_download_ready_cb (GObject *source_object, GAsyncResult *res, Pk
pk_service_pack_generic_state_finish (state, error);
out:
g_strfreev (files);
- if (error_item != NULL)
- pk_item_error_code_unref (error_item);
+ if (error_code != NULL)
+ g_object_unref (error_code);
if (array != NULL)
g_ptr_array_unref (array);
if (results != NULL)
@@ -772,10 +777,10 @@ pk_service_pack_get_depends_ready_cb (GObject *source_object, GAsyncResult *res,
GPtrArray *array = NULL;
guint i;
guint j = 0;
- const PkItemPackage *package;
+ PkPackage *package;
gchar **package_ids = NULL;
gchar **package_ids_to_download = NULL;
- PkItemErrorCode *error_item = NULL;
+ PkErrorCode *error_code = NULL;
/* get the results */
results = pk_client_generic_finish (client, res, &error);
@@ -786,9 +791,9 @@ pk_service_pack_get_depends_ready_cb (GObject *source_object, GAsyncResult *res,
}
/* check error code */
- error_item = pk_results_get_error_code (results);
- if (error_item != NULL) {
- error = g_error_new (1, 0, "failed to download: %s", error_item->details);
+ error_code = pk_results_get_error_code (results);
+ if (error_code != NULL) {
+ error = g_error_new (1, 0, "failed to download: %s", pk_error_code_get_details (error_code));
pk_service_pack_generic_state_finish (state, error);
g_error_free (error);
goto out;
@@ -800,8 +805,8 @@ pk_service_pack_get_depends_ready_cb (GObject *source_object, GAsyncResult *res,
for (i=0; i<array->len; i++) {
package = g_ptr_array_index (array, i);
/* only add if the ID is not in the excludes list */
- if (!pk_service_pack_in_excludes_list (state, package->package_id))
- package_ids[j++] = g_strdup (package->package_id);
+ if (!pk_service_pack_in_excludes_list (state, pk_package_get_id (package)))
+ package_ids[j++] = g_strdup (pk_package_get_id (package));
}
package_ids_to_download = pk_package_ids_add_ids (state->package_ids, package_ids);
@@ -812,8 +817,8 @@ pk_service_pack_get_depends_ready_cb (GObject *source_object, GAsyncResult *res,
out:
g_strfreev (package_ids);
g_strfreev (package_ids_to_download);
- if (error_item != NULL)
- pk_item_error_code_unref (error_item);
+ if (error_code != NULL)
+ g_object_unref (error_code);
if (array != NULL)
g_ptr_array_unref (array);
if (results != NULL)
@@ -881,8 +886,8 @@ pk_service_pack_get_updates_ready_cb (GObject *source_object, GAsyncResult *res,
PkResults *results;
GPtrArray *array = NULL;
guint i;
- const PkItemPackage *package;
- PkItemErrorCode *error_item = NULL;
+ PkPackage *package;
+ PkErrorCode *error_code = NULL;
/* get the results */
results = pk_client_generic_finish (client, res, &error);
@@ -893,9 +898,9 @@ pk_service_pack_get_updates_ready_cb (GObject *source_object, GAsyncResult *res,
}
/* check error code */
- error_item = pk_results_get_error_code (results);
- if (error_item != NULL) {
- error = g_error_new (1, 0, "failed to get updates: %s", error_item->details);
+ error_code = pk_results_get_error_code (results);
+ if (error_code != NULL) {
+ error = g_error_new (1, 0, "failed to get updates: %s", pk_error_code_get_details (error_code));
pk_service_pack_generic_state_finish (state, error);
g_error_free (error);
goto out;
@@ -906,7 +911,7 @@ pk_service_pack_get_updates_ready_cb (GObject *source_object, GAsyncResult *res,
state->package_ids = g_new0 (gchar *, array->len + 1);
for (i=0; i<array->len; i++) {
package = g_ptr_array_index (array, i);
- state->package_ids[i] = g_strdup (package->package_id);
+ state->package_ids[i] = g_strdup (pk_package_get_id (package));
}
/* get deps, TODO: use NEWEST? */
@@ -914,8 +919,8 @@ pk_service_pack_get_updates_ready_cb (GObject *source_object, GAsyncResult *res,
state->cancellable, state->progress_callback, state->progress_user_data,
(GAsyncReadyCallback) pk_service_pack_get_depends_ready_cb, state);
out:
- if (error_item != NULL)
- pk_item_error_code_unref (error_item);
+ if (error_code != NULL)
+ g_object_unref (error_code);
if (array != NULL)
g_ptr_array_unref (array);
if (results != NULL)
diff --git a/lib/packagekit-glib2/pk-task-text.c b/lib/packagekit-glib2/pk-task-text.c
index c779986..63a3ac5 100644
--- a/lib/packagekit-glib2/pk-task-text.c
+++ b/lib/packagekit-glib2/pk-task-text.c
@@ -22,9 +22,12 @@
#include "config.h"
#include <glib/gi18n.h>
-#include <packagekit-glib2/pk-task.h>
-#include <packagekit-glib2/pk-item.h>
+#include <packagekit-glib2/pk-eula-required.h>
+#include <packagekit-glib2/pk-media-change-required.h>
+#include <packagekit-glib2/pk-package.h>
#include <packagekit-glib2/pk-package-id.h>
+#include <packagekit-glib2/pk-repo-signature-required.h>
+#include <packagekit-glib2/pk-task.h>
#include "egg-debug.h"
@@ -82,8 +85,15 @@ pk_task_text_key_question (PkTask *task, guint request, PkResults *results)
guint i;
gboolean ret;
GPtrArray *array;
- gchar *package = NULL;
- PkItemRepoSignatureRequired *item;
+ gchar *printable = NULL;
+ gchar *package_id;
+ gchar *repository_name;
+ gchar *key_url;
+ gchar *key_userid;
+ gchar *key_id;
+ gchar *key_fingerprint;
+ gchar *key_timestamp;
+ PkRepoSignatureRequired *item;
PkTaskTextPrivate *priv = PK_TASK_TEXT(task)->priv;
/* set some user data, for no reason */
@@ -96,35 +106,51 @@ pk_task_text_key_question (PkTask *task, guint request, PkResults *results)
array = pk_results_get_repo_signature_required_array (results);
for (i=0; i<array->len; i++) {
item = g_ptr_array_index (array, i);
+ g_object_get (item,
+ "package-id", &package_id,
+ "repository-name", &repository_name,
+ "key-url", &key_url,
+ "key-userid", &key_userid,
+ "key-id", &key_id,
+ "key-fingerprint", &key_fingerprint,
+ "key-timestamp", &key_timestamp,
+ NULL);
/* create printable */
- package = pk_package_id_to_printable (item->package_id);
+ printable = pk_package_id_to_printable (package_id);
/* TRANSLATORS: the package repository is signed by a key that is not recognised */
g_print ("%s\n", _("Software source signature required"));
/* TRANSLATORS: the package that is not signed by a known key */
- g_print (" %s: %s\n", _("Package"), package);
+ g_print (" %s: %s\n", _("Package"), printable);
/* TRANSLATORS: the package repository name */
- g_print (" %s: %s\n", _("Software source name"), item->repository_name);
+ g_print (" %s: %s\n", _("Software source name"), repository_name);
/* TRANSLATORS: the key URL */
- g_print (" %s: %s\n", _("Key URL"), item->key_url);
+ g_print (" %s: %s\n", _("Key URL"), key_url);
/* TRANSLATORS: the username of the key */
- g_print (" %s: %s\n", _("Key user"), item->key_userid);
+ g_print (" %s: %s\n", _("Key user"), key_userid);
/* TRANSLATORS: the key ID, usually a few hex digits */
- g_print (" %s: %s\n", _("Key ID"), item->key_id);
+ g_print (" %s: %s\n", _("Key ID"), key_id);
/* TRANSLATORS: the key fingerprint, again, yet more hex */
- g_print (" %s: %s\n", _("Key fingerprint"), item->key_fingerprint);
+ g_print (" %s: %s\n", _("Key fingerprint"), key_fingerprint);
/* TRANSLATORS: the timestamp (a bit like a machine readable time) */
- g_print (" %s: %s\n", _("Key Timestamp"), item->key_timestamp);
+ g_print (" %s: %s\n", _("Key Timestamp"), key_timestamp);
- g_free (package);
+ g_free (printable);
+ g_free (package_id);
+ g_free (repository_name);
+ g_free (key_url);
+ g_free (key_userid);
+ g_free (key_id);
+ g_free (key_fingerprint);
+ g_free (key_timestamp);
}
/* TRANSLATORS: ask the user if they want to import */
@@ -148,9 +174,12 @@ pk_task_text_eula_question (PkTask *task, guint request, PkResults *results)
{
guint i;
gboolean ret;
- gchar *package = NULL;
+ gchar *printable = NULL;
GPtrArray *array;
- PkItemEulaRequired *item;
+ PkEulaRequired *item;
+ gchar *package_id;
+ gchar *vendor_name;
+ gchar *license_agreement;
PkTaskTextPrivate *priv = PK_TASK_TEXT(task)->priv;
/* set some user data, for no reason */
@@ -163,23 +192,31 @@ pk_task_text_eula_question (PkTask *task, guint request, PkResults *results)
array = pk_results_get_eula_required_array (results);
for (i=0; i<array->len; i++) {
item = g_ptr_array_index (array, i);
+ g_object_get (item,
+ "package-id", &package_id,
+ "vendor-name", &vendor_name,
+ "license-agreement", &license_agreement,
+ NULL);
/* create printable */
- package = pk_package_id_to_printable (item->package_id);
+ printable = pk_package_id_to_printable (package_id);
/* TRANSLATORS: this is another name for a software licence that has to be read before installing */
g_print ("%s\n", _("End user licence agreement required"));
/* TRANSLATORS: the package name that was trying to be installed */
- g_print (" %s: %s\n", _("Package"), package);
+ g_print (" %s: %s\n", _("Package"), printable);
/* TRANSLATORS: the vendor (e.g. vmware) that is providing the EULA */
- g_print (" %s: %s\n", _("Vendor"), item->vendor_name);
+ g_print (" %s: %s\n", _("Vendor"), vendor_name);
/* TRANSLATORS: the EULA text itself (long and boring) */
- g_print (" %s: %s\n", _("Agreement"), item->license_agreement);
+ g_print (" %s: %s\n", _("Agreement"), license_agreement);
- g_free (package);
+ g_free (printable);
+ g_free (package_id);
+ g_free (vendor_name);
+ g_free (license_agreement);
}
/* TRANSLATORS: ask the user if they've read and accepted the EULA */
@@ -204,7 +241,10 @@ pk_task_text_media_change_question (PkTask *task, guint request, PkResults *resu
guint i;
gboolean ret;
GPtrArray *array;
- PkItemMediaChangeRequired *item;
+ PkMediaChangeRequired *item;
+ gchar *media_id;
+ PkMediaTypeEnum media_type;
+ gchar *media_text;
PkTaskTextPrivate *priv = PK_TASK_TEXT(task)->priv;
/* set some user data, for no reason */
@@ -217,17 +257,25 @@ pk_task_text_media_change_question (PkTask *task, guint request, PkResults *resu
array = pk_results_get_media_change_required_array (results);
for (i=0; i<array->len; i++) {
item = g_ptr_array_index (array, i);
+ g_object_get (item,
+ "media-id", &media_id,
+ "media-type", &media_type,
+ "media-text", &media_text,
+ NULL);
+
/* TRANSLATORS: the user needs to change media inserted into the computer */
g_print ("%s\n", _("Media change required"));
/* TRANSLATORS: the type, e.g. DVD, CD, etc */
- g_print (" %s: %s\n", _("Media type"), pk_media_type_enum_to_text (item->media_type));
+ g_print (" %s: %s\n", _("Media type"), pk_media_type_enum_to_text (media_type));
/* TRANSLATORS: the media label, usually like 'disk-1of3' */
- g_print (" %s: %s\n", _("Media label"), item->media_id);
+ g_print (" %s: %s\n", _("Media label"), media_id);
/* TRANSLATORS: the media description, usually like 'Fedora 12 disk 5' */
- g_print (" %s: %s\n", _("Text"), item->media_text);
+ g_print (" %s: %s\n", _("Text"), media_text);
+ g_free (media_id);
+ g_free (media_text);
}
/* TRANSLATORS: ask the user to insert the media */
@@ -288,7 +336,10 @@ pk_task_text_simulate_question (PkTask *task, guint request, PkResults *results)
gboolean ret;
const gchar *title;
gchar *printable;
- PkItemPackage *item;
+ PkInfoEnum info;
+ gchar *package_id;
+ gchar *summary;
+ PkPackage *package;
GPtrArray *array;
PkInfoEnum info_last = PK_INFO_ENUM_UNKNOWN;
PkTaskTextPrivate *priv = PK_TASK_TEXT(task)->priv;
@@ -304,20 +355,27 @@ pk_task_text_simulate_question (PkTask *task, guint request, PkResults *results)
/* print data */
for (i=0; i<array->len; i++) {
- item = g_ptr_array_index (array, i);
+ package = g_ptr_array_index (array, i);
+ g_object_get (package,
+ "info", &info,
+ "package-id", &package_id,
+ "summary", &summary,
+ NULL);
/* new header */
- if (item->info != info_last) {
- title = pk_task_text_simulate_question_type_to_text (item->info);
+ if (info != info_last) {
+ title = pk_task_text_simulate_question_type_to_text (info);
if (title == NULL) {
- title = pk_info_enum_to_text (item->info);
+ title = pk_info_enum_to_text (info);
egg_warning ("cannot translate '%s', please report!", title);
}
g_print ("%s\n", title);
- info_last = item->info;
+ info_last = info;
}
- printable = pk_package_id_to_printable (item->package_id);
- g_print (" %s\t%s\n", printable, item->summary);
+ printable = pk_package_id_to_printable (package_id);
+ g_print (" %s\t%s\n", printable, summary);
g_free (printable);
+ g_free (package_id);
+ g_free (summary);
}
/* TRANSLATORS: ask the user if the proposed changes are okay */
@@ -404,8 +462,6 @@ pk_task_text_test_install_packages_cb (GObject *object, GAsyncResult *res, EggTe
PkResults *results;
PkExitEnum exit_enum;
GPtrArray *packages;
- const PkItemPackage *item;
- guint i;
/* get the results */
results = pk_task_generic_finish (PK_TASK (task), res, &error);
@@ -423,13 +479,7 @@ pk_task_text_test_install_packages_cb (GObject *object, GAsyncResult *res, EggTe
if (packages == NULL)
egg_test_failed (test, "no packages!");
- /* list, just for shits and giggles */
- for (i=0; i<packages->len; i++) {
- item = g_ptr_array_index (packages, i);
- egg_debug ("%s\t%s\t%s", pk_info_enum_to_text (item->info), item->package_id, item->summary);
- }
-
- if (packages->len != 3)
+ if (packages->len != 4)
egg_test_failed (test, "invalid number of packages: %i", packages->len);
g_ptr_array_unref (packages);
diff --git a/lib/packagekit-glib2/pk-task-wrapper.c b/lib/packagekit-glib2/pk-task-wrapper.c
index b2980f9..f692dbd 100644
--- a/lib/packagekit-glib2/pk-task-wrapper.c
+++ b/lib/packagekit-glib2/pk-task-wrapper.c
@@ -68,32 +68,13 @@ pk_task_wrapper_untrusted_question (PkTask *task, guint request, PkResults *resu
static void
pk_task_wrapper_key_question (PkTask *task, guint request, PkResults *results)
{
- guint i;
- GPtrArray *array;
- PkItemRepoSignatureRequired *item;
PkTaskWrapperPrivate *priv = PK_TASK_WRAPPER(task)->priv;
/* set some user data, for no reason */
priv->user_data = NULL;
- /* get data */
- array = pk_results_get_repo_signature_required_array (results);
- for (i=0; i<array->len; i++) {
- item = g_ptr_array_index (array, i);
- g_print ("KEY:\n");
- g_print (" Package: %s\n", item->package_id);
- g_print (" Name: %s\n", item->repository_name);
- g_print (" URL: %s\n", item->key_url);
- g_print (" User: %s\n", item->key_userid);
- g_print (" ID: %s\n", item->key_id);
- g_print (" Fingerprint: %s\n", item->key_fingerprint);
- g_print (" Timestamp: %s\n", item->key_timestamp);
- }
-
/* just accept without asking */
pk_task_user_accepted (task, request);
-
- g_ptr_array_unref (array);
}
/**
@@ -102,29 +83,13 @@ pk_task_wrapper_key_question (PkTask *task, guint request, PkResults *results)
static void
pk_task_wrapper_eula_question (PkTask *task, guint request, PkResults *results)
{
- guint i;
- GPtrArray *array;
- PkItemEulaRequired *item;
PkTaskWrapperPrivate *priv = PK_TASK_WRAPPER(task)->priv;
/* set some user data, for no reason */
priv->user_data = NULL;
- /* get data */
- array = pk_results_get_eula_required_array (results);
- for (i=0; i<array->len; i++) {
- item = g_ptr_array_index (array, i);
- g_print ("EULA:\n");
- g_print (" Eula ID: %s\n", item->eula_id);
- g_print (" Package: %s\n", item->package_id);
- g_print (" Vendor: %s\n", item->vendor_name);
- g_print (" Agreement: %s\n", item->license_agreement);
- }
-
/* just accept without asking */
pk_task_user_accepted (task, request);
-
- g_ptr_array_unref (array);
}
/**
@@ -133,28 +98,13 @@ pk_task_wrapper_eula_question (PkTask *task, guint request, PkResults *results)
static void
pk_task_wrapper_media_change_question (PkTask *task, guint request, PkResults *results)
{
- guint i;
- GPtrArray *array;
- PkItemMediaChangeRequired *item;
PkTaskWrapperPrivate *priv = PK_TASK_WRAPPER(task)->priv;
/* set some user data, for no reason */
priv->user_data = NULL;
- /* get data */
- array = pk_results_get_media_change_required_array (results);
- for (i=0; i<array->len; i++) {
- item = g_ptr_array_index (array, i);
- g_print ("MEDIA CHANGE:\n");
- g_print (" Media type: %s\n", pk_media_type_enum_to_text (item->media_type));
- g_print (" ID: %s\n", item->media_id);
- g_print (" Text: %s\n", item->media_text);
- }
-
/* just accept without asking */
pk_task_user_accepted (task, request);
-
- g_ptr_array_unref (array);
}
/**
@@ -272,8 +222,6 @@ pk_task_wrapper_test_install_packages_cb (GObject *object, GAsyncResult *res, Eg
PkResults *results;
PkExitEnum exit_enum;
GPtrArray *packages;
- const PkItemPackage *item;
- guint i;
/* get the results */
results = pk_task_generic_finish (PK_TASK (task), res, &error);
@@ -291,13 +239,7 @@ pk_task_wrapper_test_install_packages_cb (GObject *object, GAsyncResult *res, Eg
if (packages == NULL)
egg_test_failed (test, "no packages!");
- /* list, just for shits and giggles */
- for (i=0; i<packages->len; i++) {
- item = g_ptr_array_index (packages, i);
- egg_debug ("%s\t%s\t%s", pk_info_enum_to_text (item->info), item->package_id, item->summary);
- }
-
- if (packages->len != 3)
+ if (packages->len != 4)
egg_test_failed (test, "invalid number of packages: %i", packages->len);
g_ptr_array_unref (packages);
diff --git a/lib/packagekit-glib2/pk-task.c b/lib/packagekit-glib2/pk-task.c
index 2c49610..6d5655e 100644
--- a/lib/packagekit-glib2/pk-task.c
+++ b/lib/packagekit-glib2/pk-task.c
@@ -207,12 +207,14 @@ pk_task_simulate_ready_cb (GObject *source_object, GAsyncResult *res, PkTaskStat
PkResults *results;
PkPackageSack *sack = NULL;
guint length;
- PkItemErrorCode *error_code;
+ PkErrorCode *error_code;
guint idx = 0;
guint i;
GPtrArray *array = NULL;
- PkItemPackage *item;
+ PkPackage *item;
gboolean ret;
+ PkInfoEnum info;
+ const gchar *package_id;
/* old results no longer valid */
if (state->results != NULL)
@@ -244,10 +246,10 @@ pk_task_simulate_ready_cb (GObject *source_object, GAsyncResult *res, PkTaskStat
error_code = pk_results_get_error_code (state->results);
/* TODO: convert the PkErrorCodeEnum to a PK_CLIENT_ERROR_* enum */
error = g_error_new (PK_CLIENT_ERROR, PK_CLIENT_ERROR_FAILED,
- "could not do simulate: %s", error_code->details);
+ "could not do simulate: %s", pk_error_code_get_details (error_code));
pk_task_generic_state_finish (state, error);
g_error_free (error);
- pk_item_error_code_unref (error_code);
+ g_object_unref (error_code);
goto out;
}
@@ -263,11 +265,15 @@ pk_task_simulate_ready_cb (GObject *source_object, GAsyncResult *res, PkTaskStat
array = pk_results_get_package_array (results);
while (idx < array->len) {
item = g_ptr_array_index (array, idx);
+ package_id = pk_package_get_id (item);
+ g_object_get (item,
+ "info", &info,
+ NULL);
/* remove all the cleanup and finished packages */
- if (item->info == PK_INFO_ENUM_CLEANUP ||
- item->info == PK_INFO_ENUM_FINISHED) {
- egg_debug ("removing %s", item->package_id);
+ if (info == PK_INFO_ENUM_CLEANUP ||
+ info == PK_INFO_ENUM_FINISHED) {
+ egg_debug ("removing %s", package_id);
g_ptr_array_remove (array, item);
continue;
}
@@ -275,8 +281,8 @@ pk_task_simulate_ready_cb (GObject *source_object, GAsyncResult *res, PkTaskStat
/* remove all the original packages */
ret = FALSE;
for (i=0; i<length; i++) {
- if (g_strcmp0 (item->package_id, state->package_ids[i]) == 0) {
- egg_debug ("removing %s", item->package_id);
+ if (g_strcmp0 (package_id, state->package_ids[i]) == 0) {
+ egg_debug ("removing %s", package_id);
g_ptr_array_remove (array, item);
ret = TRUE;
break;
@@ -358,7 +364,7 @@ pk_task_install_signatures_ready_cb (GObject *source_object, GAsyncResult *res,
PkTask *task = PK_TASK (source_object);
GError *error = NULL;
PkResults *results;
- PkItemErrorCode *error_code;
+ PkErrorCode *error_code;
/* old results no longer valid */
if (state->results != NULL)
@@ -382,10 +388,10 @@ pk_task_install_signatures_ready_cb (GObject *source_object, GAsyncResult *res,
if (state->exit_enum != PK_EXIT_ENUM_SUCCESS) {
error_code = pk_results_get_error_code (state->results);
/* TODO: convert the PkErrorCodeEnum to a PK_CLIENT_ERROR_* enum */
- error = g_error_new (PK_CLIENT_ERROR, PK_CLIENT_ERROR_FAILED, "failed to install signature: %s", error_code->details);
+ error = g_error_new (PK_CLIENT_ERROR, PK_CLIENT_ERROR_FAILED, "failed to install signature: %s", pk_error_code_get_details (error_code));
pk_task_generic_state_finish (state, error);
g_error_free (error);
- pk_item_error_code_unref (error_code);
+ g_object_unref (error_code);
goto out;
}
@@ -405,7 +411,10 @@ pk_task_install_signatures (PkTaskState *state)
{
GError *error = NULL;
GPtrArray *array;
- const PkItemRepoSignatureRequired *item;
+ PkRepoSignatureRequired *item;
+ gchar *key_id;
+ gchar *package_id;
+ PkSigTypeEnum type;
/* get results */
array = pk_results_get_repo_signature_required_array (state->results);
@@ -431,12 +440,19 @@ pk_task_install_signatures (PkTaskState *state)
/* get first item of data */
item = g_ptr_array_index (array, 0);
+ g_object_get (item,
+ "type", &type,
+ "key-id", &key_id,
+ "package-id", &package_id,
+ NULL);
/* do new async method */
- pk_client_install_signature_async (PK_CLIENT(state->task), item->type, item->key_id, item->package_id,
+ pk_client_install_signature_async (PK_CLIENT(state->task), type, key_id, package_id,
state->cancellable, state->progress_callback, state->progress_user_data,
(GAsyncReadyCallback) pk_task_install_signatures_ready_cb, state);
out:
+ g_free (package_id);
+ g_free (key_id);
g_ptr_array_unref (array);
}
@@ -449,7 +465,7 @@ pk_task_accept_eulas_ready_cb (GObject *source_object, GAsyncResult *res, PkTask
PkTask *task = PK_TASK (source_object);
GError *error = NULL;
PkResults *results;
- PkItemErrorCode *error_code;
+ PkErrorCode *error_code;
/* old results no longer valid */
if (state->results != NULL)
@@ -473,10 +489,10 @@ pk_task_accept_eulas_ready_cb (GObject *source_object, GAsyncResult *res, PkTask
if (state->exit_enum != PK_EXIT_ENUM_SUCCESS) {
error_code = pk_results_get_error_code (state->results);
/* TODO: convert the PkErrorCodeEnum to a PK_CLIENT_ERROR_* enum */
- error = g_error_new (PK_CLIENT_ERROR, PK_CLIENT_ERROR_FAILED, "failed to accept eula: %s", error_code->details);
+ error = g_error_new (PK_CLIENT_ERROR, PK_CLIENT_ERROR_FAILED, "failed to accept eula: %s", pk_error_code_get_details (error_code));
pk_task_generic_state_finish (state, error);
g_error_free (error);
- pk_item_error_code_unref (error_code);
+ g_object_unref (error_code);
goto out;
}
@@ -496,7 +512,8 @@ pk_task_accept_eulas (PkTaskState *state)
{
GError *error = NULL;
GPtrArray *array;
- const PkItemEulaRequired *item;
+ PkEulaRequired *item;
+ gchar *eula_id;
/* get results */
array = pk_results_get_eula_required_array (state->results);
@@ -522,12 +539,16 @@ pk_task_accept_eulas (PkTaskState *state)
/* get first item of data */
item = g_ptr_array_index (array, 0);
+ g_object_get (item,
+ "eula-id", &eula_id,
+ NULL);
/* do new async method */
- pk_client_accept_eula_async (PK_CLIENT(state->task), item->eula_id,
+ pk_client_accept_eula_async (PK_CLIENT(state->task), eula_id,
state->cancellable, state->progress_callback, state->progress_user_data,
(GAsyncReadyCallback) pk_task_accept_eulas_ready_cb, state);
out:
+ g_free (eula_id);
g_ptr_array_unref (array);
}
diff --git a/lib/packagekit-glib2/pk-transaction-past.c b/lib/packagekit-glib2/pk-transaction-past.c
new file mode 100644
index 0000000..3381fa5
--- /dev/null
+++ b/lib/packagekit-glib2/pk-transaction-past.c
@@ -0,0 +1,277 @@
+/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*-
+ *
+ * Copyright (C) 2009 Richard Hughes <richard at hughsie.com>
+ *
+ * Licensed under the GNU General Public License Version 2
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ */
+
+/**
+ * SECTION:pk-transaction-past
+ * @short_description: TransactionPast object
+ *
+ * This GObject represents a transaction_past from a transaction_past.
+ * These objects represent single items of data from the transaction_past, and are
+ * often present in lists (#PkResults) or just refcounted in client programs.
+ */
+
+#include "config.h"
+
+#include <glib-object.h>
+
+#include <packagekit-glib2/pk-transaction-past.h>
+#include <packagekit-glib2/pk-enum.h>
+
+#include "egg-debug.h"
+
+static void pk_transaction_past_finalize (GObject *object);
+
+#define PK_TRANSACTION_PAST_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), PK_TYPE_TRANSACTION_PAST, PkTransactionPastPrivate))
+
+/**
+ * PkTransactionPastPrivate:
+ *
+ * Private #PkTransactionPast data
+ **/
+struct _PkTransactionPastPrivate
+{
+ gchar *tid;
+ gchar *timespec;
+ gboolean succeeded;
+ PkRoleEnum role;
+ guint duration;
+ gchar *data;
+ guint uid;
+ gchar *cmdline;
+};
+
+enum {
+ PROP_0,
+ PROP_TID,
+ PROP_TIMESPEC,
+ PROP_SUCCEEDED,
+ PROP_ROLE,
+ PROP_DURATION,
+ PROP_DATA,
+ PROP_UID,
+ PROP_CMDLINE,
+ PROP_LAST
+};
+
+G_DEFINE_TYPE (PkTransactionPast, pk_transaction_past, G_TYPE_OBJECT)
+
+/**
+ * pk_transaction_past_get_property:
+ **/
+static void
+pk_transaction_past_get_property (GObject *object, guint prop_id, GValue *value, GParamSpec *pspec)
+{
+ PkTransactionPast *transaction_past = PK_TRANSACTION_PAST (object);
+ PkTransactionPastPrivate *priv = transaction_past->priv;
+
+ switch (prop_id) {
+ case PROP_TID:
+ g_value_set_string (value, priv->tid);
+ break;
+ case PROP_TIMESPEC:
+ g_value_set_string (value, priv->timespec);
+ break;
+ case PROP_SUCCEEDED:
+ g_value_set_boolean (value, priv->succeeded);
+ break;
+ case PROP_ROLE:
+ g_value_set_uint (value, priv->role);
+ break;
+ case PROP_DURATION:
+ g_value_set_uint (value, priv->duration);
+ break;
+ case PROP_DATA:
+ g_value_set_string (value, priv->data);
+ break;
+ case PROP_UID:
+ g_value_set_uint (value, priv->uid);
+ break;
+ case PROP_CMDLINE:
+ g_value_set_string (value, priv->cmdline);
+ break;
+ default:
+ G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
+ break;
+ }
+}
+
+/**
+ * pk_transaction_past_set_property:
+ **/
+static void
+pk_transaction_past_set_property (GObject *object, guint prop_id, const GValue *value, GParamSpec *pspec)
+{
+ PkTransactionPast *transaction_past = PK_TRANSACTION_PAST (object);
+ PkTransactionPastPrivate *priv = transaction_past->priv;
+
+ switch (prop_id) {
+ case PROP_TID:
+ g_free (priv->tid);
+ priv->tid = g_strdup (g_value_get_string (value));
+ break;
+ case PROP_TIMESPEC:
+ g_free (priv->timespec);
+ priv->timespec = g_strdup (g_value_get_string (value));
+ break;
+ case PROP_SUCCEEDED:
+ priv->succeeded = g_value_get_boolean (value);
+ break;
+ case PROP_ROLE:
+ priv->role = g_value_get_uint (value);
+ break;
+ case PROP_DURATION:
+ priv->duration = g_value_get_uint (value);
+ break;
+ case PROP_DATA:
+ g_free (priv->data);
+ priv->data = g_strdup (g_value_get_string (value));
+ break;
+ case PROP_UID:
+ priv->uid = g_value_get_uint (value);
+ break;
+ case PROP_CMDLINE:
+ g_free (priv->cmdline);
+ priv->cmdline = g_strdup (g_value_get_string (value));
+ break;
+ default:
+ G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
+ break;
+ }
+}
+
+/**
+ * pk_transaction_past_class_init:
+ **/
+static void
+pk_transaction_past_class_init (PkTransactionPastClass *klass)
+{
+ GParamSpec *pspec;
+ GObjectClass *object_class = G_OBJECT_CLASS (klass);
+ object_class->finalize = pk_transaction_past_finalize;
+ object_class->get_property = pk_transaction_past_get_property;
+ object_class->set_property = pk_transaction_past_set_property;
+
+ /**
+ * PkTransactionPast:tid:
+ */
+ pspec = g_param_spec_string ("tid", NULL, NULL,
+ NULL,
+ G_PARAM_READWRITE);
+ g_object_class_install_property (object_class, PROP_TID, pspec);
+
+ /**
+ * PkTransactionPast:timespec:
+ */
+ pspec = g_param_spec_string ("timespec", NULL, NULL,
+ NULL,
+ G_PARAM_READWRITE);
+ g_object_class_install_property (object_class, PROP_TIMESPEC, pspec);
+
+ /**
+ * PkTransactionPast:succeeded:
+ */
+ pspec = g_param_spec_boolean ("succeeded", NULL, NULL,
+ FALSE,
+ G_PARAM_READWRITE);
+ g_object_class_install_property (object_class, PROP_SUCCEEDED, pspec);
+
+ /**
+ * PkTransactionPast:role:
+ */
+ pspec = g_param_spec_uint ("role", NULL, NULL,
+ 0, G_MAXUINT, PK_ROLE_ENUM_UNKNOWN,
+ G_PARAM_READWRITE);
+ g_object_class_install_property (object_class, PROP_ROLE, pspec);
+
+ /**
+ * PkTransactionPast:duration:
+ */
+ pspec = g_param_spec_uint ("duration", NULL, NULL,
+ 0, G_MAXUINT, 0,
+ G_PARAM_READWRITE);
+ g_object_class_install_property (object_class, PROP_DURATION, pspec);
+
+ /**
+ * PkTransactionPast:data:
+ */
+ pspec = g_param_spec_string ("data", NULL, NULL,
+ NULL,
+ G_PARAM_READWRITE);
+ g_object_class_install_property (object_class, PROP_DATA, pspec);
+
+ /**
+ * PkTransactionPast:uid:
+ */
+ pspec = g_param_spec_uint ("uid", NULL, NULL,
+ 0, G_MAXUINT, G_MAXUINT,
+ G_PARAM_READWRITE);
+ g_object_class_install_property (object_class, PROP_UID, pspec);
+
+ /**
+ * PkTransactionPast:cmdline:
+ */
+ pspec = g_param_spec_string ("cmdline", NULL, NULL,
+ NULL,
+ G_PARAM_READWRITE);
+ g_object_class_install_property (object_class, PROP_CMDLINE, pspec);
+
+ g_type_class_add_private (klass, sizeof (PkTransactionPastPrivate));
+}
+
+/**
+ * pk_transaction_past_init:
+ **/
+static void
+pk_transaction_past_init (PkTransactionPast *transaction_past)
+{
+ transaction_past->priv = PK_TRANSACTION_PAST_GET_PRIVATE (transaction_past);
+}
+
+/**
+ * pk_transaction_past_finalize:
+ **/
+static void
+pk_transaction_past_finalize (GObject *object)
+{
+ PkTransactionPast *transaction_past = PK_TRANSACTION_PAST (object);
+ PkTransactionPastPrivate *priv = transaction_past->priv;
+
+ g_free (priv->tid);
+ g_free (priv->timespec);
+ g_free (priv->data);
+ g_free (priv->cmdline);
+
+ G_OBJECT_CLASS (pk_transaction_past_parent_class)->finalize (object);
+}
+
+/**
+ * pk_transaction_past_new:
+ *
+ * Return value: a new PkTransactionPast object.
+ **/
+PkTransactionPast *
+pk_transaction_past_new (void)
+{
+ PkTransactionPast *transaction_past;
+ transaction_past = g_object_new (PK_TYPE_TRANSACTION_PAST, NULL);
+ return PK_TRANSACTION_PAST (transaction_past);
+}
+
diff --git a/lib/packagekit-glib2/pk-transaction-past.h b/lib/packagekit-glib2/pk-transaction-past.h
new file mode 100644
index 0000000..5b06bfc
--- /dev/null
+++ b/lib/packagekit-glib2/pk-transaction-past.h
@@ -0,0 +1,67 @@
+/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*-
+ *
+ * Copyright (C) 2009 Richard Hughes <richard at hughsie.com>
+ *
+ * Licensed under the GNU General Public License Version 2
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ */
+
+#if !defined (__PACKAGEKIT_H_INSIDE__) && !defined (PK_COMPILATION)
+#error "Only <packagekit.h> can be included directly."
+#endif
+
+#ifndef __PK_TRANSACTION_PAST_H
+#define __PK_TRANSACTION_PAST_H
+
+#include <glib-object.h>
+
+G_BEGIN_DECLS
+
+#define PK_TYPE_TRANSACTION_PAST (pk_transaction_past_get_type ())
+#define PK_TRANSACTION_PAST(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), PK_TYPE_TRANSACTION_PAST, PkTransactionPast))
+#define PK_TRANSACTION_PAST_CLASS(k) (G_TYPE_CHECK_CLASS_CAST((k), PK_TYPE_TRANSACTION_PAST, PkTransactionPastClass))
+#define PK_IS_TRANSACTION_PAST(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), PK_TYPE_TRANSACTION_PAST))
+#define PK_IS_TRANSACTION_PAST_CLASS(k) (G_TYPE_CHECK_CLASS_TYPE ((k), PK_TYPE_TRANSACTION_PAST))
+#define PK_TRANSACTION_PAST_GET_CLASS(o) (G_TYPE_INSTANCE_GET_CLASS ((o), PK_TYPE_TRANSACTION_PAST, PkTransactionPastClass))
+
+typedef struct _PkTransactionPastPrivate PkTransactionPastPrivate;
+typedef struct _PkTransactionPast PkTransactionPast;
+typedef struct _PkTransactionPastClass PkTransactionPastClass;
+
+struct _PkTransactionPast
+{
+ GObject parent;
+ PkTransactionPastPrivate *priv;
+};
+
+struct _PkTransactionPastClass
+{
+ GObjectClass parent_class;
+ /* padding for future expansion */
+ void (*_pk_reserved1) (void);
+ void (*_pk_reserved2) (void);
+ void (*_pk_reserved3) (void);
+ void (*_pk_reserved4) (void);
+ void (*_pk_reserved5) (void);
+};
+
+GType pk_transaction_past_get_type (void);
+PkTransactionPast *pk_transaction_past_new (void);
+
+G_END_DECLS
+
+#endif /* __PK_TRANSACTION_PAST_H */
+
diff --git a/lib/packagekit-glib2/pk-update-detail.c b/lib/packagekit-glib2/pk-update-detail.c
new file mode 100644
index 0000000..2cff695
--- /dev/null
+++ b/lib/packagekit-glib2/pk-update-detail.c
@@ -0,0 +1,353 @@
+/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*-
+ *
+ * Copyright (C) 2009 Richard Hughes <richard at hughsie.com>
+ *
+ * Licensed under the GNU General Public License Version 2
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ */
+
+/**
+ * SECTION:pk-update_detail
+ * @short_description: UpdateDetail object
+ *
+ * This GObject represents a update_detail from a transaction.
+ * These objects represent single items of data from the transaction, and are
+ * often present in lists (#PkResults) or just refcounted in client programs.
+ */
+
+#include "config.h"
+
+#include <glib-object.h>
+
+#include <packagekit-glib2/pk-update-detail.h>
+#include <packagekit-glib2/pk-enum.h>
+
+#include "egg-debug.h"
+
+static void pk_update_detail_finalize (GObject *object);
+
+#define PK_UPDATE_DETAIL_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), PK_TYPE_UPDATE_DETAIL, PkUpdateDetailPrivate))
+
+/**
+ * PkUpdateDetailPrivate:
+ *
+ * Private #PkUpdateDetail data
+ **/
+struct _PkUpdateDetailPrivate
+{
+ gchar *package_id;
+ gchar *updates;
+ gchar *obsoletes;
+ gchar *vendor_url;
+ gchar *bugzilla_url;
+ gchar *cve_url;
+ PkRestartEnum restart;
+ gchar *update_text;
+ gchar *changelog;
+ PkUpdateStateEnum state;
+ gchar *issued;
+ gchar *updated;
+};
+
+enum {
+ PROP_0,
+ PROP_PACKAGE_ID,
+ PROP_UPDATES,
+ PROP_OBSOLETES,
+ PROP_VENDOR_URL,
+ PROP_BUGZILLA_URL,
+ PROP_CVE_URL,
+ PROP_RESTART,
+ PROP_UPDATE_TEXT,
+ PROP_CHANGELOG,
+ PROP_STATE,
+ PROP_ISSUED,
+ PROP_UPDATED,
+ PROP_LAST
+};
+
+G_DEFINE_TYPE (PkUpdateDetail, pk_update_detail, G_TYPE_OBJECT)
+
+/**
+ * pk_update_detail_get_property:
+ **/
+static void
+pk_update_detail_get_property (GObject *object, guint prop_id, GValue *value, GParamSpec *pspec)
+{
+ PkUpdateDetail *update_detail = PK_UPDATE_DETAIL (object);
+ PkUpdateDetailPrivate *priv = update_detail->priv;
+
+ switch (prop_id) {
+ case PROP_PACKAGE_ID:
+ g_value_set_string (value, priv->package_id);
+ break;
+ case PROP_UPDATES:
+ g_value_set_string (value, priv->updates);
+ break;
+ case PROP_OBSOLETES:
+ g_value_set_string (value, priv->obsoletes);
+ break;
+ case PROP_VENDOR_URL:
+ g_value_set_string (value, priv->vendor_url);
+ break;
+ case PROP_BUGZILLA_URL:
+ g_value_set_string (value, priv->bugzilla_url);
+ break;
+ case PROP_CVE_URL:
+ g_value_set_string (value, priv->cve_url);
+ break;
+ case PROP_RESTART:
+ g_value_set_uint (value, priv->restart);
+ break;
+ case PROP_UPDATE_TEXT:
+ g_value_set_string (value, priv->update_text);
+ break;
+ case PROP_CHANGELOG:
+ g_value_set_string (value, priv->changelog);
+ break;
+ case PROP_STATE:
+ g_value_set_uint (value, priv->state);
+ break;
+ case PROP_ISSUED:
+ g_value_set_string (value, priv->issued);
+ break;
+ case PROP_UPDATED:
+ g_value_set_string (value, priv->updated);
+ break;
+ default:
+ G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
+ break;
+ }
+}
+
+/**
+ * pk_update_detail_set_property:
+ **/
+static void
+pk_update_detail_set_property (GObject *object, guint prop_id, const GValue *value, GParamSpec *pspec)
+{
+ PkUpdateDetail *update_detail = PK_UPDATE_DETAIL (object);
+ PkUpdateDetailPrivate *priv = update_detail->priv;
+
+ switch (prop_id) {
+ case PROP_PACKAGE_ID:
+ g_free (priv->package_id);
+ priv->package_id = g_strdup (g_value_get_string (value));
+ break;
+ case PROP_UPDATES:
+ g_free (priv->updates);
+ priv->updates = g_strdup (g_value_get_string (value));
+ break;
+ case PROP_OBSOLETES:
+ g_free (priv->obsoletes);
+ priv->obsoletes = g_strdup (g_value_get_string (value));
+ break;
+ case PROP_VENDOR_URL:
+ g_free (priv->vendor_url);
+ priv->vendor_url = g_strdup (g_value_get_string (value));
+ break;
+ case PROP_BUGZILLA_URL:
+ g_free (priv->bugzilla_url);
+ priv->bugzilla_url = g_strdup (g_value_get_string (value));
+ break;
+ case PROP_CVE_URL:
+ g_free (priv->cve_url);
+ priv->cve_url = g_strdup (g_value_get_string (value));
+ break;
+ case PROP_RESTART:
+ priv->restart = g_value_get_uint (value);
+ break;
+ case PROP_UPDATE_TEXT:
+ g_free (priv->update_text);
+ priv->update_text = g_strdup (g_value_get_string (value));
+ break;
+ case PROP_CHANGELOG:
+ g_free (priv->changelog);
+ priv->changelog = g_strdup (g_value_get_string (value));
+ break;
+ case PROP_STATE:
+ priv->state = g_value_get_uint (value);
+ break;
+ case PROP_ISSUED:
+ g_free (priv->issued);
+ priv->issued = g_strdup (g_value_get_string (value));
+ break;
+ case PROP_UPDATED:
+ g_free (priv->updated);
+ priv->updated = g_strdup (g_value_get_string (value));
+ break;
+ default:
+ G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
+ break;
+ }
+}
+
+/**
+ * pk_update_detail_class_init:
+ **/
+static void
+pk_update_detail_class_init (PkUpdateDetailClass *klass)
+{
+ GParamSpec *pspec;
+ GObjectClass *object_class = G_OBJECT_CLASS (klass);
+ object_class->finalize = pk_update_detail_finalize;
+ object_class->get_property = pk_update_detail_get_property;
+ object_class->set_property = pk_update_detail_set_property;
+
+ /**
+ * PkUpdateDetail:package-id:
+ */
+ pspec = g_param_spec_string ("package-id", NULL, NULL,
+ NULL,
+ G_PARAM_READWRITE);
+ g_object_class_install_property (object_class, PROP_PACKAGE_ID, pspec);
+
+ /**
+ * PkUpdateDetail:updates:
+ */
+ pspec = g_param_spec_string ("updates", NULL, NULL,
+ NULL,
+ G_PARAM_READWRITE);
+ g_object_class_install_property (object_class, PROP_UPDATES, pspec);
+
+ /**
+ * PkUpdateDetail:obsoletes:
+ */
+ pspec = g_param_spec_string ("obsoletes", NULL, NULL,
+ NULL,
+ G_PARAM_READWRITE);
+ g_object_class_install_property (object_class, PROP_OBSOLETES, pspec);
+
+ /**
+ * PkUpdateDetail:vendor-url:
+ */
+ pspec = g_param_spec_string ("vendor-url", NULL, NULL,
+ NULL,
+ G_PARAM_READWRITE);
+ g_object_class_install_property (object_class, PROP_VENDOR_URL, pspec);
+
+ /**
+ * PkUpdateDetail:bugzilla-url:
+ */
+ pspec = g_param_spec_string ("bugzilla-url", NULL, NULL,
+ NULL,
+ G_PARAM_READWRITE);
+ g_object_class_install_property (object_class, PROP_BUGZILLA_URL, pspec);
+
+ /**
+ * PkUpdateDetail:cve-url:
+ */
+ pspec = g_param_spec_string ("cve-url", NULL, NULL,
+ NULL,
+ G_PARAM_READWRITE);
+ g_object_class_install_property (object_class, PROP_CVE_URL, pspec);
+
+ /**
+ * PkUpdateDetail:restart:
+ */
+ pspec = g_param_spec_uint ("restart", NULL, NULL,
+ 0, G_MAXUINT, PK_RESTART_ENUM_UNKNOWN,
+ G_PARAM_READWRITE);
+ g_object_class_install_property (object_class, PROP_RESTART, pspec);
+
+ /**
+ * PkUpdateDetail:update-text:
+ */
+ pspec = g_param_spec_string ("update-text", NULL, NULL,
+ NULL,
+ G_PARAM_READWRITE);
+ g_object_class_install_property (object_class, PROP_UPDATE_TEXT, pspec);
+
+ /**
+ * PkUpdateDetail:changelog:
+ */
+ pspec = g_param_spec_string ("changelog", NULL, NULL,
+ NULL,
+ G_PARAM_READWRITE);
+ g_object_class_install_property (object_class, PROP_CHANGELOG, pspec);
+
+ /**
+ * PkUpdateDetail:state:
+ */
+ pspec = g_param_spec_uint ("state", NULL, NULL,
+ 0, G_MAXUINT, PK_UPDATE_STATE_ENUM_UNKNOWN,
+ G_PARAM_READWRITE);
+ g_object_class_install_property (object_class, PROP_STATE, pspec);
+
+ /**
+ * PkUpdateDetail:issued:
+ */
+ pspec = g_param_spec_string ("issued", NULL, NULL,
+ NULL,
+ G_PARAM_READWRITE);
+ g_object_class_install_property (object_class, PROP_ISSUED, pspec);
+
+ /**
+ * PkUpdateDetail:updated:
+ */
+ pspec = g_param_spec_string ("updated", NULL, NULL,
+ NULL,
+ G_PARAM_READWRITE);
+ g_object_class_install_property (object_class, PROP_UPDATED, pspec);
+
+ g_type_class_add_private (klass, sizeof (PkUpdateDetailPrivate));
+}
+
+/**
+ * pk_update_detail_init:
+ **/
+static void
+pk_update_detail_init (PkUpdateDetail *update_detail)
+{
+ update_detail->priv = PK_UPDATE_DETAIL_GET_PRIVATE (update_detail);
+}
+
+/**
+ * pk_update_detail_finalize:
+ **/
+static void
+pk_update_detail_finalize (GObject *object)
+{
+ PkUpdateDetail *update_detail = PK_UPDATE_DETAIL (object);
+ PkUpdateDetailPrivate *priv = update_detail->priv;
+
+ g_free (priv->package_id);
+ g_free (priv->updates);
+ g_free (priv->obsoletes);
+ g_free (priv->vendor_url);
+ g_free (priv->bugzilla_url);
+ g_free (priv->cve_url);
+ g_free (priv->update_text);
+ g_free (priv->changelog);
+ g_free (priv->issued);
+ g_free (priv->updated);
+
+ G_OBJECT_CLASS (pk_update_detail_parent_class)->finalize (object);
+}
+
+/**
+ * pk_update_detail_new:
+ *
+ * Return value: a new PkUpdateDetail object.
+ **/
+PkUpdateDetail *
+pk_update_detail_new (void)
+{
+ PkUpdateDetail *update_detail;
+ update_detail = g_object_new (PK_TYPE_UPDATE_DETAIL, NULL);
+ return PK_UPDATE_DETAIL (update_detail);
+}
+
diff --git a/lib/packagekit-glib2/pk-update-detail.h b/lib/packagekit-glib2/pk-update-detail.h
new file mode 100644
index 0000000..15df1ef
--- /dev/null
+++ b/lib/packagekit-glib2/pk-update-detail.h
@@ -0,0 +1,67 @@
+/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*-
+ *
+ * Copyright (C) 2009 Richard Hughes <richard at hughsie.com>
+ *
+ * Licensed under the GNU General Public License Version 2
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ */
+
+#if !defined (__PACKAGEKIT_H_INSIDE__) && !defined (PK_COMPILATION)
+#error "Only <packagekit.h> can be included directly."
+#endif
+
+#ifndef __PK_UPDATE_DETAIL_H
+#define __PK_UPDATE_DETAIL_H
+
+#include <glib-object.h>
+
+G_BEGIN_DECLS
+
+#define PK_TYPE_UPDATE_DETAIL (pk_update_detail_get_type ())
+#define PK_UPDATE_DETAIL(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), PK_TYPE_UPDATE_DETAIL, PkUpdateDetail))
+#define PK_UPDATE_DETAIL_CLASS(k) (G_TYPE_CHECK_CLASS_CAST((k), PK_TYPE_UPDATE_DETAIL, PkUpdateDetailClass))
+#define PK_IS_UPDATE_DETAIL(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), PK_TYPE_UPDATE_DETAIL))
+#define PK_IS_UPDATE_DETAIL_CLASS(k) (G_TYPE_CHECK_CLASS_TYPE ((k), PK_TYPE_UPDATE_DETAIL))
+#define PK_UPDATE_DETAIL_GET_CLASS(o) (G_TYPE_INSTANCE_GET_CLASS ((o), PK_TYPE_UPDATE_DETAIL, PkUpdateDetailClass))
+
+typedef struct _PkUpdateDetailPrivate PkUpdateDetailPrivate;
+typedef struct _PkUpdateDetail PkUpdateDetail;
+typedef struct _PkUpdateDetailClass PkUpdateDetailClass;
+
+struct _PkUpdateDetail
+{
+ GObject parent;
+ PkUpdateDetailPrivate *priv;
+};
+
+struct _PkUpdateDetailClass
+{
+ GObjectClass parent_class;
+ /* padding for future expansion */
+ void (*_pk_reserved1) (void);
+ void (*_pk_reserved2) (void);
+ void (*_pk_reserved3) (void);
+ void (*_pk_reserved4) (void);
+ void (*_pk_reserved5) (void);
+};
+
+GType pk_update_detail_get_type (void);
+PkUpdateDetail *pk_update_detail_new (void);
+
+G_END_DECLS
+
+#endif /* __PK_UPDATE_DETAIL_H */
+
diff --git a/src/pk-backend.c b/src/pk-backend.c
index 1e0c7f2..dffb513 100644
--- a/src/pk-backend.c
+++ b/src/pk-backend.c
@@ -31,7 +31,6 @@
#include <glib.h>
#include <gmodule.h>
#include <glib/gprintf.h>
-#include <packagekit-glib2/pk-item.h>
#include <packagekit-glib2/pk-package-id.h>
#include <packagekit-glib2/pk-results.h>
#include <packagekit-glib2/pk-common.h>
@@ -113,7 +112,7 @@ struct _PkBackendPrivate
PkConf *conf;
PkExitEnum exit;
PkFileMonitor *file_monitor;
- PkItemPackage *last_package;
+ PkPackage *last_package;
PkNetwork *network;
PkResults *results;
PkRoleEnum role; /* this never changes for the lifetime of a transaction */
@@ -803,7 +802,10 @@ static gboolean
pk_backend_package_emulate_finished (PkBackend *backend)
{
gboolean ret = FALSE;
- const PkItemPackage *item;
+ PkPackage *item;
+ PkInfoEnum info;
+ gchar *package_id = NULL;
+ gchar *summary = NULL;
/* simultaneous handles this on it's own */
if (backend->priv->simultaneous)
@@ -814,23 +816,33 @@ pk_backend_package_emulate_finished (PkBackend *backend)
if (item == NULL)
goto out;
+
+ /* get data */
+ g_object_get (item,
+ "info", &info,
+ "package-id", &package_id,
+ "summary", &summary,
+ NULL);
+
/* already finished */
- if (item->info == PK_INFO_ENUM_FINISHED)
+ if (info == PK_INFO_ENUM_FINISHED)
goto out;
/* only makes sense for some values */
- if (item->info == PK_INFO_ENUM_DOWNLOADING ||
- item->info == PK_INFO_ENUM_UPDATING ||
- item->info == PK_INFO_ENUM_INSTALLING ||
- item->info == PK_INFO_ENUM_REMOVING ||
- item->info == PK_INFO_ENUM_CLEANUP ||
- item->info == PK_INFO_ENUM_OBSOLETING ||
- item->info == PK_INFO_ENUM_REINSTALLING ||
- item->info == PK_INFO_ENUM_DOWNGRADING) {
- pk_backend_package (backend, PK_INFO_ENUM_FINISHED, item->package_id, item->summary);
+ if (info == PK_INFO_ENUM_DOWNLOADING ||
+ info == PK_INFO_ENUM_UPDATING ||
+ info == PK_INFO_ENUM_INSTALLING ||
+ info == PK_INFO_ENUM_REMOVING ||
+ info == PK_INFO_ENUM_CLEANUP ||
+ info == PK_INFO_ENUM_OBSOLETING ||
+ info == PK_INFO_ENUM_REINSTALLING ||
+ info == PK_INFO_ENUM_DOWNGRADING) {
+ pk_backend_package (backend, PK_INFO_ENUM_FINISHED, package_id, summary);
ret = TRUE;
}
out:
+ g_free (package_id);
+ g_free (summary);
return ret;
}
@@ -838,34 +850,44 @@ out:
* pk_backend_package_emulate_finished_for_package:
**/
static gboolean
-pk_backend_package_emulate_finished_for_package (PkBackend *backend, const PkItemPackage *item)
+pk_backend_package_emulate_finished_for_package (PkBackend *backend, PkPackage *item)
{
+ gboolean ret = FALSE;
+ PkInfoEnum info;
+
/* simultaneous handles this on it's own */
if (backend->priv->simultaneous) {
egg_debug ("backend handling finished");
- return FALSE;
+ goto out;
}
/* first package in transaction */
if (backend->priv->last_package == NULL) {
egg_debug ("first package, so no finished");
- return FALSE;
+ goto out;
}
+ /* get data */
+ g_object_get (item,
+ "info", &info,
+ NULL);
+
/* sending finished already */
- if (item->info == PK_INFO_ENUM_FINISHED) {
+ if (info == PK_INFO_ENUM_FINISHED) {
egg_debug ("is finished ourelves");
- return FALSE;
+ goto out;
}
/* same package, just info change */
- if (g_strcmp0 (backend->priv->last_package->package_id, item->package_id) == 0) {
+ if (pk_package_equal_id (backend->priv->last_package, item) == 0) {
egg_debug ("same package_id, ignoring");
- return FALSE;
+ goto out;
}
/* emit the old package as finished */
- return pk_backend_package_emulate_finished (backend);
+ ret = pk_backend_package_emulate_finished (backend);
+out:
+ return ret;
}
/**
@@ -909,7 +931,7 @@ gboolean
pk_backend_package (PkBackend *backend, PkInfoEnum info, const gchar *package_id, const gchar *summary)
{
gchar *summary_safe = NULL;
- PkItemPackage *item = NULL;
+ PkPackage *item = NULL;
gboolean ret;
g_return_val_if_fail (PK_IS_BACKEND (backend), FALSE);
@@ -938,17 +960,15 @@ pk_backend_package (PkBackend *backend, PkInfoEnum info, const gchar *package_id
}
/* create a new package object AFTER we emulate the info value */
- item = pk_item_package_new (info, package_id, summary_safe);
- if (item == NULL) {
- egg_warning ("Failed to create object summary: '%s'", summary_safe);
- ret = FALSE;
- goto out;
- }
+ item = pk_package_new ();
+ g_object_set (item,
+ "info", info,
+ "package-id", package_id,
+ "summary", summary_safe,
+ NULL);
/* is it the same? */
- ret = (backend->priv->last_package != NULL &&
- item->info == backend->priv->last_package->info &&
- g_strcmp0 (item->package_id, backend->priv->last_package->package_id) == 0);
+ ret = (backend->priv->last_package != NULL && pk_package_equal (backend->priv->last_package, item));
if (ret) {
egg_debug ("skipping duplicate %s", package_id);
ret = FALSE;
@@ -960,8 +980,8 @@ pk_backend_package (PkBackend *backend, PkInfoEnum info, const gchar *package_id
/* update the 'last' package */
if (backend->priv->last_package != NULL)
- pk_item_package_unref (backend->priv->last_package);
- backend->priv->last_package = pk_item_package_ref (item);
+ g_object_unref (backend->priv->last_package);
+ backend->priv->last_package = g_object_ref (item);
/* have we already set an error? */
if (backend->priv->set_error) {
@@ -998,7 +1018,7 @@ pk_backend_package (PkBackend *backend, PkInfoEnum info, const gchar *package_id
ret = TRUE;
out:
if (item != NULL)
- pk_item_package_unref (item);
+ g_object_unref (item);
g_free (summary_safe);
return ret;
}
@@ -1016,9 +1036,7 @@ pk_backend_update_detail (PkBackend *backend, const gchar *package_id,
const gchar *updated_text)
{
gchar *update_text_safe = NULL;
- PkItemUpdateDetail *item = NULL;
- GDate *issued = NULL;
- GDate *updated = NULL;
+ PkUpdateDetail *item = NULL;
gboolean ret = FALSE;
g_return_val_if_fail (PK_IS_BACKEND (backend), FALSE);
@@ -1031,22 +1049,25 @@ pk_backend_update_detail (PkBackend *backend, const gchar *package_id,
goto out;
}
- /* convert dates */
- issued = pk_iso8601_to_date (issued_text);
- updated = pk_iso8601_to_date (updated_text);
-
/* replace unsafe chars */
update_text_safe = pk_backend_strsafe (update_text);
- /* form PkItemUpdateDetail struct */
- item = pk_item_update_detail_new (package_id, updates, obsoletes, vendor_url,
- bugzilla_url, cve_url, restart,
- update_text_safe, changelog,
- state, issued, updated);
- if (item == NULL) {
- egg_warning ("Failed to parse detail object");
- goto out;
- }
+ /* form PkUpdateDetail struct */
+ item = pk_update_detail_new ();
+ g_object_set (item,
+ "package-id", package_id,
+ "updates", updates,
+ "obsoletes", obsoletes,
+ "vendor-url", vendor_url,
+ "bugzilla-url", bugzilla_url,
+ "cve-url", cve_url,
+ "restart", restart,
+ "update-text", update_text_safe,
+ "changelog", changelog,
+ "state", state,
+ "issued", issued_text,
+ "updated", updated_text,
+ NULL);
/* emit */
g_signal_emit (backend, signals[SIGNAL_UPDATE_DETAIL], 0, item);
@@ -1056,12 +1077,8 @@ pk_backend_update_detail (PkBackend *backend, const gchar *package_id,
ret = TRUE;
out:
if (item != NULL)
- pk_item_update_detail_unref (item);
+ g_object_unref (item);
g_free (update_text_safe);
- if (issued != NULL)
- g_date_free (issued);
- if (updated != NULL)
- g_date_free (updated);
return ret;
}
@@ -1094,7 +1111,7 @@ gboolean
pk_backend_require_restart (PkBackend *backend, PkRestartEnum restart, const gchar *package_id)
{
gboolean ret = FALSE;
- PkItemRequireRestart *item = NULL;
+ PkRequireRestart *item = NULL;
g_return_val_if_fail (PK_IS_BACKEND (backend), FALSE);
g_return_val_if_fail (backend->priv->locked != FALSE, FALSE);
@@ -1112,12 +1129,12 @@ pk_backend_require_restart (PkBackend *backend, PkRestartEnum restart, const gch
goto out;
}
- /* form PkItemRequireRestart struct */
- item = pk_item_require_restart_new (restart, package_id);
- if (item == NULL) {
- egg_warning ("Failed to parse require restart object");
- goto out;
- }
+ /* form PkRequireRestart struct */
+ item = pk_require_restart_new ();
+ g_object_set (item,
+ "restart", restart,
+ "package-id", package_id,
+ NULL);
/* emit */
g_signal_emit (backend, signals[SIGNAL_REQUIRE_RESTART], 0, item);
@@ -1127,7 +1144,7 @@ pk_backend_require_restart (PkBackend *backend, PkRestartEnum restart, const gch
ret = TRUE;
out:
if (item != NULL)
- pk_item_require_restart_unref (item);
+ g_object_unref (item);
return ret;
}
@@ -1140,7 +1157,7 @@ pk_backend_message (PkBackend *backend, PkMessageEnum message, const gchar *form
gboolean ret = FALSE;
va_list args;
gchar *buffer = NULL;
- PkItemMessage *item = NULL;
+ PkMessage *item = NULL;
g_return_val_if_fail (PK_IS_BACKEND (backend), FALSE);
g_return_val_if_fail (backend->priv->locked != FALSE, FALSE);
@@ -1155,12 +1172,12 @@ pk_backend_message (PkBackend *backend, PkMessageEnum message, const gchar *form
g_vasprintf (&buffer, format, args);
va_end (args);
- /* form PkItemMessage struct */
- item = pk_item_message_new (message, buffer);
- if (item == NULL) {
- egg_warning ("Failed to parse message object");
- goto out;
- }
+ /* form PkMessage struct */
+ item = pk_message_new ();
+ g_object_set (item,
+ "type", message,
+ "details", buffer,
+ NULL);
/* emit */
g_signal_emit (backend, signals[SIGNAL_MESSAGE], 0, item);
@@ -1171,7 +1188,7 @@ pk_backend_message (PkBackend *backend, PkMessageEnum message, const gchar *form
out:
g_free (buffer);
if (item != NULL)
- pk_item_message_unref (item);
+ g_object_unref (item);
return ret;
}
@@ -1248,7 +1265,7 @@ pk_backend_details (PkBackend *backend, const gchar *package_id,
const gchar *description, const gchar *url, gulong size)
{
gchar *description_safe = NULL;
- PkItemDetails *item = NULL;
+ PkDetails *item = NULL;
gboolean ret = FALSE;
g_return_val_if_fail (PK_IS_BACKEND (backend), FALSE);
@@ -1264,12 +1281,16 @@ pk_backend_details (PkBackend *backend, const gchar *package_id,
/* replace unsafe chars */
description_safe = pk_backend_strsafe (description);
- /* form PkItemDetails struct */
- item = pk_item_details_new (package_id, license, group, description_safe, url, size);
- if (item == NULL) {
- egg_warning ("Failed to parse details object");
- goto out;
- }
+ /* form PkDetails struct */
+ item = pk_details_new ();
+ g_object_set (item,
+ "package-id", package_id,
+ "license", license,
+ "group", group,
+ "description", description_safe,
+ "url", url,
+ "size", (guint64) size,
+ NULL);
/* emit */
g_signal_emit (backend, signals[SIGNAL_DETAILS], 0, item);
@@ -1279,7 +1300,7 @@ pk_backend_details (PkBackend *backend, const gchar *package_id,
ret = TRUE;
out:
if (item != NULL)
- pk_item_details_unref (item);
+ g_object_unref (item);
g_free (description_safe);
return ret;
}
@@ -1293,7 +1314,7 @@ gboolean
pk_backend_files (PkBackend *backend, const gchar *package_id, const gchar *filelist)
{
gboolean ret;
- PkItemFiles *item = NULL;
+ PkFiles *item = NULL;
gchar **files = NULL;
g_return_val_if_fail (PK_IS_BACKEND (backend), FALSE);
@@ -1313,14 +1334,13 @@ pk_backend_files (PkBackend *backend, const gchar *package_id, const gchar *file
goto out;
}
- /* form PkItemFiles struct */
+ /* form PkFiles struct */
files = g_strsplit (filelist, ";", -1);
- item = pk_item_files_new (package_id, files);
- if (item == NULL) {
- egg_warning ("Failed to parse files object");
- ret = FALSE;
- goto out;
- }
+ item = pk_files_new ();
+ g_object_set (item,
+ "package-id", package_id,
+ "files", files,
+ NULL);
/* emit */
g_signal_emit (backend, signals[SIGNAL_FILES], 0, item);
@@ -1332,7 +1352,7 @@ pk_backend_files (PkBackend *backend, const gchar *package_id, const gchar *file
out:
g_strfreev (files);
if (item != NULL)
- pk_item_files_unref (item);
+ g_object_unref (item);
return ret;
}
@@ -1345,7 +1365,7 @@ pk_backend_distro_upgrade (PkBackend *backend, PkDistroUpgradeEnum type, const g
gboolean ret = FALSE;
gchar *name_safe = NULL;
gchar *summary_safe = NULL;
- PkItemDistroUpgrade *item = NULL;
+ PkDistroUpgrade *item = NULL;
g_return_val_if_fail (PK_IS_BACKEND (backend), FALSE);
g_return_val_if_fail (type != PK_DISTRO_UPGRADE_ENUM_UNKNOWN, FALSE);
@@ -1363,12 +1383,13 @@ pk_backend_distro_upgrade (PkBackend *backend, PkDistroUpgradeEnum type, const g
name_safe = pk_backend_strsafe (name);
summary_safe = pk_backend_strsafe (summary);
- /* form PkItemDistroUpgrade struct */
- item = pk_item_distro_upgrade_new (type, name_safe, summary_safe);
- if (item == NULL) {
- egg_warning ("Failed to parse distro upgrade object");
- goto out;
- }
+ /* form PkDistroUpgrade struct */
+ item = pk_distro_upgrade_new ();
+ g_object_set (item,
+ "type", type,
+ "name", name_safe,
+ "summary", summary_safe,
+ NULL);
/* emit */
g_signal_emit (backend, signals[SIGNAL_DISTRO_UPGRADE], 0, item);
@@ -1378,7 +1399,7 @@ pk_backend_distro_upgrade (PkBackend *backend, PkDistroUpgradeEnum type, const g
ret = TRUE;
out:
if (item != NULL)
- pk_item_distro_upgrade_unref (item);
+ g_object_unref (item);
g_free (name_safe);
g_free (summary_safe);
return ret;
@@ -1394,7 +1415,7 @@ pk_backend_repo_signature_required (PkBackend *backend, const gchar *package_id,
const gchar *key_timestamp, PkSigTypeEnum type)
{
gboolean ret = FALSE;
- PkItemRepoSignatureRequired *item = NULL;
+ PkRepoSignatureRequired *item = NULL;
g_return_val_if_fail (PK_IS_BACKEND (backend), FALSE);
g_return_val_if_fail (repository_name != NULL, FALSE);
@@ -1403,23 +1424,28 @@ pk_backend_repo_signature_required (PkBackend *backend, const gchar *package_id,
/* have we already set an error? */
if (backend->priv->set_error) {
egg_warning ("already set error, cannot process: repo-sig-reqd");
- return FALSE;
+ goto out;
}
/* check we don't do this more than once */
if (backend->priv->set_signature) {
egg_warning ("already asked for a signature, cannot process");
- return FALSE;
- }
-
- /* form PkItemRepoSignatureRequired struct */
- item = pk_item_repo_signature_required_new (package_id, repository_name, key_url,
- key_userid, key_id, key_fingerprint, key_timestamp, type);
- if (item == NULL) {
- egg_warning ("Failed to parse repo signature required object");
goto out;
}
+ /* form PkRepoSignatureRequired struct */
+ item = pk_repo_signature_required_new ();
+ g_object_set (item,
+ "package-id", package_id,
+ "repository-name", repository_name,
+ "key-url", key_url,
+ "key-userid", key_userid,
+ "key-id", key_id,
+ "key-fingerprint", key_fingerprint,
+ "key-timestamp", key_timestamp,
+ "type", type,
+ NULL);
+
/* emit */
g_signal_emit (backend, signals[SIGNAL_REPO_SIGNATURE_REQUIRED], 0, item);
pk_results_add_repo_signature_required (backend->priv->results, item);
@@ -1429,7 +1455,7 @@ pk_backend_repo_signature_required (PkBackend *backend, const gchar *package_id,
ret = TRUE;
out:
if (item != NULL)
- pk_item_repo_signature_required_unref (item);
+ g_object_unref (item);
return ret;
}
@@ -1440,7 +1466,7 @@ gboolean
pk_backend_eula_required (PkBackend *backend, const gchar *eula_id, const gchar *package_id,
const gchar *vendor_name, const gchar *license_agreement)
{
- PkItemEulaRequired *item = NULL;
+ PkEulaRequired *item = NULL;
gboolean ret = FALSE;
g_return_val_if_fail (PK_IS_BACKEND (backend), FALSE);
@@ -1462,12 +1488,14 @@ pk_backend_eula_required (PkBackend *backend, const gchar *eula_id, const gchar
goto out;
}
- /* form PkItemEulaRequired struct */
- item = pk_item_eula_required_new (eula_id, package_id, vendor_name, license_agreement);
- if (item == NULL) {
- egg_warning ("Failed to parse eula required object");
- goto out;
- }
+ /* form PkEulaRequired struct */
+ item = pk_eula_required_new ();
+ g_object_set (item,
+ "eula-id", eula_id,
+ "package-id", package_id,
+ "vendor-name", vendor_name,
+ "license-agreement", license_agreement,
+ NULL);
/* emit */
g_signal_emit (backend, signals[SIGNAL_EULA_REQUIRED], 0, item);
@@ -1478,7 +1506,7 @@ pk_backend_eula_required (PkBackend *backend, const gchar *eula_id, const gchar
ret = TRUE;
out:
if (item != NULL)
- pk_item_eula_required_unref (item);
+ g_object_unref (item);
return ret;
}
@@ -1491,7 +1519,7 @@ pk_backend_media_change_required (PkBackend *backend,
const gchar *media_id,
const gchar *media_text)
{
- PkItemMediaChangeRequired *item = NULL;
+ PkMediaChangeRequired *item = NULL;
gboolean ret = FALSE;
g_return_val_if_fail (PK_IS_BACKEND (backend), FALSE);
@@ -1505,12 +1533,13 @@ pk_backend_media_change_required (PkBackend *backend,
goto out;
}
- /* form PkItemMediaChangeRequired struct */
- item = pk_item_media_change_required_new (media_type, media_id, media_text);
- if (item == NULL) {
- egg_warning ("Failed to parse media change required object");
- goto out;
- }
+ /* form PkMediaChangeRequired struct */
+ item = pk_media_change_required_new ();
+ g_object_set (item,
+ "media-type", media_type,
+ "media-id", media_id,
+ "media-text", media_text,
+ NULL);
/* emit */
g_signal_emit (backend, signals[SIGNAL_MEDIA_CHANGE_REQUIRED], 0, item);
@@ -1520,7 +1549,7 @@ pk_backend_media_change_required (PkBackend *backend,
ret = TRUE;
out:
if (item != NULL)
- pk_item_media_change_required_unref (item);
+ g_object_unref (item);
return ret;
}
@@ -1532,7 +1561,7 @@ pk_backend_repo_detail (PkBackend *backend, const gchar *repo_id,
const gchar *description, gboolean enabled)
{
gchar *description_safe = NULL;
- PkItemRepoDetail *item = NULL;
+ PkRepoDetail *item = NULL;
gboolean ret = FALSE;
g_return_val_if_fail (PK_IS_BACKEND (backend), FALSE);
@@ -1548,12 +1577,13 @@ pk_backend_repo_detail (PkBackend *backend, const gchar *repo_id,
/* replace unsafe chars */
description_safe = pk_backend_strsafe (description);
- /* form PkItemRepoDetail struct */
- item = pk_item_repo_detail_new (repo_id, description, enabled);
- if (item == NULL) {
- egg_warning ("Failed to parse repo detail object");
- goto out;
- }
+ /* form PkRepoDetail struct */
+ item = pk_repo_detail_new ();
+ g_object_set (item,
+ "repo-id", repo_id,
+ "description", description,
+ "enabled", enabled,
+ NULL);
/* emit */
g_signal_emit (backend, signals[SIGNAL_REPO_DETAIL], 0, item);
@@ -1563,7 +1593,7 @@ pk_backend_repo_detail (PkBackend *backend, const gchar *repo_id,
ret = TRUE;
out:
if (item != NULL)
- pk_item_repo_detail_unref (item);
+ g_object_unref (item);
g_free (description_safe);
return ret;
}
@@ -1575,7 +1605,7 @@ gboolean
pk_backend_category (PkBackend *backend, const gchar *parent_id, const gchar *cat_id, const gchar *name, const gchar *summary, const gchar *icon)
{
gchar *summary_safe = NULL;
- PkItemCategory *item = NULL;
+ PkCategory *item = NULL;
gboolean ret = FALSE;
g_return_val_if_fail (PK_IS_BACKEND (backend), FALSE);
@@ -1585,18 +1615,21 @@ pk_backend_category (PkBackend *backend, const gchar *parent_id, const gchar *ca
/* have we already set an error? */
if (backend->priv->set_error) {
egg_warning ("already set error, cannot process: category %s", cat_id);
- return FALSE;
+ goto out;
}
/* replace unsafe chars */
summary_safe = pk_backend_strsafe (summary);
- /* form PkItemCategory struct */
- item = pk_item_category_new (parent_id, cat_id, name, summary, icon);
- if (item == NULL) {
- egg_warning ("Failed to parse category object");
- goto out;
- }
+ /* form PkCategory struct */
+ item = pk_category_new ();
+ g_object_set (item,
+ "parent-id", parent_id,
+ "cat-id", cat_id,
+ "name", name,
+ "summary", summary,
+ "icon", icon,
+ NULL);
/* emit */
g_signal_emit (backend, signals[SIGNAL_CATEGORY], 0, item);
@@ -1606,7 +1639,7 @@ pk_backend_category (PkBackend *backend, const gchar *parent_id, const gchar *ca
ret = TRUE;
out:
if (item != NULL)
- pk_item_category_unref (item);
+ g_object_unref (item);
g_free (summary_safe);
return ret;
}
@@ -1620,7 +1653,7 @@ static gboolean
pk_backend_error_timeout_delay_cb (gpointer data)
{
PkBackend *backend = PK_BACKEND (data);
- PkItemMessage *item = NULL;
+ PkMessage *item = NULL;
/* check we have not already finished */
if (backend->priv->finished) {
@@ -1629,12 +1662,12 @@ pk_backend_error_timeout_delay_cb (gpointer data)
goto out;
}
- /* form PkItemMessage struct */
- item = pk_item_message_new (PK_MESSAGE_ENUM_BACKEND_ERROR, "ErrorCode() has to be followed with Finished()!");
- if (item == NULL) {
- egg_warning ("Failed to parse message object");
- goto out;
- }
+ /* form PkMessage struct */
+ item = pk_message_new ();
+ g_object_set (item,
+ "code", PK_MESSAGE_ENUM_BACKEND_ERROR,
+ "details", "ErrorCode() has to be followed with Finished()!",
+ NULL);
/* warn the backend developer that they've done something worng
* - we can't use pk_backend_message here as we have already set
@@ -1644,7 +1677,7 @@ pk_backend_error_timeout_delay_cb (gpointer data)
pk_backend_finished (backend);
out:
if (item != NULL)
- pk_item_message_unref (item);
+ g_object_unref (item);
backend->priv->signal_error_timeout = 0;
return FALSE;
}
@@ -1680,7 +1713,7 @@ pk_backend_error_code (PkBackend *backend, PkErrorCodeEnum error_code, const gch
gchar *buffer;
gboolean ret = TRUE;
gboolean need_untrusted;
- PkItemErrorCode *item = NULL;
+ PkErrorCode *item = NULL;
g_return_val_if_fail (PK_IS_BACKEND (backend), FALSE);
@@ -1714,12 +1747,12 @@ pk_backend_error_code (PkBackend *backend, PkErrorCodeEnum error_code, const gch
else
pk_backend_set_exit_code (backend, PK_EXIT_ENUM_FAILED);
- /* form PkItemErrorCode struct */
- item = pk_item_error_code_new (error_code, buffer);
- if (item == NULL) {
- egg_warning ("Failed to parse error code object");
- goto out;
- }
+ /* form PkErrorCode struct */
+ item = pk_error_code_new ();
+ g_object_set (item,
+ "code", error_code,
+ "details", buffer,
+ NULL);
/* emit */
g_signal_emit (backend, signals[SIGNAL_ERROR_CODE], 0, item);
@@ -1729,7 +1762,7 @@ pk_backend_error_code (PkBackend *backend, PkErrorCodeEnum error_code, const gch
ret = TRUE;
out:
if (item != NULL)
- pk_item_error_code_unref (item);
+ g_object_unref (item);
g_free (buffer);
return ret;
}
@@ -2399,7 +2432,7 @@ pk_backend_reset (PkBackend *backend)
}
if (backend->priv->last_package != NULL) {
- pk_item_package_unref (backend->priv->last_package);
+ g_object_unref (backend->priv->last_package);
backend->priv->last_package = NULL;
}
backend->priv->set_error = FALSE;
@@ -2920,9 +2953,9 @@ pk_backend_test_func_immediate_false (PkBackend *backend)
* pk_backend_test_package_cb:
**/
static void
-pk_backend_test_package_cb (PkBackend *backend, PkItemPackage *item, EggTest *test)
+pk_backend_test_package_cb (PkBackend *backend, PkPackage *item, EggTest *test)
{
- egg_debug ("package:%s", item->package_id);
+ egg_debug ("package:%s", pk_package_get_id (item));
number_packages++;
}
diff --git a/src/pk-transaction-db.c b/src/pk-transaction-db.c
index bd62cf0..fc69337 100644
--- a/src/pk-transaction-db.c
+++ b/src/pk-transaction-db.c
@@ -36,7 +36,7 @@
#include <glib/gi18n.h>
#include <sqlite3.h>
#include <packagekit-glib2/pk-enum.h>
-#include <packagekit-glib2/pk-item.h>
+#include <packagekit-glib2/pk-results.h>
#include <packagekit-glib2/pk-common.h>
#include "egg-debug.h"
@@ -84,7 +84,7 @@ typedef struct {
static gint
pk_transaction_sqlite_transaction_cb (void *data, gint argc, gchar **argv, gchar **col_name)
{
- PkItemTransaction *item;
+ PkTransactionPast *item;
PkTransactionDb *tdb = PK_TRANSACTION_DB (data);
gint i;
gchar *col;
@@ -95,7 +95,7 @@ pk_transaction_sqlite_transaction_cb (void *data, gint argc, gchar **argv, gchar
g_return_val_if_fail (tdb != NULL, 0);
g_return_val_if_fail (PK_IS_TRANSACTION_DB (tdb), 0);
- item = g_new0 (PkItemTransaction, 1);
+ item = pk_transaction_past_new ();
for (i=0; i<argc; i++) {
col = col_name[i];
value = argv[i];
@@ -104,41 +104,36 @@ pk_transaction_sqlite_transaction_cb (void *data, gint argc, gchar **argv, gchar
if (!ret)
egg_warning ("failed to parse succeeded: %s", value);
if (temp == 1)
- item->succeeded = TRUE;
+ g_object_set (item, "succeeded", TRUE, NULL);
else
- item->succeeded = FALSE;
- if (item->succeeded > 1) {
- egg_warning ("item->succeeded %i! Resetting to 1", item->succeeded);
- item->succeeded = 1;
- }
+ g_object_set (item, "succeeded", FALSE, NULL);
} else if (g_strcmp0 (col, "role") == 0) {
if (value != NULL)
- item->role = pk_role_enum_from_text (value);
+ g_object_set (item, "role", pk_role_enum_from_text (value), NULL);
} else if (g_strcmp0 (col, "transaction_id") == 0) {
if (value != NULL)
- item->tid = g_strdup (value);
+ g_object_set (item, "tid", value, NULL);
} else if (g_strcmp0 (col, "timespec") == 0) {
if (value != NULL)
- item->timespec = g_strdup (value);
+ g_object_set (item, "timespec", value, NULL);
} else if (g_strcmp0 (col, "cmdline") == 0) {
if (value != NULL)
- item->cmdline = g_strdup (value);
+ g_object_set (item, "cmdline", value, NULL);
} else if (g_strcmp0 (col, "data") == 0) {
if (value != NULL)
- item->data = g_strdup (value);
+ g_object_set (item, "data", value, NULL);
} else if (g_strcmp0 (col, "uid") == 0) {
ret = egg_strtouint (value, &temp);
if (ret)
- item->uid = temp;
+ g_object_set (item, "uid", temp, NULL);
} else if (g_strcmp0 (col, "duration") == 0) {
- ret = egg_strtouint (value, &item->duration);
+ ret = egg_strtouint (value, &temp);
if (!ret) {
egg_warning ("failed to parse duration: %s", value);
- item->duration = 0;
- }
- if (item->duration > 60*60*12) {
- egg_warning ("insane duration: %i", item->duration);
- item->duration = 0;
+ } else if (temp > 60*60*12) {
+ egg_warning ("insane duration: %i", temp);
+ } else {
+ g_object_set (item, "duration", temp, NULL);
}
} else {
egg_warning ("%s = %s\n", col, value);
@@ -148,7 +143,7 @@ pk_transaction_sqlite_transaction_cb (void *data, gint argc, gchar **argv, gchar
/* emit signal */
g_signal_emit (tdb, signals [SIGNAL_TRANSACTION], 0, item);
- pk_item_transaction_unref (item);
+ g_object_unref (item);
return 0;
}
diff --git a/src/pk-transaction-extra.c b/src/pk-transaction-extra.c
index 85fe95f..82f5206 100644
--- a/src/pk-transaction-extra.c
+++ b/src/pk-transaction-extra.c
@@ -29,7 +29,7 @@
#include <glib.h>
#include <glib/gi18n.h>
#include <packagekit-glib2/pk-enum.h>
-#include <packagekit-glib2/pk-item.h>
+#include <packagekit-glib2/pk-results.h>
#include <packagekit-glib2/pk-package-id.h>
#include <packagekit-glib2/pk-desktop.h>
#include <packagekit-glib2/pk-common.h>
@@ -85,9 +85,9 @@ pk_transaction_extra_finished_cb (PkBackend *backend, PkExitEnum exit_enum, PkTr
* pk_transaction_extra_package_cb:
**/
static void
-pk_transaction_extra_package_cb (PkBackend *backend, PkItemPackage *item, PkTransactionExtra *extra)
+pk_transaction_extra_package_cb (PkBackend *backend, PkPackage *package, PkTransactionExtra *extra)
{
- g_ptr_array_add (extra->priv->list, pk_item_package_ref (item));
+ g_ptr_array_add (extra->priv->list, g_object_ref (package));
}
/**
@@ -123,10 +123,10 @@ pk_transaction_extra_set_progress_changed (PkTransactionExtra *extra, guint perc
/**
* pk_transaction_extra_get_installed_package_for_file:
**/
-static const PkItemPackage *
+static PkPackage *
pk_transaction_extra_get_installed_package_for_file (PkTransactionExtra *extra, const gchar *filename)
{
- const PkItemPackage *obj = NULL;
+ PkPackage *package = NULL;
/* use PK to find the correct package */
if (extra->priv->list->len > 0)
@@ -143,14 +143,14 @@ pk_transaction_extra_get_installed_package_for_file (PkTransactionExtra *extra,
goto out;
}
- /* get the obj */
- obj = g_ptr_array_index (extra->priv->list, 0);
- if (obj == NULL) {
- egg_warning ("cannot get obj");
+ /* get the package */
+ package = g_ptr_array_index (extra->priv->list, 0);
+ if (package == NULL) {
+ egg_warning ("cannot get package");
goto out;
}
out:
- return obj;
+ return package;
}
/**
@@ -262,9 +262,8 @@ static gint
pk_transaction_extra_sqlite_add_filename (PkTransactionExtra *extra, const gchar *filename, const gchar *md5_opt)
{
gchar *md5 = NULL;
- gchar *package = NULL;
gint rc = -1;
- const PkItemPackage *obj;
+ PkPackage *package;
gchar **parts = NULL;
/* if we've got it, use old data */
@@ -274,19 +273,18 @@ pk_transaction_extra_sqlite_add_filename (PkTransactionExtra *extra, const gchar
md5 = pk_transaction_extra_get_filename_md5 (filename);
/* resolve */
- obj = pk_transaction_extra_get_installed_package_for_file (extra, filename);
- if (obj == NULL) {
+ package = pk_transaction_extra_get_installed_package_for_file (extra, filename);
+ if (package == NULL) {
egg_warning ("failed to get list");
goto out;
}
/* add */
- parts = pk_package_id_split (obj->package_id);
+ parts = pk_package_id_split (pk_package_get_id (package));
rc = pk_transaction_extra_sqlite_add_filename_details (extra, filename, parts[PK_PACKAGE_ID_NAME], md5);
out:
g_strfreev (parts);
g_free (md5);
- g_free (package);
return rc;
}
@@ -432,15 +430,23 @@ static gchar *
pk_transaction_extra_package_list_to_string (GPtrArray *array)
{
guint i;
- const PkItemPackage *item;
+ PkPackage *package;
GString *string;
+ PkInfoEnum info;
+ gchar *package_id;
+ gchar *summary;
string = g_string_new ("");
for (i=0; i<array->len; i++) {
- item = g_ptr_array_index (array, i);
- g_string_append_printf (string, "%s\t%s\t%s\n",
- pk_info_enum_to_text (item->info),
- item->package_id, item->summary);
+ package = g_ptr_array_index (array, i);
+ g_object_get (package,
+ "info", &info,
+ "package-id", &package_id,
+ "summary", &summary,
+ NULL);
+ g_string_append_printf (string, "%s\t%s\t%s\n", pk_info_enum_to_text (info), package_id, summary);
+ g_free (package_id);
+ g_free (summary);
}
/* remove trailing newline */
@@ -878,7 +884,7 @@ pk_transaction_extra_check_library_restart (PkTransactionExtra *extra)
gchar *cmdline_full;
GPtrArray *files_session;
GPtrArray *files_system;
- const PkItemPackage *obj;
+ PkPackage *package;
GPtrArray *pids;
g_return_val_if_fail (PK_IS_POST_TRANS (extra), FALSE);
@@ -933,24 +939,24 @@ pk_transaction_extra_check_library_restart (PkTransactionExtra *extra)
for (i=0; i<files_session->len; i++) {
filename = g_ptr_array_index (files_session, i);
- obj = pk_transaction_extra_get_installed_package_for_file (extra, filename);
- if (obj == NULL) {
+ package = pk_transaction_extra_get_installed_package_for_file (extra, filename);
+ if (package == NULL) {
egg_warning ("failed to find package for %s", filename);
continue;
}
- pk_transaction_extra_set_require_restart (extra, PK_RESTART_ENUM_SECURITY_SESSION, obj->package_id);
+ pk_transaction_extra_set_require_restart (extra, PK_RESTART_ENUM_SECURITY_SESSION, pk_package_get_id (package));
}
/* process all system restarts */
for (i=0; i<files_system->len; i++) {
filename = g_ptr_array_index (files_system, i);
- obj = pk_transaction_extra_get_installed_package_for_file (extra, filename);
- if (obj == NULL) {
+ package = pk_transaction_extra_get_installed_package_for_file (extra, filename);
+ if (package == NULL) {
egg_warning ("failed to find package for %s", filename);
continue;
}
- pk_transaction_extra_set_require_restart (extra, PK_RESTART_ENUM_SECURITY_SYSTEM, obj->package_id);
+ pk_transaction_extra_set_require_restart (extra, PK_RESTART_ENUM_SECURITY_SYSTEM, pk_package_get_id (package));
}
out:
@@ -1128,7 +1134,7 @@ pk_transaction_extra_init (PkTransactionExtra *extra)
extra->priv = PK_POST_TRANS_GET_PRIVATE (extra);
extra->priv->running_exec_list = g_ptr_array_new_with_free_func ((GDestroyNotify) g_free);
extra->priv->loop = g_main_loop_new (NULL, FALSE);
- extra->priv->list = g_ptr_array_new_with_free_func ((GDestroyNotify) pk_item_package_unref);
+ extra->priv->list = g_ptr_array_new_with_free_func ((GDestroyNotify) g_object_unref);
extra->priv->backend = pk_backend_new ();
extra->priv->lsof = pk_lsof_new ();
extra->priv->db = NULL;
diff --git a/src/pk-transaction.c b/src/pk-transaction.c
index 53ed81c..359dfdb 100644
--- a/src/pk-transaction.c
+++ b/src/pk-transaction.c
@@ -510,9 +510,15 @@ pk_transaction_caller_active_changed_cb (EggDbusMonitor *egg_dbus_monitor, gbool
* pk_transaction_details_cb:
**/
static void
-pk_transaction_details_cb (PkBackend *backend, PkItemDetails *item, PkTransaction *transaction)
+pk_transaction_details_cb (PkBackend *backend, PkDetails *item, PkTransaction *transaction)
{
const gchar *group_text;
+ gchar *package_id;
+ gchar *description;
+ gchar *license;
+ gchar *url;
+ guint64 size;
+ PkGroupEnum group;
g_return_if_fail (PK_IS_TRANSACTION (transaction));
g_return_if_fail (transaction->priv->tid != NULL);
@@ -520,23 +526,47 @@ pk_transaction_details_cb (PkBackend *backend, PkItemDetails *item, PkTransactio
/* add to results */
pk_results_add_details (transaction->priv->results, item);
+ /* get data */
+ g_object_get (item,
+ "package-id", &package_id,
+ "group", &group,
+ "description", &description,
+ "license", &license,
+ "url", &url,
+ "size", &size,
+ NULL);
+
/* emit */
- group_text = pk_group_enum_to_text (item->group);
+ group_text = pk_group_enum_to_text (group);
egg_debug ("emitting details");
- g_signal_emit (transaction, signals[SIGNAL_DETAILS], 0, item->package_id,
- item->license, group_text, item->description, item->url, item->size);
+ g_signal_emit (transaction, signals[SIGNAL_DETAILS], 0, package_id,
+ license, group_text, description, url, size);
+
+ g_free (package_id);
+ g_free (description);
+ g_free (license);
+ g_free (url);
}
/**
* pk_transaction_error_code_cb:
**/
static void
-pk_transaction_error_code_cb (PkBackend *backend, PkItemErrorCode *item, PkTransaction *transaction)
+pk_transaction_error_code_cb (PkBackend *backend, PkErrorCode *item, PkTransaction *transaction)
{
+ gchar *details;
+ PkErrorCodeEnum code;
+
g_return_if_fail (PK_IS_TRANSACTION (transaction));
g_return_if_fail (transaction->priv->tid != NULL);
- if (item->code == PK_ERROR_ENUM_UNKNOWN) {
+ /* get data */
+ g_object_get (item,
+ "code", &code,
+ "details", &details,
+ NULL);
+
+ if (code == PK_ERROR_ENUM_UNKNOWN) {
pk_backend_message (transaction->priv->backend, PK_MESSAGE_ENUM_BACKEND_ERROR,
"%s emitted 'unknown error' rather than a specific error "
"- this is a backend problem and should be fixed!", pk_role_enum_to_text (transaction->priv->role));
@@ -546,28 +576,38 @@ pk_transaction_error_code_cb (PkBackend *backend, PkItemErrorCode *item, PkTrans
pk_results_set_error_code (transaction->priv->results, item);
/* emit */
- pk_transaction_error_code_emit (transaction, item->code, item->details);
+ pk_transaction_error_code_emit (transaction, code, details);
+
+ g_free (details);
}
/**
* pk_transaction_files_cb:
**/
static void
-pk_transaction_files_cb (PkBackend *backend, PkItemFiles *item, PkTransaction *transaction)
+pk_transaction_files_cb (PkBackend *backend, PkFiles *item, PkTransaction *transaction)
{
gchar *filelist = NULL;
guint i;
+ gchar *package_id;
+ gchar **files;
g_return_if_fail (PK_IS_TRANSACTION (transaction));
g_return_if_fail (transaction->priv->tid != NULL);
+ /* get data */
+ g_object_get (item,
+ "package-id", &package_id,
+ "files", &files,
+ NULL);
+
/* ensure the files have the correct prefix */
if (transaction->priv->role == PK_ROLE_ENUM_DOWNLOAD_PACKAGES) {
- for (i=0; item->files[i] != NULL; i++) {
- if (!g_str_has_prefix (item->files[i], transaction->priv->cached_directory)) {
+ for (i=0; files[i] != NULL; i++) {
+ if (!g_str_has_prefix (files[i], transaction->priv->cached_directory)) {
pk_backend_message (transaction->priv->backend, PK_MESSAGE_ENUM_BACKEND_ERROR,
"%s does not have the correct prefix (%s)",
- item->files[i], transaction->priv->cached_directory);
+ files[i], transaction->priv->cached_directory);
}
}
}
@@ -576,36 +616,62 @@ pk_transaction_files_cb (PkBackend *backend, PkItemFiles *item, PkTransaction *t
pk_results_add_files (transaction->priv->results, item);
/* emit */
- filelist = g_strjoinv (";", item->files);
- egg_debug ("emitting files %s, %s", item->package_id, filelist);
- g_signal_emit (transaction, signals[SIGNAL_FILES], 0, item->package_id, filelist);
+ filelist = g_strjoinv (";", files);
+ egg_debug ("emitting files %s, %s", package_id, filelist);
+ g_signal_emit (transaction, signals[SIGNAL_FILES], 0, package_id, filelist);
g_free (filelist);
+ g_free (package_id);
+ g_strfreev (files);
}
/**
* pk_transaction_category_cb:
**/
static void
-pk_transaction_category_cb (PkBackend *backend, PkItemCategory *item, PkTransaction *transaction)
+pk_transaction_category_cb (PkBackend *backend, PkCategory *item, PkTransaction *transaction)
{
+ gchar *parent_id;
+ gchar *cat_id;
+ gchar *name;
+ gchar *summary;
+ gchar *icon;
+
g_return_if_fail (PK_IS_TRANSACTION (transaction));
g_return_if_fail (transaction->priv->tid != NULL);
/* add to results */
pk_results_add_category (transaction->priv->results, item);
+ /* get data */
+ g_object_get (item,
+ "parent-id", &parent_id,
+ "cat-id", &cat_id,
+ "name", &name,
+ "summary", &summary,
+ "icon", &icon,
+ NULL);
+
/* emit */
- egg_debug ("emitting category %s, %s, %s, %s, %s ", item->parent_id, item->cat_id, item->name, item->summary, item->icon);
- g_signal_emit (transaction, signals[SIGNAL_CATEGORY], 0, item->parent_id, item->cat_id, item->name, item->summary, item->icon);
+ egg_debug ("emitting category %s, %s, %s, %s, %s ", parent_id, cat_id, name, summary, icon);
+ g_signal_emit (transaction, signals[SIGNAL_CATEGORY], 0, parent_id, cat_id, name, summary, icon);
+
+ g_free (parent_id);
+ g_free (cat_id);
+ g_free (name);
+ g_free (summary);
+ g_free (icon);
}
/**
* pk_transaction_distro_upgrade_cb:
**/
static void
-pk_transaction_distro_upgrade_cb (PkBackend *backend, PkItemDistroUpgrade *item, PkTransaction *transaction)
+pk_transaction_distro_upgrade_cb (PkBackend *backend, PkDistroUpgrade *item, PkTransaction *transaction)
{
const gchar *type_text;
+ gchar *name;
+ gchar *summary;
+ PkUpdateStateEnum state;
g_return_if_fail (PK_IS_TRANSACTION (transaction));
g_return_if_fail (transaction->priv->tid != NULL);
@@ -613,10 +679,20 @@ pk_transaction_distro_upgrade_cb (PkBackend *backend, PkItemDistroUpgrade *item,
/* add to results */
pk_results_add_distro_upgrade (transaction->priv->results, item);
+ /* get data */
+ g_object_get (item,
+ "state", &state,
+ "name", &name,
+ "summary", &summary,
+ NULL);
+
/* emit */
- type_text = pk_distro_upgrade_enum_to_text (item->state);
- egg_debug ("emitting distro-upgrade %s, %s, %s", type_text, item->name, item->summary);
- g_signal_emit (transaction, signals[SIGNAL_DISTRO_UPGRADE], 0, type_text, item->name, item->summary);
+ type_text = pk_distro_upgrade_enum_to_text (state);
+ egg_debug ("emitting distro-upgrade %s, %s, %s", type_text, name, summary);
+ g_signal_emit (transaction, signals[SIGNAL_DISTRO_UPGRADE], 0, type_text, name, summary);
+
+ g_free (name);
+ g_free (summary);
}
/**
@@ -626,15 +702,25 @@ static gchar *
pk_transaction_package_list_to_string (GPtrArray *array)
{
guint i;
- const PkItemPackage *item;
+ PkPackage *item;
GString *string;
+ PkInfoEnum info;
+ gchar *package_id = NULL;
+ gchar *summary = NULL;
string = g_string_new ("");
for (i=0; i<array->len; i++) {
item = g_ptr_array_index (array, i);
+ g_object_get (item,
+ "info", &info,
+ "package-id", &package_id,
+ "summary", &summary,
+ NULL);
g_string_append_printf (string, "%s\t%s\t%s\n",
- pk_info_enum_to_text (item->info),
- item->package_id, item->summary);
+ pk_info_enum_to_text (info),
+ package_id, summary);
+ g_free (package_id);
+ g_free (summary);
}
/* remove trailing newline */
@@ -656,9 +742,11 @@ pk_transaction_finished_cb (PkBackend *backend, PkExitEnum exit_enum, PkTransact
guint i;
GPtrArray *list;
GPtrArray *array;
- const PkItemPackage *item;
+ PkPackage *item;
gchar *package_id;
+ gchar *package_id_tmp;
gchar **split;
+ PkInfoEnum info;
g_return_if_fail (PK_IS_TRANSACTION (transaction));
g_return_if_fail (transaction->priv->tid != NULL);
@@ -696,21 +784,26 @@ pk_transaction_finished_cb (PkBackend *backend, PkExitEnum exit_enum, PkTransact
array = pk_results_get_package_array (transaction->priv->results);
/* filter on UPDATING */
- list = g_ptr_array_new ();
+ list = g_ptr_array_new_with_free_func (g_free);
for (i=0; i<array->len; i++) {
item = g_ptr_array_index (array, i);
- if (item->info == PK_INFO_ENUM_UPDATING) {
+ g_object_get (item,
+ "info", &info,
+ "package-id", &package_id,
+ NULL);
+ if (info == PK_INFO_ENUM_UPDATING) {
/* we convert the package_id data to be 'installed' as this means
* we can use the local package database for GetFiles rather than
* downloading new remote metadata */
- split = pk_package_id_split (item->package_id);
- package_id = pk_package_id_build (split[PK_PACKAGE_ID_NAME],
- split[PK_PACKAGE_ID_VERSION],
- split[PK_PACKAGE_ID_ARCH],
- "installed");
+ split = pk_package_id_split (package_id);
+ package_id_tmp = pk_package_id_build (split[PK_PACKAGE_ID_NAME],
+ split[PK_PACKAGE_ID_VERSION],
+ split[PK_PACKAGE_ID_ARCH],
+ "installed");
+ g_ptr_array_add (list, package_id_tmp);
g_strfreev (split);
- g_ptr_array_add (list, package_id);
}
+ g_free (package_id);
}
/* process file lists on these packages */
@@ -720,8 +813,7 @@ pk_transaction_finished_cb (PkBackend *backend, PkExitEnum exit_enum, PkTransact
g_strfreev (package_ids);
}
g_ptr_array_unref (array);
- g_ptr_array_foreach (list, (GFunc) g_free, NULL);
- g_ptr_array_free (list, TRUE);
+ g_ptr_array_unref (list);
}
}
@@ -736,20 +828,25 @@ pk_transaction_finished_cb (PkBackend *backend, PkExitEnum exit_enum, PkTransact
array = pk_results_get_package_array (transaction->priv->results);
/* filter on INSTALLING | UPDATING */
- list = g_ptr_array_new ();
+ list = g_ptr_array_new_with_free_func (g_free);
for (i=0; i<array->len; i++) {
item = g_ptr_array_index (array, i);
- if (item->info == PK_INFO_ENUM_INSTALLING ||
- item->info == PK_INFO_ENUM_UPDATING) {
+ g_object_get (item,
+ "info", &info,
+ "package-id", &package_id,
+ NULL);
+ if (info == PK_INFO_ENUM_INSTALLING ||
+ info == PK_INFO_ENUM_UPDATING) {
/* we convert the package_id data to be 'installed' */
- split = pk_package_id_split (item->package_id);
- package_id = pk_package_id_build (split[PK_PACKAGE_ID_NAME],
- split[PK_PACKAGE_ID_VERSION],
- split[PK_PACKAGE_ID_ARCH],
- "installed");
+ split = pk_package_id_split (package_id);
+ package_id_tmp = pk_package_id_build (split[PK_PACKAGE_ID_NAME],
+ split[PK_PACKAGE_ID_VERSION],
+ split[PK_PACKAGE_ID_ARCH],
+ "installed");
+ g_ptr_array_add (list, package_id_tmp);
g_strfreev (split);
- g_ptr_array_add (list, package_id);
}
+ g_free (package_id);
}
egg_debug ("processing %i packags for desktop files", list->len);
@@ -760,8 +857,7 @@ pk_transaction_finished_cb (PkBackend *backend, PkExitEnum exit_enum, PkTransact
g_strfreev (package_ids);
}
g_ptr_array_unref (array);
- g_ptr_array_foreach (list, (GFunc) g_free, NULL);
- g_ptr_array_free (list, TRUE);
+ g_ptr_array_unref (list);
}
}
@@ -842,13 +938,18 @@ pk_transaction_finished_cb (PkBackend *backend, PkExitEnum exit_enum, PkTransact
/* report to syslog */
for (i=0; i<array->len; i++) {
item = g_ptr_array_index (array, i);
- if (item->info == PK_INFO_ENUM_REMOVING ||
- item->info == PK_INFO_ENUM_INSTALLING ||
- item->info == PK_INFO_ENUM_UPDATING) {
+ g_object_get (item,
+ "info", &info,
+ "package-id", &package_id,
+ NULL);
+ if (info == PK_INFO_ENUM_REMOVING ||
+ info == PK_INFO_ENUM_INSTALLING ||
+ info == PK_INFO_ENUM_UPDATING) {
pk_syslog_add (transaction->priv->syslog, PK_SYSLOG_TYPE_INFO, "in %s for %s package %s was %s for uid %i",
transaction->priv->tid, pk_role_enum_to_text (transaction->priv->role),
- item->package_id, pk_info_enum_to_text (item->info), transaction->priv->uid);
+ package_id, pk_info_enum_to_text (info), transaction->priv->uid);
}
+ g_free (package_id);
}
g_free (packages);
g_ptr_array_unref (array);
@@ -890,20 +991,28 @@ pk_transaction_finished_cb (PkBackend *backend, PkExitEnum exit_enum, PkTransact
* pk_transaction_message_cb:
**/
static void
-pk_transaction_message_cb (PkBackend *backend, PkItemMessage *item, PkTransaction *transaction)
+pk_transaction_message_cb (PkBackend *backend, PkMessage *item, PkTransaction *transaction)
{
const gchar *message_text;
gboolean developer_mode;
+ gchar *details;
+ PkMessageEnum type;
g_return_if_fail (PK_IS_TRANSACTION (transaction));
g_return_if_fail (transaction->priv->tid != NULL);
+ /* get data */
+ g_object_get (item,
+ "type", &type,
+ "details", &details,
+ NULL);
+
/* if not running in developer mode, then skip these types */
developer_mode = pk_conf_get_bool (transaction->priv->conf, "DeveloperMode");
if (!developer_mode &&
- (item->type == PK_MESSAGE_ENUM_BACKEND_ERROR ||
- item->type == PK_MESSAGE_ENUM_DAEMON_ERROR)) {
- egg_warning ("ignoring message: %s", item->details);
+ (type == PK_MESSAGE_ENUM_BACKEND_ERROR ||
+ type == PK_MESSAGE_ENUM_DAEMON_ERROR)) {
+ egg_warning ("ignoring message: %s", details);
return;
}
@@ -911,19 +1020,24 @@ pk_transaction_message_cb (PkBackend *backend, PkItemMessage *item, PkTransactio
pk_results_add_message (transaction->priv->results, item);
/* emit */
- message_text = pk_message_enum_to_text (item->type);
- egg_debug ("emitting message %s, '%s'", message_text, item->details);
- g_signal_emit (transaction, signals[SIGNAL_MESSAGE], 0, message_text, item->details);
+ message_text = pk_message_enum_to_text (type);
+ egg_debug ("emitting message %s, '%s'", message_text, details);
+ g_signal_emit (transaction, signals[SIGNAL_MESSAGE], 0, message_text, details);
+
+ g_free (details);
}
/**
* pk_transaction_package_cb:
**/
static void
-pk_transaction_package_cb (PkBackend *backend, PkItemPackage *item, PkTransaction *transaction)
+pk_transaction_package_cb (PkBackend *backend, PkPackage *item, PkTransaction *transaction)
{
const gchar *info_text;
const gchar *role_text;
+ PkInfoEnum info;
+ gchar *package_id = NULL;
+ gchar *summary = NULL;
g_return_if_fail (PK_IS_TRANSACTION (transaction));
g_return_if_fail (transaction->priv->tid != NULL);
@@ -937,11 +1051,18 @@ pk_transaction_package_cb (PkBackend *backend, PkItemPackage *item, PkTransactio
/* we need this in warnings */
role_text = pk_role_enum_to_text (transaction->priv->role);
+ /* get data */
+ g_object_get (item,
+ "info", &info,
+ "package-id", &package_id,
+ "summary", &summary,
+ NULL);
+
/* check the backend is doing the right thing */
if (transaction->priv->role == PK_ROLE_ENUM_UPDATE_SYSTEM ||
transaction->priv->role == PK_ROLE_ENUM_INSTALL_PACKAGES ||
transaction->priv->role == PK_ROLE_ENUM_UPDATE_PACKAGES) {
- if (item->info == PK_INFO_ENUM_INSTALLED) {
+ if (info == PK_INFO_ENUM_INSTALLED) {
pk_backend_message (transaction->priv->backend, PK_MESSAGE_ENUM_BACKEND_ERROR,
"%s emitted 'installed' rather than 'installing' "
"- you need to do the package *before* you do the action", role_text);
@@ -951,7 +1072,7 @@ pk_transaction_package_cb (PkBackend *backend, PkItemPackage *item, PkTransactio
/* check we are respecting the filters */
if (pk_bitfield_contain (transaction->priv->cached_filters, PK_FILTER_ENUM_NOT_INSTALLED)) {
- if (item->info == PK_INFO_ENUM_INSTALLED) {
+ if (info == PK_INFO_ENUM_INSTALLED) {
pk_backend_message (transaction->priv->backend, PK_MESSAGE_ENUM_BACKEND_ERROR,
"%s emitted package that was installed when "
"the ~installed filter is in place", role_text);
@@ -959,7 +1080,7 @@ pk_transaction_package_cb (PkBackend *backend, PkItemPackage *item, PkTransactio
}
}
if (pk_bitfield_contain (transaction->priv->cached_filters, PK_FILTER_ENUM_INSTALLED)) {
- if (item->info == PK_INFO_ENUM_AVAILABLE) {
+ if (info == PK_INFO_ENUM_AVAILABLE) {
pk_backend_message (transaction->priv->backend, PK_MESSAGE_ENUM_BACKEND_ERROR,
"%s emitted package that was ~installed when "
"the installed filter is in place", role_text);
@@ -968,16 +1089,17 @@ pk_transaction_package_cb (PkBackend *backend, PkItemPackage *item, PkTransactio
}
/* add to results even if we already got a result */
- if (item->info != PK_INFO_ENUM_FINISHED)
+ if (info != PK_INFO_ENUM_FINISHED)
pk_results_add_package (transaction->priv->results, item);
/* emit */
g_free (transaction->priv->last_package_id);
- transaction->priv->last_package_id = g_strdup (item->package_id);
- info_text = pk_info_enum_to_text (item->info);
- egg_debug ("emit package %s, %s, %s", pk_info_enum_to_text (item->info), item->package_id, item->summary);
- g_signal_emit (transaction, signals[SIGNAL_PACKAGE], 0, info_text,
- item->package_id, item->summary);
+ transaction->priv->last_package_id = g_strdup (package_id);
+ info_text = pk_info_enum_to_text (info);
+ egg_debug ("emit package %s, %s, %s", info_text, package_id, summary);
+ g_signal_emit (transaction, signals[SIGNAL_PACKAGE], 0, info_text, package_id, summary);
+ g_free (package_id);
+ g_free (summary);
}
/**
@@ -997,76 +1119,138 @@ pk_transaction_progress_changed_cb (PkBackend *backend, guint percentage, guint
* pk_transaction_repo_detail_cb:
**/
static void
-pk_transaction_repo_detail_cb (PkBackend *backend, PkItemRepoDetail *item, PkTransaction *transaction)
+pk_transaction_repo_detail_cb (PkBackend *backend, PkRepoDetail *item, PkTransaction *transaction)
{
+ gchar *repo_id;
+ gchar *description;
+ gboolean enabled;
+
g_return_if_fail (PK_IS_TRANSACTION (transaction));
g_return_if_fail (transaction->priv->tid != NULL);
/* add to results */
pk_results_add_repo_detail (transaction->priv->results, item);
+ /* get data */
+ g_object_get (item,
+ "repo-id", &repo_id,
+ "description", &description,
+ "enabled", &enabled,
+ NULL);
+
/* emit */
- egg_debug ("emitting repo-detail %s, %s, %i", item->repo_id, item->description, item->enabled);
- g_signal_emit (transaction, signals[SIGNAL_REPO_DETAIL], 0, item->repo_id, item->description, item->enabled);
+ egg_debug ("emitting repo-detail %s, %s, %i", repo_id, description, enabled);
+ g_signal_emit (transaction, signals[SIGNAL_REPO_DETAIL], 0, repo_id, description, enabled);
+
+ g_free (repo_id);
+ g_free (description);
}
/**
* pk_transaction_repo_signature_required_cb:
**/
static void
-pk_transaction_repo_signature_required_cb (PkBackend *backend, PkItemRepoSignatureRequired *item, PkTransaction *transaction)
+pk_transaction_repo_signature_required_cb (PkBackend *backend, PkRepoSignatureRequired *item, PkTransaction *transaction)
{
const gchar *type_text;
+ gchar *package_id;
+ gchar *repository_name;
+ gchar *key_url;
+ gchar *key_userid;
+ gchar *key_id;
+ gchar *key_fingerprint;
+ gchar *key_timestamp;
+ PkSigTypeEnum type;
g_return_if_fail (PK_IS_TRANSACTION (transaction));
g_return_if_fail (transaction->priv->tid != NULL);
- type_text = pk_sig_type_enum_to_text (item->type);
-
/* add to results */
pk_results_add_repo_signature_required (transaction->priv->results, item);
+ /* get data */
+ g_object_get (item,
+ "type", &type,
+ "package-id", &package_id,
+ "repository-name", &repository_name,
+ "key-url", &key_url,
+ "key-userid", &key_userid,
+ "key-id", &key_id,
+ "key-fingerprint", &key_fingerprint,
+ "key-timestamp", &key_timestamp,
+ NULL);
+
/* emit */
+ type_text = pk_sig_type_enum_to_text (type);
egg_debug ("emitting repo_signature_required %s, %s, %s, %s, %s, %s, %s, %s",
- item->package_id, item->repository_name, item->key_url, item->key_userid, item->key_id,
- item->key_fingerprint, item->key_timestamp, type_text);
+ package_id, repository_name, key_url, key_userid, key_id,
+ key_fingerprint, key_timestamp, type_text);
g_signal_emit (transaction, signals[SIGNAL_REPO_SIGNATURE_REQUIRED], 0,
- item->package_id, item->repository_name, item->key_url, item->key_userid, item->key_id,
- item->key_fingerprint, item->key_timestamp, type_text);
+ package_id, repository_name, key_url, key_userid, key_id,
+ key_fingerprint, key_timestamp, type_text);
/* we should mark this transaction so that we finish with a special code */
transaction->priv->emit_signature_required = TRUE;
+
+ g_free (package_id);
+ g_free (repository_name);
+ g_free (key_url);
+ g_free (key_userid);
+ g_free (key_id);
+ g_free (key_fingerprint);
+ g_free (key_timestamp);
}
/**
* pk_transaction_eula_required_cb:
**/
static void
-pk_transaction_eula_required_cb (PkBackend *backend, PkItemEulaRequired *item, PkTransaction *transaction)
+pk_transaction_eula_required_cb (PkBackend *backend, PkEulaRequired *item, PkTransaction *transaction)
{
+ gchar *eula_id;
+ gchar *package_id;
+ gchar *vendor_name;
+ gchar *license_agreement;
+
g_return_if_fail (PK_IS_TRANSACTION (transaction));
g_return_if_fail (transaction->priv->tid != NULL);
/* add to results */
pk_results_add_eula_required (transaction->priv->results, item);
+ /* get data */
+ g_object_get (item,
+ "eula-id", &eula_id,
+ "package-id", &package_id,
+ "vendor-name", &vendor_name,
+ "license-agreement", &license_agreement,
+ NULL);
+
/* emit */
egg_debug ("emitting eula-required %s, %s, %s, %s",
- item->eula_id, item->package_id, item->vendor_name, item->license_agreement);
+ eula_id, package_id, vendor_name, license_agreement);
g_signal_emit (transaction, signals[SIGNAL_EULA_REQUIRED], 0,
- item->eula_id, item->package_id, item->vendor_name, item->license_agreement);
+ eula_id, package_id, vendor_name, license_agreement);
/* we should mark this transaction so that we finish with a special code */
transaction->priv->emit_eula_required = TRUE;
+
+ g_free (eula_id);
+ g_free (package_id);
+ g_free (vendor_name);
+ g_free (license_agreement);
}
/**
* pk_transaction_media_change_required_cb:
**/
static void
-pk_transaction_media_change_required_cb (PkBackend *backend, PkItemMediaChangeRequired *item, PkTransaction *transaction)
+pk_transaction_media_change_required_cb (PkBackend *backend, PkMediaChangeRequired *item, PkTransaction *transaction)
{
const gchar *media_type_text;
+ gchar *media_id;
+ gchar *media_text;
+ PkMediaTypeEnum media_type;
g_return_if_fail (PK_IS_TRANSACTION (transaction));
g_return_if_fail (transaction->priv->tid != NULL);
@@ -1074,47 +1258,71 @@ pk_transaction_media_change_required_cb (PkBackend *backend, PkItemMediaChangeRe
/* add to results */
pk_results_add_media_change_required (transaction->priv->results, item);
+ /* get data */
+ g_object_get (item,
+ "media-type", &media_type,
+ "media-id", &media_id,
+ "media-text", &media_text,
+ NULL);
+
/* emit */
- media_type_text = pk_media_type_enum_to_text (item->media_type);
+ media_type_text = pk_media_type_enum_to_text (media_type);
egg_debug ("emitting media-change-required %s, %s, %s",
- media_type_text, item->media_id, item->media_text);
+ media_type_text, media_id, media_text);
g_signal_emit (transaction, signals[SIGNAL_MEDIA_CHANGE_REQUIRED], 0,
- media_type_text, item->media_id, item->media_text);
+ media_type_text, media_id, media_text);
/* we should mark this transaction so that we finish with a special code */
transaction->priv->emit_media_change_required = TRUE;
+
+ g_free (media_id);
+ g_free (media_text);
}
/**
* pk_transaction_require_restart_cb:
**/
static void
-pk_transaction_require_restart_cb (PkBackend *backend, PkItemRequireRestart *item, PkTransaction *transaction)
+pk_transaction_require_restart_cb (PkBackend *backend, PkRequireRestart *item, PkTransaction *transaction)
{
const gchar *restart_text;
- PkItemRequireRestart *item_tmp;
+ PkRequireRestart *item_tmp;
GPtrArray *array;
gboolean found = FALSE;
guint i;
+ gchar *package_id;
+ gchar *package_id_tmp;
+ PkRestartEnum restart;
g_return_if_fail (PK_IS_TRANSACTION (transaction));
g_return_if_fail (transaction->priv->tid != NULL);
+ /* get data */
+ g_object_get (item,
+ "package-id", &package_id,
+ "restart", &restart,
+ NULL);
+
/* filter out duplicates */
array = pk_results_get_require_restart_array (transaction->priv->results);
for (i=0; i<array->len; i++) {
item_tmp = g_ptr_array_index (array, i);
- if (g_strcmp0 (item->package_id, item_tmp->package_id) == 0) {
+ g_object_get (item_tmp,
+ "package-id", &package_id_tmp,
+ NULL);
+ if (g_strcmp0 (package_id, package_id_tmp) == 0) {
+ g_free (package_id_tmp);
found = TRUE;
break;
}
+ g_free (package_id_tmp);
}
g_ptr_array_unref (array);
/* ignore */
- restart_text = pk_restart_enum_to_text (item->restart);
+ restart_text = pk_restart_enum_to_text (restart);
if (found) {
- egg_debug ("ignoring %s (%s) as already sent", restart_text, item->package_id);
+ egg_debug ("ignoring %s (%s) as already sent", restart_text, package_id);
return;
}
@@ -1122,8 +1330,10 @@ pk_transaction_require_restart_cb (PkBackend *backend, PkItemRequireRestart *ite
pk_results_add_require_restart (transaction->priv->results, item);
/* emit */
- egg_debug ("emitting require-restart %s, '%s'", restart_text, item->package_id);
- g_signal_emit (transaction, signals[SIGNAL_REQUIRE_RESTART], 0, restart_text, item->package_id);
+ egg_debug ("emitting require-restart %s, '%s'", restart_text, package_id);
+ g_signal_emit (transaction, signals[SIGNAL_REQUIRE_RESTART], 0, restart_text, package_id);
+
+ g_free (package_id);
}
/**
@@ -1148,9 +1358,17 @@ pk_transaction_status_changed_cb (PkBackend *backend, PkStatusEnum status, PkTra
* pk_transaction_transaction_cb:
**/
static void
-pk_transaction_transaction_cb (PkTransactionDb *tdb, PkItemTransaction *item, PkTransaction *transaction)
+pk_transaction_transaction_cb (PkTransactionDb *tdb, PkTransactionPast *item, PkTransaction *transaction)
{
const gchar *role_text;
+ gchar *tid;
+ gchar *timespec;
+ gchar *data;
+ gchar *cmdline;
+ guint duration;
+ guint uid;
+ gboolean succeeded;
+ PkRoleEnum role;
g_return_if_fail (PK_IS_TRANSACTION (transaction));
g_return_if_fail (transaction->priv->tid != NULL);
@@ -1158,45 +1376,93 @@ pk_transaction_transaction_cb (PkTransactionDb *tdb, PkItemTransaction *item, Pk
/* add to results */
pk_results_add_transaction (transaction->priv->results, item);
+ /* get data */
+ g_object_get (item,
+ "role", &role,
+ "tid", &tid,
+ "timespec", ×pec,
+ "succeeded", &succeeded,
+ "duration", &duration,
+ "data", &data,
+ "uid", &uid,
+ "cmdline", &cmdline,
+ NULL);
+
/* emit */
- role_text = pk_role_enum_to_text (item->role);
+ role_text = pk_role_enum_to_text (role);
egg_debug ("emitting transaction %s, %s, %i, %s, %i, %s, %i, %s",
- item->tid, item->timespec, item->succeeded, role_text,
- item->duration, item->data, item->uid, item->cmdline);
+ tid, timespec, succeeded, role_text,
+ duration, data, uid, cmdline);
g_signal_emit (transaction, signals[SIGNAL_TRANSACTION], 0,
- item->tid, item->timespec, item->succeeded, role_text,
- item->duration, item->data, item->uid, item->cmdline);
+ tid, timespec, succeeded, role_text,
+ duration, data, uid, cmdline);
+
+ g_free (tid);
+ g_free (timespec);
+ g_free (data);
+ g_free (cmdline);
}
/**
* pk_transaction_update_detail_cb:
**/
static void
-pk_transaction_update_detail_cb (PkBackend *backend, PkItemUpdateDetail *item, PkTransaction *transaction)
+pk_transaction_update_detail_cb (PkBackend *backend, PkUpdateDetail *item, PkTransaction *transaction)
{
- const gchar *restart_text;
const gchar *state_text;
+ const gchar *restart_text;
+ gchar *package_id;
+ gchar *updates;
+ gchar *obsoletes;
+ gchar *vendor_url;
+ gchar *bugzilla_url;
+ gchar *cve_url;
+ gchar *update_text;
+ gchar *changelog;
gchar *issued;
gchar *updated;
+ PkRestartEnum restart;
+ PkUpdateStateEnum state;
g_return_if_fail (PK_IS_TRANSACTION (transaction));
g_return_if_fail (transaction->priv->tid != NULL);
- restart_text = pk_restart_enum_to_text (item->restart);
- state_text = pk_update_state_enum_to_text (item->state);
- issued = pk_iso8601_from_date (item->issued);
- updated = pk_iso8601_from_date (item->updated);
-
/* add to results */
pk_results_add_update_detail (transaction->priv->results, item);
+ /* get data */
+ g_object_get (item,
+ "restart", &restart,
+ "state", &state,
+ "package-id", &package_id,
+ "updates", &updates,
+ "obsoletes", &obsoletes,
+ "vendor-url", &vendor_url,
+ "bugzilla-url", &bugzilla_url,
+ "cve-url", &cve_url,
+ "update-text", &update_text,
+ "changelog", &changelog,
+ "issued", &issued,
+ "updated", &updated,
+ NULL);
+
/* emit */
egg_debug ("emitting update-detail");
+ restart_text = pk_restart_enum_to_text (restart);
+ state_text = pk_update_state_enum_to_text (state);
g_signal_emit (transaction, signals[SIGNAL_UPDATE_DETAIL], 0,
- item->package_id, item->updates, item->obsoletes, item->vendor_url,
- item->bugzilla_url, item->cve_url, restart_text, item->update_text,
- item->changelog, state_text, issued, updated);
-
+ package_id, updates, obsoletes, vendor_url,
+ bugzilla_url, cve_url, restart_text, update_text,
+ changelog, state_text, issued, updated);
+
+ g_free (package_id);
+ g_free (updates);
+ g_free (obsoletes);
+ g_free (vendor_url);
+ g_free (bugzilla_url);
+ g_free (cve_url);
+ g_free (update_text);
+ g_free (changelog);
g_free (issued);
g_free (updated);
}
@@ -1211,12 +1477,14 @@ static gboolean
pk_transaction_pre_transaction_checks (PkTransaction *transaction, gchar **package_ids)
{
GPtrArray *updates;
- const PkItemPackage *item;
+ PkPackage *item;
guint i;
guint j = 0;
guint length = 0;
gboolean ret = FALSE;
gchar **package_ids_security = NULL;
+ gchar *package_id;
+ PkInfoEnum info;
/* chekc we have anything to process */
if (package_ids == NULL) {
@@ -1249,10 +1517,15 @@ pk_transaction_pre_transaction_checks (PkTransaction *transaction, gchar **packa
/* find security update packages */
for (i=0; i<updates->len; i++) {
item = g_ptr_array_index (updates, i);
- if (item->info == PK_INFO_ENUM_SECURITY) {
- egg_debug ("security update: %s", item->package_id);
+ g_object_get (item,
+ "info", &info,
+ "package-id", &package_id,
+ NULL);
+ if (info == PK_INFO_ENUM_SECURITY) {
+ egg_debug ("security update: %s", package_id);
length++;
}
+ g_free (package_id);
}
/* nothing to scan for */
@@ -1265,8 +1538,13 @@ pk_transaction_pre_transaction_checks (PkTransaction *transaction, gchar **packa
package_ids_security = g_new0 (gchar *, length+1);
for (i=0; i<updates->len; i++) {
item = g_ptr_array_index (updates, i);
- if (item->info == PK_INFO_ENUM_SECURITY)
- package_ids_security[j++] = g_strdup (item->package_id);
+ g_object_get (item,
+ "info", &info,
+ "package-id", &package_id,
+ NULL);
+ if (info == PK_INFO_ENUM_SECURITY)
+ package_ids_security[j++] = g_strdup (package_id);
+ g_free (package_id);
}
@@ -3225,19 +3503,29 @@ pk_transaction_get_updates (PkTransaction *transaction, const gchar *filter, DBu
/* try and reuse cache */
updates_cache = pk_cache_get_updates (transaction->priv->cache);
if (updates_cache != NULL) {
- const PkItemPackage *item;
+ PkPackage *item;
const gchar *info_text;
guint i;
+ PkInfoEnum info;
+ gchar *package_id;
+ gchar *summary;
egg_debug ("we have cached data (%i) we should use!", updates_cache->len);
/* emulate the backend */
for (i=0; i<updates_cache->len; i++) {
item = g_ptr_array_index (updates_cache, i);
- info_text = pk_info_enum_to_text (item->info);
+ g_object_get (item,
+ "info", &info,
+ "package-id", &package_id,
+ "summary", &summary,
+ NULL);
+ info_text = pk_info_enum_to_text (info);
egg_debug ("emitting package");
g_signal_emit (transaction, signals[SIGNAL_PACKAGE], 0,
- info_text, item->package_id, item->summary);
+ info_text, package_id, summary);
+ g_free (package_id);
+ g_free (summary);
}
/* set finished */
commit 8d88605d1cc608fc5397d268529c434460ed9fe3
Author: Richard Hughes <richard at hughsie.com>
Date: Tue Oct 20 15:47:36 2009 +0100
yum: disable repos that are not contactable
diff --git a/backends/yum/yumBackend.py b/backends/yum/yumBackend.py
index 8632e53..5625089 100755
--- a/backends/yum/yumBackend.py
+++ b/backends/yum/yumBackend.py
@@ -2667,6 +2667,13 @@ class PackageKitYumBackend(PackageKitBaseBackend, PackagekitPackage):
continue
repo.metadata_expire = 60 * 60 * 1.5 # 1.5 hours, the default
+ # disable repos that are not contactable
+ for repo in self.yumbase.repos.listEnabled():
+ try:
+ repo.repoXML
+ except yum.Errors.RepoError, e:
+ self.yumbase.repos.disableRepo(repo.id)
+
# should we suggest yum-complete-transaction?
unfinished = yum.misc.find_unfinished_transactions(yumlibpath=self.yumbase.conf.persistdir)
if unfinished and not lazy_cache:
commit fec9a2ace5bbe7d3656c9ea12d6d9713cb15fa3f
Author: Richard Hughes <richard at hughsie.com>
Date: Tue Oct 20 08:55:05 2009 +0100
cnf: don't exit before we try to search if no alternatives were found
diff --git a/contrib/PackageKit.spec.in b/contrib/PackageKit.spec.in
index afee47d..3c255a6 100644
--- a/contrib/PackageKit.spec.in
+++ b/contrib/PackageKit.spec.in
@@ -245,7 +245,9 @@ user to restart the computer or remove and re-insert the device.
--disable-local \
--disable-ruck \
--disable-strict \
+%if 0
--disable-glib \
+%endif
--disable-tests
make %{?_smp_mflags}
@@ -421,6 +423,7 @@ update-mime-database %{_datadir}/mime &> /dev/null || :
%{_libdir}/libpackagekit-glib*.so
%{_libdir}/pkgconfig/packagekit-glib*.pc
%dir %{_includedir}/PackageKit
+%dir %{_includedir}/PackageKit/packagekit-glib
%dir %{_includedir}/PackageKit/packagekit-glib2
%{_includedir}/PackageKit/packagekit-glib*/*.h
diff --git a/contrib/command-not-found/pk-command-not-found.c b/contrib/command-not-found/pk-command-not-found.c
index 2cdbc10..3b91e15 100644
--- a/contrib/command-not-found/pk-command-not-found.c
+++ b/contrib/command-not-found/pk-command-not-found.c
@@ -696,13 +696,6 @@ main (int argc, char *argv[])
/* TRANSLATORS: the prefix of all the output telling the user why it's not executing */
g_print ("%s ", _("Command not found."));
- /* no possibilities */
- if (array->len == 0) {
- retval = EXIT_COMMAND_NOT_FOUND;
- g_print ("\n");
- goto out;
- }
-
/* one exact possibility */
if (array->len == 1) {
possible = g_ptr_array_index (array, 0);
commit a4e6897f0118993a7229e31ac78f7d739265a558
Merge: 9522727... a41cd06...
Author: Richard Hughes <richard at hughsie.com>
Date: Mon Oct 19 09:47:07 2009 +0100
Merge branch 'master' of git+ssh://git.packagekit.org/srv/git/PackageKit
commit 952272722ad861b5bf0eb3e86be66bbc3ec7150e
Author: Richard Hughes <richard at hughsie.com>
Date: Wed Oct 14 12:48:45 2009 +0100
yum: add a few more entries in the yum-comps mapping
diff --git a/backends/yum/yum-comps-groups.conf b/backends/yum/yum-comps-groups.conf
index e1ca846..248c388 100644
--- a/backends/yum/yum-comps-groups.conf
+++ b/backends/yum/yum-comps-groups.conf
@@ -14,9 +14,9 @@ localization=base-system;input-methods,language-support;khmer-support,language-s
multimedia=apps;sound-and-video,rpmfusion_free;sound-and-video
office=apps;office,apps;editors
other=apps;engineering-and-scientific,rpmfusion_free;misc-libs,rpmfusion_nonfree;emulators
-programming=development;haskell,development;kde-software-development,development;gnome-software-development,development;development-tools,development;eclipse,development;development-libs,development;x-software-development,development;web-development,development;legacy-software-development,development;ruby,development;java-development,development;xfce-software-development,development;fedora-packager,development;mingw32,development;ocaml
+programming=development;haskell,development;kde-software-development,development;gnome-software-development,development;development-tools,development;eclipse,development;development-libs,development;x-software-development,development;web-development,development;legacy-software-development,development;ruby,development;java-development,development;xfce-software-development,development;fedora-packager,development;mingw32,development;ocaml;development;perl;development;books
publishing=apps;authoring-and-publishing,apps;font-design
-servers=servers;clustering,servers;dns-server,servers;server-cfg,servers;news-server,servers;web-server,servers;smb-server,servers;sql-server,servers;ftp-server,servers;printing,servers;mysql,servers;mail-server,servers;network-server,servers;legacy-network-server
+servers=servers;clustering,servers;dns-server,servers;server-cfg,servers;news-server,servers;web-server,servers;smb-server,servers;sql-server,servers;ftp-server,servers;printing,servers;mysql,servers;mail-server,servers;network-server,servers;legacy-network-server;servers;directory-server
system=base-system;java,base-system;base-x,base-system;hardware-support,base-system;dial-up,base-system;base,rpmfusion_free;base,rpmfusion_free;system-tools,rpmfusion_nonfree;hardware-support,rpmfusion_nonfree;misc-tools,rpmfusion_nonfree;base
virtualization=base-system;virtualization
commit 8ee9b0199d537421035816b1dde7af236dc20a30
Author: Richard Hughes <richard at hughsie.com>
Date: Wed Oct 14 10:09:05 2009 +0100
yum: only advertise GetDistroUpgrades if the preupgrade binary is present
diff --git a/backends/yum/pk-backend-yum.c b/backends/yum/pk-backend-yum.c
index 24af7a3..00a4227 100644
--- a/backends/yum/pk-backend-yum.c
+++ b/backends/yum/pk-backend-yum.c
@@ -23,6 +23,8 @@
#include <pk-backend-spawn.h>
#include <string.h>
+#define PREUPGRADE_BINARY "/usr/bin/preupgrade"
+
static PkBackendSpawn *spawn;
/**
@@ -126,6 +128,49 @@ backend_get_filters (PkBackend *backend)
}
/**
+ * backend_get_roles:
+ */
+static PkBitfield
+backend_get_roles (PkBackend *backend)
+{
+ PkBitfield roles;
+ roles = pk_bitfield_from_enums (
+ PK_ROLE_ENUM_CANCEL,
+ PK_ROLE_ENUM_GET_DEPENDS,
+ PK_ROLE_ENUM_GET_DETAILS,
+ PK_ROLE_ENUM_GET_FILES,
+ PK_ROLE_ENUM_GET_REQUIRES,
+ PK_ROLE_ENUM_GET_PACKAGES,
+ PK_ROLE_ENUM_WHAT_PROVIDES,
+ PK_ROLE_ENUM_GET_UPDATES,
+ PK_ROLE_ENUM_GET_UPDATE_DETAIL,
+ PK_ROLE_ENUM_INSTALL_PACKAGES,
+ PK_ROLE_ENUM_INSTALL_FILES,
+ PK_ROLE_ENUM_REFRESH_CACHE,
+ PK_ROLE_ENUM_REMOVE_PACKAGES,
+ PK_ROLE_ENUM_DOWNLOAD_PACKAGES,
+ PK_ROLE_ENUM_RESOLVE,
+ PK_ROLE_ENUM_SEARCH_DETAILS,
+ PK_ROLE_ENUM_SEARCH_FILE,
+ PK_ROLE_ENUM_SEARCH_GROUP,
+ PK_ROLE_ENUM_SEARCH_NAME,
+ PK_ROLE_ENUM_UPDATE_PACKAGES,
+ PK_ROLE_ENUM_UPDATE_SYSTEM,
+ PK_ROLE_ENUM_GET_REPO_LIST,
+ PK_ROLE_ENUM_REPO_ENABLE,
+ PK_ROLE_ENUM_REPO_SET_DATA,
+ PK_ROLE_ENUM_GET_CATEGORIES,
+ PK_ROLE_ENUM_SIMULATE_INSTALL_FILES,
+ -1);
+
+ /* only add GetDistroUpgrades if the binary is present */
+ if (g_file_test (PREUPGRADE_BINARY, G_FILE_TEST_EXISTS))
+ pk_bitfield_add (roles, PK_ROLE_ENUM_GET_DISTRO_UPGRADES);
+
+ return roles;
+}
+
+/**
* backend_get_mime_types:
*/
static gchar *
@@ -492,7 +537,7 @@ PK_BACKEND_OPTIONS (
backend_destroy, /* destroy */
backend_get_groups, /* get_groups */
backend_get_filters, /* get_filters */
- NULL, /* get_roles */
+ backend_get_roles, /* get_roles */
backend_get_mime_types, /* get_mime_types */
backend_cancel, /* cancel */
backend_download_packages, /* download_packages */
More information about the PackageKit-commit
mailing list