[gnome-packagekit/gnome-2-28] 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/gnome-2-28] bugfix: Ignore cleanup and finished packages when we a simulating a remove or install
- Date: Wed, 23 Sep 2009 08:45:36 +0000 (UTC)
commit a5d9f4fa49605fe0c03603f0f5c0e587cac40a07
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]