- Fix additional problem with launcher-addplatformtotildeeclipse.patch.

- Resolves: #238109.
This commit is contained in:
Ben Konrath 2007-05-02 13:35:13 +00:00
parent 6243123cb0
commit fea2596be0
2 changed files with 24 additions and 6 deletions

View File

@ -4,7 +4,7 @@ RCS file: /cvsroot/eclipse/platform-launcher/library/eclipse.c,v
retrieving revision 1.71
diff -u -r1.71 eclipse.c
--- library/eclipse.c 25 Apr 2006 14:31:50 -0000 1.71
+++ library/eclipse.c 30 Apr 2007 17:43:21 -0000
+++ library/eclipse.c 1 May 2007 08:48:33 -0000
@@ -512,6 +513,8 @@
/* Get the command to start the Java VM. */
vmCommandArgs = getVMCommand( argc, argv );
@ -20,8 +20,8 @@ RCS file: /cvsroot/eclipse/platform-launcher/library/gtk/eclipseGtk.c,v
retrieving revision 1.27
diff -u -r1.27 eclipseGtk.c
--- library/gtk/eclipseGtk.c 27 Mar 2006 18:25:42 -0000 1.27
+++ library/gtk/eclipseGtk.c 30 Apr 2007 17:43:21 -0000
@@ -335,3 +335,95 @@
+++ library/gtk/eclipseGtk.c 1 May 2007 08:48:33 -0000
@@ -335,3 +335,109 @@
gtk_main_quit();
return FALSE;
}
@ -43,6 +43,12 @@ diff -u -r1.27 eclipseGtk.c
+ /* If platform.xml doesn't exist, Eclipse has yet to be started.
+ * We don't have worry about doing anything now and in the future
+ * so add the appropriate file to ~/.eclipse. */
+ if (g_mkdir(g_strconcat(g_get_home_dir(), "/.eclipse", NULL), 493) < 0)
+ {
+ g_print("Error creating ~/.eclipse/.");
+ g_print(g_strconcat(error->message, "\n\0", NULL));
+ g_free(error);
+ }
+ if (g_file_set_contents(touched, "\0", -1, &error) == FALSE)
+ {
+ g_print("Error touching ~/.eclipse/.homedirmodified-fedora.");
@ -105,14 +111,22 @@ diff -u -r1.27 eclipseGtk.c
+ }
+
+ /* At this point platform_xml exists and touched does not exist. */
+ if (g_remove (platform_xml) < 0)
+ if (g_remove(platform_xml) < 0)
+ {
+ g_print("Error writing platform.xml in ~/.eclipse.\
+ You should remove ~/.eclipse before restarting Eclipse:\0");
+ g_print(g_strconcat(error->message, "\n\0", NULL));
+ g_free(error);
+ g_free(platform_xml);
+ g_free(touched);
+ return;
+ }
+ if (g_file_set_contents(touched, "\0", -1, &error) == FALSE)
+ {
+ g_print("Error touching ~/.eclipse/.homedirmodified-fedora.");
+ g_print(g_strconcat(error->message, "\n\0", NULL));
+ g_free(error);
+ }
+
+ g_free(platform_xml);
+ g_free(touched);
+ return;

View File

@ -19,7 +19,7 @@ Epoch: 1
Summary: An open, extensible IDE
Name: eclipse
Version: %{eclipse_majmin}.%{eclipse_micro}
Release: 11%{?dist}
Release: 12%{?dist}
License: Eclipse Public License
Group: Text Editors/Integrated Development Environments (IDE)
URL: http://www.eclipse.org/
@ -1718,6 +1718,10 @@ fi
%{_libdir}/%{name}/plugins/org.eclipse.sdk_*
%changelog
* Wed May 02 2007 Ben Konrath <bkonrath@redhat.com> 3.2.2-12
- Fix additional problem with launcher-addplatformtotildeeclipse.patch.
- Resolves: #238109.
* Mon Apr 30 2007 Ben Konrath <bkonrath@redhat.com> 3.2.2-11
- Add workaround in launcher-addplatformtotildeeclipse.patch for problems
caused by bug #238109.