Accepting request 201060 from home:dimstar:branches:GNOME:Factory

- Drop gnome-packagekit-BNC383261.patch: patch has been disabled
  for more than 2 years and nobody missed the feature (bnc#689592).

OBS-URL: https://build.opensuse.org/request/show/201060
OBS-URL: https://build.opensuse.org/package/show/GNOME:Factory/gnome-settings-daemon?expand=0&rev=180
This commit is contained in:
Dominique Leuenberger 2013-09-27 11:17:47 +00:00 committed by Git OBS Bridge
parent 12bc0762f5
commit 16fab6946c
3 changed files with 6 additions and 193 deletions

View File

@ -1,189 +0,0 @@
Index: gnome-packagekit-2.91.4/src/gpk-check-update.c
===================================================================
--- gnome-packagekit-2.91.4.orig/src/gpk-check-update.c
+++ gnome-packagekit-2.91.4/src/gpk-check-update.c
@@ -453,6 +453,11 @@ gpk_check_update_show_error (GpkCheckUpd
g_object_unref (cupdate->priv->error_code);
cupdate->priv->error_code = g_object_ref (error_code);
+ if (error_enum == PK_ERROR_ENUM_DEP_RESOLUTION_FAILED) {
+ gpk_error_dialog_modal_yast (NULL, title, message, pk_error_get_details (error_code));
+ goto out;
+ }
+
/* do the bubble */
g_debug ("title=%s, message=%s", title, message);
notification = notify_notification_new (title, message, NULL);
Index: gnome-packagekit-2.91.4/src/gpk-dbus-task.c
===================================================================
--- gnome-packagekit-2.91.4.orig/src/gpk-dbus-task.c
+++ gnome-packagekit-2.91.4/src/gpk-dbus-task.c
@@ -336,7 +336,7 @@ gpk_dbus_task_error_msg (GpkDbusTask *dt
/* hide the main window */
window = gpk_modal_dialog_get_window (dtask->priv->dialog);
- gpk_error_dialog_modal_with_time (window, title, message, details, dtask->priv->timestamp);
+ gpk_error_dialog_modal_with_time (window, title, message, details, dtask->priv->timestamp, FALSE);
}
/**
Index: gnome-packagekit-2.91.4/src/gpk-error.c
===================================================================
--- gnome-packagekit-2.91.4.orig/src/gpk-error.c
+++ gnome-packagekit-2.91.4/src/gpk-error.c
@@ -31,6 +31,32 @@
#include "gpk-common.h"
#include "gpk-error.h"
+static gboolean
+gpk_error_dialog_run_yast (gpointer unused)
+{
+ gboolean retval;
+ GError *error = NULL;
+
+ PkControl *control = pk_control_new ();
+ if (!pk_control_suggest_daemon_quit(control, NULL, &error))
+ g_debug ("Failure calling pk_control_suggest_daemon_quit:%s", error->message);
+ g_object_unref (control);
+
+ retval = g_spawn_command_line_async ("gnomesu -- /sbin/yast2 online_update", NULL);
+ if (!retval)
+ g_debug ("Failure launching yast2 online_update");
+ return FALSE;
+}
+
+static void
+gpk_error_dialog_yast_cb (GtkButton *button, gpointer data)
+{
+ g_debug ("user wants to try YaST...");
+ /* we want to make sure and finish up outstanding stuff before we launch yast so we can release the libzypp lock */
+ g_timeout_add_seconds (2, gpk_error_dialog_run_yast, NULL);
+ gtk_main_quit ();
+}
+
/**
* gpk_error_dialog_expanded_cb:
**/
@@ -59,13 +85,15 @@ gpk_error_dialog_expanded_cb (GObject *o
* Shows a modal error, and blocks until the user clicks close
**/
gboolean
-gpk_error_dialog_modal_with_time (GtkWindow *window, const gchar *title, const gchar *message, const gchar *details, guint timestamp)
+gpk_error_dialog_modal_with_time (GtkWindow *window, const gchar *title, const gchar *message, const gchar *details, guint timestamp, gboolean prompt_yast)
{
GtkWidget *widget;
+ GtkWidget *button;
GtkBuilder *builder;
GtkTextBuffer *buffer = NULL;
guint retval;
GError *error = NULL;
+ gchar *full_message;
g_return_val_if_fail (message != NULL, FALSE);
@@ -108,8 +136,22 @@ gpk_error_dialog_modal_with_time (GtkWin
gtk_label_set_label (GTK_LABEL (widget), title);
/* message */
+ if (prompt_yast) {
+ g_debug ("DEP_RES failed - will ask if they want to try yast");
+ full_message = g_strconcat (message, "\n\n", _("To try and manually resolve problems use the YaST \"Online Update\" module"), NULL);
+ button = gtk_button_new_with_label(_("Start YaST and install updates manually"));
+ g_signal_connect (button, "clicked", G_CALLBACK (gpk_error_dialog_yast_cb), NULL);
+ /* add to box */
+ widget = GTK_WIDGET (gtk_builder_get_object (builder, "dialog_error"));
+ widget = gtk_dialog_get_action_area (GTK_DIALOG(widget));
+ gtk_box_pack_start (GTK_BOX (widget), button, TRUE, TRUE, 0);
+ gtk_widget_show (button);
+ }
+ else
+ full_message = g_strdup (message);
widget = GTK_WIDGET (gtk_builder_get_object (builder, "label_message"));
- gtk_label_set_markup (GTK_LABEL (widget), message);
+ gtk_label_set_markup (GTK_LABEL (widget), full_message);
+ g_free (full_message);
/* show text in the expander */
if (details == NULL || details[0] == '\0') {
@@ -153,7 +195,13 @@ out_build:
gboolean
gpk_error_dialog_modal (GtkWindow *window, const gchar *title, const gchar *message, const gchar *details)
{
- return gpk_error_dialog_modal_with_time (window, title, message, details, 0);
+ return gpk_error_dialog_modal_with_time (window, title, message, details, 0, FALSE);
+}
+
+gboolean
+gpk_error_dialog_modal_yast (GtkWindow *window, const gchar *title, const gchar *message, const gchar *details)
+{
+ return gpk_error_dialog_modal_with_time (window, title, message, details, 0, TRUE);
}
/**
Index: gnome-packagekit-2.91.4/src/gpk-error.h
===================================================================
--- gnome-packagekit-2.91.4.orig/src/gpk-error.h
+++ gnome-packagekit-2.91.4/src/gpk-error.h
@@ -37,7 +37,12 @@ gboolean gpk_error_dialog_modal_with_ti
const gchar *title,
const gchar *message,
const gchar *details,
- guint timestamp);
+ guint timestamp,
+ gboolean prompt_yast);
+gboolean gpk_error_dialog_modal_yast (GtkWindow *window,
+ const gchar *title,
+ const gchar *message,
+ const gchar *details);
G_END_DECLS
Index: gnome-packagekit-2.91.4/src/gpk-update-viewer.c
===================================================================
--- gnome-packagekit-2.91.4.orig/src/gpk-update-viewer.c
+++ gnome-packagekit-2.91.4/src/gpk-update-viewer.c
@@ -461,8 +461,12 @@ gpk_update_viewer_update_packages_cb (Pk
CA_PROP_EVENT_DESCRIPTION, _("Failed to update"), NULL);
window = GTK_WINDOW(gtk_builder_get_object (builder, "dialog_updates"));
- gpk_error_dialog_modal (window, gpk_error_enum_to_localised_text (pk_error_get_code (error_code)),
- gpk_error_enum_to_localised_message (pk_error_get_code (error_code)), pk_error_get_details (error_code));
+ if (pk_error_get_code (error_code) == PK_ERROR_ENUM_DEP_RESOLUTION_FAILED) {
+ gpk_error_dialog_modal_yast (window, gpk_error_enum_to_localised_text (pk_error_get_code (error_code)),
+ gpk_error_enum_to_localised_message (pk_error_get_code (error_code)), pk_error_get_details (error_code));
+ } else
+ gpk_error_dialog_modal (window, gpk_error_enum_to_localised_text (pk_error_get_code (error_code)),
+ gpk_error_enum_to_localised_message (pk_error_get_code (error_code)), pk_error_get_details (error_code));
/* re-enable the package list */
gpk_update_viewer_packages_set_sensitive (TRUE);
@@ -2108,8 +2112,12 @@ gpk_update_viewer_get_details_cb (PkClie
g_warning ("failed to get details: %s, %s", pk_error_enum_to_text (pk_error_get_code (error_code)), pk_error_get_details (error_code));
window = GTK_WINDOW(gtk_builder_get_object (builder, "dialog_updates"));
- gpk_error_dialog_modal (window, gpk_error_enum_to_localised_text (pk_error_get_code (error_code)),
- gpk_error_enum_to_localised_message (pk_error_get_code (error_code)), pk_error_get_details (error_code));
+ if (pk_error_get_code (error_code) == PK_ERROR_ENUM_DEP_RESOLUTION_FAILED) {
+ gpk_error_dialog_modal_yast (window, gpk_error_enum_to_localised_text (pk_error_get_code (error_code)),
+ gpk_error_enum_to_localised_message (pk_error_get_code (error_code)), pk_error_get_details (error_code));
+ } else
+ gpk_error_dialog_modal (window, gpk_error_enum_to_localised_text (pk_error_get_code (error_code)),
+ gpk_error_enum_to_localised_message (pk_error_get_code (error_code)), pk_error_get_details (error_code));
goto out;
}
@@ -3020,8 +3028,12 @@ gpk_update_viewer_get_distro_upgrades_cb
g_warning ("failed to get list of distro upgrades: %s, %s", pk_error_enum_to_text (pk_error_get_code (error_code)), pk_error_get_details (error_code));
window = GTK_WINDOW(gtk_builder_get_object (builder, "dialog_updates"));
- gpk_error_dialog_modal (window, gpk_error_enum_to_localised_text (pk_error_get_code (error_code)),
- gpk_error_enum_to_localised_message (pk_error_get_code (error_code)), pk_error_get_details (error_code));
+ if (pk_error_get_code (error_code) == PK_ERROR_ENUM_DEP_RESOLUTION_FAILED) {
+ gpk_error_dialog_modal_yast (window, gpk_error_enum_to_localised_text (pk_error_get_code (error_code)),
+ gpk_error_enum_to_localised_message (pk_error_get_code (error_code)), pk_error_get_details (error_code));
+ } else
+ gpk_error_dialog_modal (window, gpk_error_enum_to_localised_text (pk_error_get_code (error_code)),
+ gpk_error_enum_to_localised_message (pk_error_get_code (error_code)), pk_error_get_details (error_code));
goto out;
}

View File

@ -1,3 +1,9 @@
-------------------------------------------------------------------
Fri Sep 27 09:58:04 UTC 2013 - dimstar@opensuse.org
- Drop gnome-packagekit-BNC383261.patch: patch has been disabled
for more than 2 years and nobody missed the feature (bnc#689592).
------------------------------------------------------------------- -------------------------------------------------------------------
Tue Sep 24 12:10:20 UTC 2013 - dimstar@opensuse.org Tue Sep 24 12:10:20 UTC 2013 - dimstar@opensuse.org

View File

@ -45,8 +45,6 @@ Source: http://download.gnome.org/sources/gnome-settings-daemon/3.10/%{n
Patch2: gnome-settings-daemon-system-proxy-configuration.diff Patch2: gnome-settings-daemon-system-proxy-configuration.diff
# PATCH-FEATURE-UPSTREAM gnome-settings-daemon-bnc462640-mute-action.patch bnc462640 bgo572365 vuntz@novell.com -- Mute button should always mute sound instead of toggling mute status # PATCH-FEATURE-UPSTREAM gnome-settings-daemon-bnc462640-mute-action.patch bnc462640 bgo572365 vuntz@novell.com -- Mute button should always mute sound instead of toggling mute status
Patch10: gnome-settings-daemon-bnc462640-mute-action.patch Patch10: gnome-settings-daemon-bnc462640-mute-action.patch
# PATCH-NEEDS-REBASE PATCH-MISSING-TAG -- See http://en.opensuse.org/Packaging/Patches
Patch15: gnome-packagekit-BNC383261.patch
# PATCH-FIX-OPENSUSE gnome-settings-daemon-stop-reload-proxy-settings.patch bnc689592#c1, bnc#538353 glin@suse.com -- Stop g-s-d poping up the authentication dialog for reloading the proxy settings # PATCH-FIX-OPENSUSE gnome-settings-daemon-stop-reload-proxy-settings.patch bnc689592#c1, bnc#538353 glin@suse.com -- Stop g-s-d poping up the authentication dialog for reloading the proxy settings
Patch17: gnome-settings-daemon-stop-reload-proxy-settings.patch Patch17: gnome-settings-daemon-stop-reload-proxy-settings.patch
# PATCH-FEATURE-UPSTREAM gnome-settings-daemon-notify-idle-resumed.patch bnc#439018 bnc#708182 bgo#575467 hpj@suse.com -- notify user about auto suspend when returning from sleep # PATCH-FEATURE-UPSTREAM gnome-settings-daemon-notify-idle-resumed.patch bnc#439018 bnc#708182 bgo#575467 hpj@suse.com -- notify user about auto suspend when returning from sleep
@ -142,8 +140,6 @@ translation-update-upstream
#gnome-patch-translation-prepare #gnome-patch-translation-prepare
#%%patch2 -p0 #%%patch2 -p0
%patch10 -p0 %patch10 -p0
# PATCH-NEEDS-REBASE
#%%patch15 -p0
%patch17 -p1 %patch17 -p1
%patch19 -p1 %patch19 -p1