From 7f70afa3704cb0fe4d1f3baeff22f0819c88544d Mon Sep 17 00:00:00 2001 From: Mamoru Tasaka Date: Sat, 29 May 2010 06:18:53 +0000 Subject: [PATCH] Use revised upstream patch --- libfm-0.1.11-path-removal-sanity-check.patch | 27 ++++++++++++-------- libfm.spec | 7 ++--- 2 files changed, 21 insertions(+), 13 deletions(-) diff --git a/libfm-0.1.11-path-removal-sanity-check.patch b/libfm-0.1.11-path-removal-sanity-check.patch index 977f2f7..3196c28 100644 --- a/libfm-0.1.11-path-removal-sanity-check.patch +++ b/libfm-0.1.11-path-removal-sanity-check.patch @@ -1,22 +1,29 @@ +commit ad0cbac423bd916a5dd3549de068c5d6bd5a56b8 +Author: Hong Jen Yee (PCMan) +Date: Sat May 29 13:02:34 2010 +0800 + + Fix #3008676: gnome-terminal wrapper crashes with certain PATH. + diff --git a/src/gnome-terminal-wrapper.c b/src/gnome-terminal-wrapper.c -index 44134bb..45629ee 100644 +index 44134bb..14d3d82 100644 --- a/src/gnome-terminal-wrapper.c +++ b/src/gnome-terminal-wrapper.c -@@ -78,9 +78,14 @@ int main(int argc, char** argv) +@@ -78,9 +78,15 @@ int main(int argc, char** argv) } /* Remove /usr/lib/libfm from PATH */ path = g_getenv("PATH"); - sep = strchr(path, ':'); - path = sep + 1; - g_setenv("PATH", path, TRUE); -+ /* Sanity check here... */ -+ sep = NULL; -+ if (path) sep = strchr(path, ':'); -+ if (sep) path = sep + 1; -+ if (sep && path && *path) -+ g_setenv("PATH", path, TRUE); -+ else -+ g_unsetenv("PATH"); ++ if(path && g_str_has_prefix(path, PACKAGE_LIB_DIR)) ++ { ++ sep = strchr(path, ':'); ++ if(sep) ++ { ++ path = sep + 1; ++ g_setenv("PATH", path, TRUE); ++ } ++ } if((argc < 2) && terminal) /* only execute the temrinal emulator */ { diff --git a/libfm.spec b/libfm.spec index a3a4a9c..ac80d33 100644 --- a/libfm.spec +++ b/libfm.spec @@ -5,7 +5,7 @@ Name: libfm Version: 0.1.11 -Release: 6%{?dist} +Release: 7%{?dist} Summary: GIO-based library for file manager-like programs Group: System Environment/Libraries @@ -22,9 +22,10 @@ Patch0: libfm-0.1.9-pref-apps.patch Patch2: libfm-0.1.11-gterm-argc.patch # Issue in sorting by name in ja_JP.UTF-8, upstream bug 3002788 Patch3: libfm-0.1.11-sort-by-name-in-japanese.patch -# Patches need discussing with the upstream # gnome-terminal wrapper crashes with certain path setting +# upstream bug 3008676 Patch4: libfm-0.1.11-path-removal-sanity-check.patch +# Patches need discussing with the upstream BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) BuildRequires: gtk2-devel >= 2.16.0 @@ -200,7 +201,7 @@ update-mime-database %{_datadir}/mime &> /dev/null || : %changelog -* Sat May 29 2010 Mamoru Tasaka - 0.1.11-6 +* Sat May 29 2010 Mamoru Tasaka - 0.1.11-7 - Fix crash of gnome-terminal wrapper with certain path settings (bug 596598, 597270)