From 1201bafe591e61bc31faec7a788d8ec636de283daead4eed64e81343fcec4f13 Mon Sep 17 00:00:00 2001 From: Dominique Leuenberger Date: Mon, 27 Jun 2011 13:55:31 +0000 Subject: [PATCH] Accepting request 74664 from home:vuntz:branches:GNOME:Factory Add patch from git to fix startup crash OBS-URL: https://build.opensuse.org/request/show/74664 OBS-URL: https://build.opensuse.org/package/show/GNOME:Factory/gnome-shell?expand=0&rev=63 --- gnome-shell-no-file_get_contents.patch | 30 ++++++++++++++++++++++++++ gnome-shell.changes | 6 ++++++ gnome-shell.spec | 3 +++ 3 files changed, 39 insertions(+) create mode 100644 gnome-shell-no-file_get_contents.patch diff --git a/gnome-shell-no-file_get_contents.patch b/gnome-shell-no-file_get_contents.patch new file mode 100644 index 0000000..40fadb4 --- /dev/null +++ b/gnome-shell-no-file_get_contents.patch @@ -0,0 +1,30 @@ +From bfd344cdece5de6230ff611e3e1c66d90913dc47 Mon Sep 17 00:00:00 2001 +From: Colin Walters +Date: Wed, 11 May 2011 18:19:24 +0000 +Subject: Use Shell.get_file_contents_utf8_sync over GLib.file_get_contents + +We need to fix the latter to return a byte array, which gjs doesn't +deal with well right now. + +https://bugzilla.gnome.org/show_bug.cgi?id=649981 +--- +(limited to 'js/ui/placeDisplay.js') + +diff --git a/js/ui/placeDisplay.js b/js/ui/placeDisplay.js +index 59ca4a6..9354247 100644 +--- a/js/ui/placeDisplay.js ++++ b/js/ui/placeDisplay.js +@@ -268,10 +268,7 @@ PlacesManager.prototype = { + if (!GLib.file_test(this._bookmarksPath, GLib.FileTest.EXISTS)) + return; + +- let [success, bookmarksContent, len] = GLib.file_get_contents(this._bookmarksPath); +- +- if (!success) +- return; ++ let bookmarksContent = Shell.get_file_contents_utf8_sync(this._bookmarksPath); + + let bookmarks = bookmarksContent.split('\n'); + +-- +cgit v0.9 diff --git a/gnome-shell.changes b/gnome-shell.changes index 8c69036..901e347 100644 --- a/gnome-shell.changes +++ b/gnome-shell.changes @@ -1,3 +1,9 @@ +------------------------------------------------------------------- +Mon Jun 27 15:47:54 CEST 2011 - vuntz@opensuse.org + +- Add gnome-shell-no-file_get_contents.patch to fix a crash on + startup. This is taken from git. + ------------------------------------------------------------------- Thu Jun 9 12:42:42 CEST 2011 - vuntz@opensuse.org diff --git a/gnome-shell.spec b/gnome-shell.spec index a4398ab..2320630 100644 --- a/gnome-shell.spec +++ b/gnome-shell.spec @@ -25,6 +25,8 @@ Summary: GNOME Shell Group: System/GUI/GNOME Url: http://live.gnome.org/GnomeShell Source: %{name}-%{version}.tar.bz2 +# PATCH-FIX-UPSTREAM gnome-shell-no-file_get_contents.patch vuntz@opensuse.org -- Taken from git, fix an exception on startup that makes gnome-shell unusable +Patch0: gnome-shell-no-file_get_contents.patch Patch2: default-applications.patch BuildRequires: intltool BuildRequires: translation-update-upstream @@ -77,6 +79,7 @@ documents, and organizing open windows in GNOME. %prep %setup -q translation-update-upstream +%patch0 -p1 %if 0%{?suse_version} >= 1140 %patch2 -p1 %endif