Update to 3.10.1

This commit is contained in:
Richard Hughes 2013-10-29 08:43:05 +00:00
parent 7c65494ae1
commit 6da7eb75f5
3 changed files with 6 additions and 299 deletions

View File

@ -5,8 +5,8 @@
%global geocode_glib_version 3.10.0
Name: gnome-settings-daemon
Version: 3.10.0
Release: 3%{?dist}
Version: 3.10.1
Release: 1%{?dist}
Summary: The daemon sharing settings from GNOME to GTK+/KDE applications
Group: System Environment/Daemons
@ -17,9 +17,6 @@ Source: http://download.gnome.org/sources/%{name}/3.10/%{name}-%{version
# disable wacom for ppc/ppc64 (used on RHEL)
Patch0: %{name}-3.5.4-ppc-no-wacom.patch
# already upstreamed fixes to the updates plugin
Patch1: master-updates.patch
BuildRequires: gtk3-devel >= 3.7.8
BuildRequires: gnome-desktop3-devel >= %{gnome_desktop_version}
BuildRequires: xorg-x11-proto-devel libXxf86misc-devel
@ -90,7 +87,6 @@ The %{name}-updates package contains the updates plugin for %{name}
%if 0%{?rhel}
%patch0 -p1 -b .ppc-no-wacom
%endif
%patch1 -p1 -b .updates-fixes
autoreconf -i -f
@ -276,6 +272,9 @@ glib-compile-schemas %{_datadir}/glib-2.0/schemas &> /dev/null || :
%{_datadir}/glib-2.0/schemas/org.gnome.settings-daemon.plugins.updates.gschema.xml
%changelog
* Mon Oct 28 2013 Richard Hughes <rhughes@redhat.com> - 3.10.1-1
- Update to 3.10.1
* Fri Oct 11 2013 Richard Hughes <rhughes@redhat.com> - 3.10.0-3
- Apply the previous patch on Fedora too.

View File

