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
This commit is contained in:
Dominique Leuenberger 2011-06-27 13:55:31 +00:00 committed by Git OBS Bridge
parent c6b3b7c474
commit 1201bafe59
3 changed files with 39 additions and 0 deletions

View File

@ -0,0 +1,30 @@
From bfd344cdece5de6230ff611e3e1c66d90913dc47 Mon Sep 17 00:00:00 2001
From: Colin Walters <walters@verbum.org>
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

View File

@ -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 Thu Jun 9 12:42:42 CEST 2011 - vuntz@opensuse.org

View File

@ -25,6 +25,8 @@ Summary: GNOME Shell
Group: System/GUI/GNOME Group: System/GUI/GNOME
Url: http://live.gnome.org/GnomeShell Url: http://live.gnome.org/GnomeShell
Source: %{name}-%{version}.tar.bz2 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 Patch2: default-applications.patch
BuildRequires: intltool BuildRequires: intltool
BuildRequires: translation-update-upstream BuildRequires: translation-update-upstream
@ -77,6 +79,7 @@ documents, and organizing open windows in GNOME.
%prep %prep
%setup -q %setup -q
translation-update-upstream translation-update-upstream
%patch0 -p1
%if 0%{?suse_version} >= 1140 %if 0%{?suse_version} >= 1140
%patch2 -p1 %patch2 -p1
%endif %endif