- Add workaround in launcher-addplatformtotildeeclipse.patch for problems
caused by bug #238109. - Resolves: #238109.
This commit is contained in:
parent
af1c56df54
commit
6243123cb0
|
@ -1,13 +1,27 @@
|
||||||
### Eclipse Workspace Patch 1.0
|
Index: library/eclipse.c
|
||||||
#P platform-launcher
|
===================================================================
|
||||||
|
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
|
||||||
|
@@ -512,6 +513,8 @@
|
||||||
|
/* Get the command to start the Java VM. */
|
||||||
|
vmCommandArgs = getVMCommand( argc, argv );
|
||||||
|
|
||||||
|
+ addPlatformToTildeDotEclipse();
|
||||||
|
+
|
||||||
|
/* While the Java VM should be restarted */
|
||||||
|
vmCommand = vmCommandArgs;
|
||||||
|
while (vmCommand != NULL)
|
||||||
Index: library/gtk/eclipseGtk.c
|
Index: library/gtk/eclipseGtk.c
|
||||||
===================================================================
|
===================================================================
|
||||||
RCS file: /cvsroot/eclipse/platform-launcher/library/gtk/eclipseGtk.c,v
|
RCS file: /cvsroot/eclipse/platform-launcher/library/gtk/eclipseGtk.c,v
|
||||||
retrieving revision 1.27
|
retrieving revision 1.27
|
||||||
diff -u -r1.27 eclipseGtk.c
|
diff -u -r1.27 eclipseGtk.c
|
||||||
--- library/gtk/eclipseGtk.c 27 Mar 2006 18:25:42 -0000 1.27
|
--- library/gtk/eclipseGtk.c 27 Mar 2006 18:25:42 -0000 1.27
|
||||||
+++ library/gtk/eclipseGtk.c 27 Apr 2007 08:39:06 -0000
|
+++ library/gtk/eclipseGtk.c 30 Apr 2007 17:43:21 -0000
|
||||||
@@ -335,3 +335,88 @@
|
@@ -335,3 +335,95 @@
|
||||||
gtk_main_quit();
|
gtk_main_quit();
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
|
@ -16,14 +30,12 @@ diff -u -r1.27 eclipseGtk.c
|
||||||
+void addPlatformToTildeDotEclipse()
|
+void addPlatformToTildeDotEclipse()
|
||||||
+{
|
+{
|
||||||
+ gchar *platform_xml, *touched;
|
+ gchar *platform_xml, *touched;
|
||||||
+ gchar *config_end_position;
|
+ gchar *rcp321_position;
|
||||||
+ gsize old_length;
|
+ gchar *platform_xml_contents;
|
||||||
+ gchar *old_contents, *new_contents;
|
|
||||||
+ GError *error = NULL;
|
+ GError *error = NULL;
|
||||||
+ const gchar *site_element = "<site url=\"platform:/base/\" enabled=\"true\" updateable=\"true\" policy=\"USER-EXCLUDE\">\n<feature id=\"org.eclipse.rcp\" version=\"3.2.2.r322_v20070104-iwP0VLKnfFC923K\" url=\"features/org.eclipse.rcp_3.2.2.r322_v20070104-iwP0VLKnfFC923K/\">\n</feature>\n</site>\n\0";
|
|
||||||
+
|
+
|
||||||
+ platform_xml = g_strconcat(g_get_home_dir(), "/.eclipse/org.eclipse.platform_3.2.0/configuration/org.eclipse.update/platform.xml", NULL);
|
+ platform_xml = g_strconcat(g_get_home_dir(), "/.eclipse/org.eclipse.platform_3.2.0/configuration/org.eclipse.update/platform.xml", NULL);
|
||||||
+ touched = g_strconcat(g_get_home_dir(), "/.eclipse/.dont-need-to-modify-homedir-fedora", NULL);
|
+ touched = g_strconcat(g_get_home_dir(), "/.eclipse/.homedirmodified-fedora", NULL);
|
||||||
+
|
+
|
||||||
+
|
+
|
||||||
+ if (!g_file_test(platform_xml, G_FILE_TEST_EXISTS))
|
+ if (!g_file_test(platform_xml, G_FILE_TEST_EXISTS))
|
||||||
|
@ -33,7 +45,7 @@ diff -u -r1.27 eclipseGtk.c
|
||||||
+ * so add the appropriate file to ~/.eclipse. */
|
+ * so add the appropriate file to ~/.eclipse. */
|
||||||
+ if (g_file_set_contents(touched, "\0", -1, &error) == FALSE)
|
+ if (g_file_set_contents(touched, "\0", -1, &error) == FALSE)
|
||||||
+ {
|
+ {
|
||||||
+ g_print("Error touching ~/.eclipse/.dont-need-to-modify-homedir-fedora.");
|
+ g_print("Error touching ~/.eclipse/.homedirmodified-fedora.");
|
||||||
+ g_print(g_strconcat(error->message, "\n\0", NULL));
|
+ g_print(g_strconcat(error->message, "\n\0", NULL));
|
||||||
+ g_free(error);
|
+ g_free(error);
|
||||||
+ }
|
+ }
|
||||||
|
@ -41,19 +53,14 @@ diff -u -r1.27 eclipseGtk.c
|
||||||
+ g_free(touched);
|
+ g_free(touched);
|
||||||
+ return;
|
+ return;
|
||||||
+
|
+
|
||||||
+ } else if (g_file_test(touched, G_FILE_TEST_EXISTS)) {
|
+ } else {
|
||||||
+ /* touched exists, we don't need to do anything */
|
+ /* platform_xml exists, workaround these two bugs:
|
||||||
+ g_free(platform_xml);
|
+ * https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=238107
|
||||||
+ g_free(touched);
|
+ * https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=238109
|
||||||
+ return;
|
+ *
|
||||||
+ }
|
+ * remove the unwanted feature if its in platform.xml */
|
||||||
+
|
+
|
||||||
+
|
+ if (g_file_get_contents(platform_xml, &platform_xml_contents, NULL, &error) == FALSE) {
|
||||||
+ /* At this point platform_xml exists and touched does not exist */
|
|
||||||
+
|
|
||||||
+ if (g_file_get_contents (platform_xml,
|
|
||||||
+ &old_contents, &old_length, &error) == FALSE)
|
|
||||||
+ {
|
|
||||||
+ g_print("Error reading platform.xml in ~/.eclipse.\
|
+ g_print("Error reading platform.xml in ~/.eclipse.\
|
||||||
+ You should remove ~/.eclipse before restarting Eclipse:\0");
|
+ You should remove ~/.eclipse before restarting Eclipse:\0");
|
||||||
+ g_print(g_strconcat(error->message, "\n\0", NULL));
|
+ g_print(g_strconcat(error->message, "\n\0", NULL));
|
||||||
|
@ -63,12 +70,18 @@ diff -u -r1.27 eclipseGtk.c
|
||||||
+ return;
|
+ return;
|
||||||
+ }
|
+ }
|
||||||
+
|
+
|
||||||
+ config_end_position = g_strrstr_len(old_contents, old_length, "</config>");
|
+ gchar *unwanted_feature = "<feature id=\"org.eclipse.rcp\" version=\"3.2.1.r321_v20060801-clWbqCmjexIWDqg\" url=\"features/org.eclipse.rcp_3.2.1.r321_v20060801-clWbqCmjexIWDqg/\">\n</feature>\0";
|
||||||
+ *config_end_position = '\0';
|
+ rcp321_position = g_strrstr(platform_xml_contents, unwanted_feature);
|
||||||
+ new_contents = g_strconcat(old_contents, site_element, "</config>\n\0", NULL);
|
|
||||||
+
|
+
|
||||||
+ if (g_file_set_contents(platform_xml,
|
+ if (rcp321_position != NULL)
|
||||||
+ new_contents, -1, &error) == FALSE)
|
+ {
|
||||||
|
+ int i;
|
||||||
|
+ for (i = 0; i < strlen(unwanted_feature); i++) {
|
||||||
|
+ rcp321_position[i] = ' ';
|
||||||
|
+ }
|
||||||
|
+ }
|
||||||
|
+
|
||||||
|
+ if (g_file_set_contents(platform_xml, platform_xml_contents, -1, &error) == FALSE)
|
||||||
+ {
|
+ {
|
||||||
+ g_print("Error writing platform.xml in ~/.eclipse.\
|
+ g_print("Error writing platform.xml in ~/.eclipse.\
|
||||||
+ You should remove ~/.eclipse before restarting Eclipse:\0");
|
+ You should remove ~/.eclipse before restarting Eclipse:\0");
|
||||||
|
@ -76,14 +89,25 @@ diff -u -r1.27 eclipseGtk.c
|
||||||
+ g_free(error);
|
+ g_free(error);
|
||||||
+ g_free(touched);
|
+ g_free(touched);
|
||||||
+ g_free(platform_xml);
|
+ g_free(platform_xml);
|
||||||
+ g_free(new_contents);
|
+ g_free(platform_xml_contents);
|
||||||
+ g_free(old_contents);
|
|
||||||
+ return;
|
+ return;
|
||||||
+ }
|
+ }
|
||||||
+
|
+
|
||||||
+ if (g_file_set_contents(touched, "\0", -1, &error) == FALSE)
|
+ g_free(platform_xml_contents);
|
||||||
|
+ }
|
||||||
|
+
|
||||||
|
+
|
||||||
|
+ if (g_file_test(touched, G_FILE_TEST_EXISTS)) {
|
||||||
|
+ /* touched exists, we don't need to do anything */
|
||||||
|
+ g_free(platform_xml);
|
||||||
|
+ g_free(touched);
|
||||||
|
+ return;
|
||||||
|
+ }
|
||||||
|
+
|
||||||
|
+ /* At this point platform_xml exists and touched does not exist. */
|
||||||
|
+ if (g_remove (platform_xml) < 0)
|
||||||
+ {
|
+ {
|
||||||
+ g_print("Error touching ~/.eclipse/.dont-need-to-modify-homedir-fedora.\
|
+ g_print("Error writing platform.xml in ~/.eclipse.\
|
||||||
+ You should remove ~/.eclipse before restarting Eclipse:\0");
|
+ You should remove ~/.eclipse before restarting Eclipse:\0");
|
||||||
+ g_print(g_strconcat(error->message, "\n\0", NULL));
|
+ g_print(g_strconcat(error->message, "\n\0", NULL));
|
||||||
+ g_free(error);
|
+ g_free(error);
|
||||||
|
@ -91,24 +115,5 @@ diff -u -r1.27 eclipseGtk.c
|
||||||
+
|
+
|
||||||
+ g_free(platform_xml);
|
+ g_free(platform_xml);
|
||||||
+ g_free(touched);
|
+ g_free(touched);
|
||||||
+ g_free(new_contents);
|
|
||||||
+ g_free(old_contents);
|
|
||||||
+
|
|
||||||
+ return;
|
+ return;
|
||||||
+}
|
+}
|
||||||
Index: library/eclipse.c
|
|
||||||
===================================================================
|
|
||||||
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 27 Apr 2007 08:39:05 -0000
|
|
||||||
@@ -512,6 +512,8 @@
|
|
||||||
/* Get the command to start the Java VM. */
|
|
||||||
vmCommandArgs = getVMCommand( argc, argv );
|
|
||||||
|
|
||||||
+ addPlatformToTildeDotEclipse();
|
|
||||||
+
|
|
||||||
/* While the Java VM should be restarted */
|
|
||||||
vmCommand = vmCommandArgs;
|
|
||||||
while (vmCommand != NULL)
|
|
||||||
|
|
|
@ -19,7 +19,7 @@ Epoch: 1
|
||||||
Summary: An open, extensible IDE
|
Summary: An open, extensible IDE
|
||||||
Name: eclipse
|
Name: eclipse
|
||||||
Version: %{eclipse_majmin}.%{eclipse_micro}
|
Version: %{eclipse_majmin}.%{eclipse_micro}
|
||||||
Release: 10%{?dist}
|
Release: 11%{?dist}
|
||||||
License: Eclipse Public License
|
License: Eclipse Public License
|
||||||
Group: Text Editors/Integrated Development Environments (IDE)
|
Group: Text Editors/Integrated Development Environments (IDE)
|
||||||
URL: http://www.eclipse.org/
|
URL: http://www.eclipse.org/
|
||||||
|
@ -1718,6 +1718,11 @@ fi
|
||||||
%{_libdir}/%{name}/plugins/org.eclipse.sdk_*
|
%{_libdir}/%{name}/plugins/org.eclipse.sdk_*
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* 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.
|
||||||
|
- Resolves: #238109.
|
||||||
|
|
||||||
* Fri Apr 27 2007 Ben Konrath <bkonrath@redhat.com> 3.2.2-10
|
* Fri Apr 27 2007 Ben Konrath <bkonrath@redhat.com> 3.2.2-10
|
||||||
- Fix problem in launcher-addplatformtotildeeclipse.patch.
|
- Fix problem in launcher-addplatformtotildeeclipse.patch.
|
||||||
- Resolves: #238109.
|
- Resolves: #238109.
|
||||||
|
|
Loading…
Reference in New Issue