@ -1,292 +0,0 @@
diff --git a/plugins/updates/gsd-updates-manager.c b/plugins/updates/gsd-updates-manager.c
index 3aff29a..901840e 100644
--- a/plugins/updates/gsd-updates-manager.c
+++ b/plugins/updates/gsd-updates-manager.c
@@ -66,13 +66,11 @@ struct GsdUpdatesManagerPrivate
GVolumeMonitor *volume_monitor;
guint failed_get_updates_count;
GPtrArray *update_packages;
- GFile *offline_update_file;
- GFileMonitor *offline_update_monitor;
- gboolean offline_update_notified;
};
static void gsd_updates_manager_class_init (GsdUpdatesManagerClass *klass);
static void gsd_updates_manager_init (GsdUpdatesManager *updates_manager);
+static void restart_and_install_updates (void);
G_DEFINE_TYPE (GsdUpdatesManager, gsd_updates_manager, G_TYPE_OBJECT)
@@ -245,6 +243,8 @@ libnotify_action_cb (NotifyNotification *notification,
GsdUpdatesManager *manager = GSD_UPDATES_MANAGER (user_data);
notify_notification_close (notification, NULL);
+ if (g_strcmp0 (action, "ignore") == 0)
+ goto out;
if (g_strcmp0 (action, "distro-upgrade-info") == 0) {
ret = g_spawn_command_line_async (DATADIR "/PackageKit/pk-upgrade-distro.sh",
&error);
@@ -281,6 +281,10 @@ libnotify_action_cb (NotifyNotification *notification,
show_offline_updates_error (manager);
goto out;
}
+ if (g_strcmp0 (action, "install") == 0) {
+ restart_and_install_updates ();
+ goto out;
+ }
if (g_strcmp0 (action, "cancel") == 0) {
/* try to cancel */
g_cancellable_cancel (manager->priv->cancellable);
@@ -383,6 +387,11 @@ get_distro_upgrades_finished_cb (GObject *object,
notify_notification_set_app_name (notification, _("Software Updates"));
notify_notification_set_timeout (notification, NOTIFY_EXPIRES_NEVER);
notify_notification_set_urgency (notification, NOTIFY_URGENCY_NORMAL);
+ notify_notification_add_action (notification, "ignore",
+ /* TRANSLATORS: don't install updates now */
+ _("Not Now"),
+ libnotify_action_cb,
+ manager, NULL);
notify_notification_add_action (notification, "distro-upgrade-info",
/* TRANSLATORS: provides more information about the upgrade */
_("More information"),
@@ -514,9 +523,26 @@ notify_critical_updates (GsdUpdatesManager *manager, GPtrArray *array)
notify_notification_set_app_name (notification, _("Software Updates"));
notify_notification_set_timeout (notification, 15000);
notify_notification_set_urgency (notification, NOTIFY_URGENCY_CRITICAL);
- notify_notification_add_action (notification, "show-update-viewer",
- /* TRANSLATORS: button: open the update viewer to install updates*/
- _("Install updates"), libnotify_action_cb, manager, NULL);
+ notify_notification_add_action (notification, "ignore",
+ /* TRANSLATORS: don't install updates now */
+ _("Not Now"),
+ libnotify_action_cb,
+ manager, NULL);
+ if (g_find_program_in_path ("gnome-software")) {
+ notify_notification_add_action (notification, "show-update-viewer",
+ /* TRANSLATORS: view available updates */
+ _("View"),
+ libnotify_action_cb, manager, NULL);
+ notify_notification_add_action (notification, "install",
+ /* TRANSLATORS: install available updates */
+ _("Restart & Install"),
+ libnotify_action_cb,
+ manager, NULL);
+ } else {
+ notify_notification_add_action (notification, "show-update-viewer",
+ /* TRANSLATORS: button: open the update viewer to install updates*/
+ _("Install updates"), libnotify_action_cb, manager, NULL);
+ }
g_signal_connect (notification, "closed",
G_CALLBACK (on_notification_closed), NULL);
ret = notify_notification_show (notification, &error);
@@ -578,9 +604,26 @@ notify_normal_updates_maybe (GsdUpdatesManager *manager, GPtrArray *array)
notify_notification_set_app_name (notification, _("Software Updates"));
notify_notification_set_timeout (notification, 15000);
notify_notification_set_urgency (notification, NOTIFY_URGENCY_NORMAL);
- notify_notification_add_action (notification, "show-update-viewer",
- /* TRANSLATORS: button: open the update viewer to install updates*/
- _("Install updates"), libnotify_action_cb, manager, NULL);
+ notify_notification_add_action (notification, "ignore",
+ /* TRANSLATORS: don't install updates now */
+ _("Not Now"),
+ libnotify_action_cb,
+ manager, NULL);
+ if (g_find_program_in_path ("gnome-software")) {
+ notify_notification_add_action (notification, "show-update-viewer",
+ /* TRANSLATORS: view available updates */
+ _("View"),
+ libnotify_action_cb, manager, NULL);
+ notify_notification_add_action (notification, "install",
+ /* TRANSLATORS: install available updates */
+ _("Restart & Install"),
+ libnotify_action_cb,
+ manager, NULL);
+ } else {
+ notify_notification_add_action (notification, "show-update-viewer",
+ /* TRANSLATORS: button: open the update viewer to install updates*/
+ _("Install updates"), libnotify_action_cb, manager, NULL);
+ }
g_signal_connect (notification, "closed",
G_CALLBACK (on_notification_closed), NULL);
ret = notify_notification_show (notification, &error);
@@ -742,7 +785,6 @@ auto_download_updates (GsdUpdatesManager *manager)
package_ids[i] = g_strdup (pk_package_get_id (pkg));
}
-#if PK_CHECK_VERSION(0,8,1)
/* we've set only-download in PkTask */
pk_task_update_packages_async (manager->priv->task,
package_ids,
@@ -750,16 +792,6 @@ auto_download_updates (GsdUpdatesManager *manager)
NULL, NULL,
(GAsyncReadyCallback) package_download_finished_cb,
manager);
-#else
- /* download them all */
- pk_client_download_packages_async (PK_CLIENT(manager->priv->task),
- package_ids,
- NULL, /* this means system cache */
- manager->priv->cancellable,
- NULL, NULL,
- (GAsyncReadyCallback) package_download_finished_cb,
- manager);
-#endif
g_strfreev (package_ids);
}
@@ -1375,120 +1407,6 @@ restart_and_install_updates (void)
g_object_unref (bus);
}
-static void
-view_updates (void)
-{
- gboolean ret;
- GError *error = NULL;
-
- ret = g_spawn_command_line_async (BINDIR "/gnome-software --mode updates", &error);
- if (!ret) {
- g_warning ("Failure launching gnome-software: %s",
- error->message);
- g_error_free (error);
- }
-}
-
-static void
-offline_update_action_cb (NotifyNotification *notification,
- gchar *action,
- gpointer user_data)
-{
-
- notify_notification_close (notification, NULL);
-
- if (g_strcmp0 (action, "view") == 0) {
- view_updates ();
- }
- else if (g_strcmp0 (action, "install") == 0) {
- restart_and_install_updates ();
- }
-}
-
-static gboolean
-reenable_offline_update (gpointer data)
-{
- GsdUpdatesManager *manager = data;
-
- manager->priv->offline_update_notified = FALSE;
-
- return G_SOURCE_REMOVE;
-}
-
-static void
-notify_offline_update_available (GsdUpdatesManager *manager)
-{
- NotifyNotification *notification;
- const gchar *title;
- const gchar *body;
- gboolean ret;
- GError *error = NULL;
-
- if (!g_file_query_exists (manager->priv->offline_update_file, NULL))
- return;
-
- if (manager->priv->offline_update_notified)
- return;
-
- manager->priv->offline_update_notified = TRUE;
-
- /* don't notify more often than every 5 minutes */
- g_timeout_add_seconds (300, reenable_offline_update, manager);
-
- title = _("Software Updates available");
- body = _("Important OS and application updates are ready to be installed");
- notification = notify_notification_new (title, body,
- GSD_UPDATES_ICON_NORMAL);
- notify_notification_set_hint_string (notification, "desktop-entry", "gnome-software");
- notify_notification_set_app_name (notification, _("GNOME Software"));
- notify_notification_set_timeout (notification, NOTIFY_EXPIRES_NEVER);
- notify_notification_set_urgency (notification, NOTIFY_URGENCY_NORMAL);
- notify_notification_add_action (notification, "ignore",
- /* TRANSLATORS: don't install updates now */
- _("Not Now"),
- offline_update_action_cb,
- manager, NULL);
- if (g_find_program_in_path ("gnome-software"))
- notify_notification_add_action (notification, "view",
- /* TRANSLATORS: view available updates */
- _("View"),
- offline_update_action_cb,
- manager, NULL);
- else
- notify_notification_add_action (notification, "install",
- /* TRANSLATORS: install available updates */
- _("Restart & Install"),
- offline_update_action_cb,
- manager, NULL);
- g_signal_connect (notification, "closed",
- G_CALLBACK (on_notification_closed), NULL);
- ret = notify_notification_show (notification, &error);
- if (!ret) {
- g_warning ("error: %s", error->message);
- g_error_free (error);
- }
-}
-
-static void
-offline_update_cb (GFileMonitor *monitor,
- GFile *file,
- GFile *other_file,
- GFileMonitorEvent event_type,
- GsdUpdatesManager *manager)
-{
- notify_offline_update_available (manager);
-}
-
-static gboolean
-initial_offline_update_check (gpointer data)
-{
- GsdUpdatesManager *manager = data;
-
- notify_offline_update_available (manager);
-
- return G_SOURCE_REMOVE;
-}
-
gboolean
gsd_updates_manager_start (GsdUpdatesManager *manager,
GError **error)
@@ -1506,9 +1424,7 @@ gsd_updates_manager_start (GsdUpdatesManager *manager,
g_object_set (manager->priv->task,
"background", TRUE,
"interactive", FALSE,
-#if PK_CHECK_VERSION(0,8,1)
"only-download", TRUE,
-#endif
NULL);
/* watch UDev for missing firmware */
@@ -1574,15 +1490,6 @@ gsd_updates_manager_start (GsdUpdatesManager *manager,
check_offline_update_cb,
manager);
- manager->priv->offline_update_file = g_file_new_for_path ("/var/lib/PackageKit/prepared-update");
- manager->priv->offline_update_monitor = g_file_monitor_file (manager->priv->offline_update_file, 0, NULL, NULL);
- g_signal_connect (manager->priv->offline_update_monitor, "changed",
- G_CALLBACK (offline_update_cb), manager);
-
- g_timeout_add_seconds (300,
- initial_offline_update_check,
- manager);
-
/* success */
ret = TRUE;
g_debug ("Started updates manager");
@@ -1605,8 +1512,6 @@ gsd_updates_manager_stop (GsdUpdatesManager *manager)
g_clear_object (&manager->priv->firmware);
g_clear_object (&manager->priv->proxy_session);
g_clear_object (&manager->priv->volume_monitor);
- g_clear_object (&manager->priv->offline_update_file);
- g_clear_object (&manager->priv->offline_update_monitor);
if (manager->priv->cancellable) {
g_cancellable_cancel (manager->priv->cancellable);
g_clear_object (&manager->priv->cancellable);

View File

@ -1 +1 @@
862cfdedc0f4ad45d2919a27581c259b gnome-settings-daemon-3.10.0.tar.xz
c50baeb1021ac2c3cef6b7cba6a2395c gnome-settings-daemon-3.10.1.tar.xz