[gnome-packagekit] bugfix: Ignore cleanup and finished packages when we a simulating a remove or install
- From: Richard Hughes <rhughes src gnome org>
- To: svn-commits-list gnome org
- Cc:
- Subject: [gnome-packagekit] bugfix: Ignore cleanup and finished packages when we a simulating a remove or install
- Date: Wed, 23 Sep 2009 08:45:51 +0000 (UTC)
commit 2854846d6abad718dceb6e5b26b5bc46eabbd125
Author: Richard Hughes <richard hughsie com>
Date: Wed Sep 23 09:43:41 2009 +0100
bugfix: Ignore cleanup and finished packages when we a simulating a remove or install
src/gpk-helper-deps-install.c | 15 +++++++++++++++
src/gpk-helper-deps-remove.c | 15 +++++++++++++++
2 files changed, 30 insertions(+), 0 deletions(-)
---
diff --git a/src/gpk-helper-deps-install.c b/src/gpk-helper-deps-install.c
index ccfc8f6..3f28c40 100644
--- a/src/gpk-helper-deps-install.c
+++ b/src/gpk-helper-deps-install.c
@@ -67,6 +67,21 @@ gpk_helper_deps_install_show (GpkHelperDepsInstall *helper, PkPackageList *packa
gboolean ret;
GtkWidget *dialog;
GtkResponseType response;
+ gchar *package_id;
+ const PkPackageObj *obj;
+ guint i;
+
+ /* remove cleanup packages */
+ length = pk_package_list_get_size (deps_list);
+ for (i=0; i<length; i++) {
+ obj = pk_package_list_get_obj (deps_list, i);
+ if (obj->info == PK_INFO_ENUM_CLEANUP ||
+ obj->info == PK_INFO_ENUM_FINISHED) {
+ package_id = pk_package_id_to_string (obj->id);
+ pk_package_list_remove (deps_list, package_id);
+ g_free (package_id);
+ }
+ }
/* empty list */
length = pk_package_list_get_size (deps_list);
diff --git a/src/gpk-helper-deps-remove.c b/src/gpk-helper-deps-remove.c
index dce44de..a5c2a5d 100644
--- a/src/gpk-helper-deps-remove.c
+++ b/src/gpk-helper-deps-remove.c
@@ -64,6 +64,21 @@ gpk_helper_deps_remove_show (GpkHelperDepsRemove *helper, PkPackageList *package
guint length;
GtkWidget *dialog;
GtkResponseType response;
+ gchar *package_id;
+ const PkPackageObj *obj;
+ guint i;
+
+ /* remove cleanup packages */
+ length = pk_package_list_get_size (deps_list);
+ for (i=0; i<length; i++) {
+ obj = pk_package_list_get_obj (deps_list, i);
+ if (obj->info == PK_INFO_ENUM_CLEANUP ||
+ obj->info == PK_INFO_ENUM_FINISHED) {
+ package_id = pk_package_id_to_string (obj->id);
+ pk_package_list_remove (deps_list, package_id);
+ g_free (package_id);
+ }
+ }
/* empty list */
length = pk_package_list_get_size (deps_list);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]