rpms/eclipse/FC-6 eclipse-launcher-addplatformtotildeeclipse.patch, 1.4, 1.5 eclipse.spec, 1.358, 1.359

fedora-cvs-commits at redhat.com fedora-cvs-commits at redhat.com
Tue May 15 07:57:09 UTC 2007


Author: bkonrath

Update of /cvs/dist/rpms/eclipse/FC-6
In directory cvs.devel.redhat.com:/tmp/cvs-serv28228

Modified Files:
	eclipse-launcher-addplatformtotildeeclipse.patch eclipse.spec 
Log Message:
* Tue May 15 2007 Ben Konrath <bkonrath at redhat.com> 3.2.2-6.fc6
- Another bug fix in launcher-addplatformtotildeeclipse.patch.
- Resolves: #239991


eclipse-launcher-addplatformtotildeeclipse.patch:
 eclipse.c        |    2 
 gtk/eclipseGtk.c |  117 +++++++++++++++++++++++++++++++++++++++++++++++++++++++
 2 files changed, 119 insertions(+)

Index: eclipse-launcher-addplatformtotildeeclipse.patch
===================================================================
RCS file: /cvs/dist/rpms/eclipse/FC-6/eclipse-launcher-addplatformtotildeeclipse.patch,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -r1.4 -r1.5
--- eclipse-launcher-addplatformtotildeeclipse.patch	1 May 2007 08:58:31 -0000	1.4
+++ eclipse-launcher-addplatformtotildeeclipse.patch	15 May 2007 07:57:07 -0000	1.5
@@ -4,8 +4,8 @@
 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	1 May 2007 08:48:33 -0000
-@@ -512,6 +513,8 @@
++++ library/eclipse.c	14 May 2007 11:14:30 -0000
+@@ -512,6 +512,8 @@
      /* Get the command to start the Java VM. */
      vmCommandArgs = getVMCommand( argc, argv );
  
@@ -20,8 +20,8 @@
 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	1 May 2007 08:48:33 -0000
-@@ -335,3 +335,109 @@
++++ library/gtk/eclipseGtk.c	14 May 2007 11:14:30 -0000
+@@ -335,3 +335,120 @@
    	gtk_main_quit();
    	return FALSE;
  }
@@ -29,44 +29,52 @@
 +/* Add the platform to ~/.eclipse/org.eclipse.platform_3.2.0/configuration/org.eclipse.update/platform.xml */
 +void addPlatformToTildeDotEclipse()
 +{
-+	gchar *platform_xml, *touched;
++	gchar *platform_xml, *touched, *dot_eclipse;
 +	gchar *rcp321_position;
 +	gchar *platform_xml_contents;
 +	GError *error = NULL;
 +	
 +	platform_xml = g_strconcat(g_get_home_dir(), "/.eclipse/org.eclipse.platform_3.2.0/configuration/org.eclipse.update/platform.xml", NULL);
++	dot_eclipse =  g_strconcat(g_get_home_dir(), "/.eclipse", 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(dot_eclipse, G_FILE_TEST_EXISTS))
 +	{
-+		/* If platform.xml doesn't exist, Eclipse has yet to be started.
++		/* If .eclipse 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) 
++		if (g_mkdir(g_strconcat(g_get_home_dir(), "/.eclipse", NULL), 511) < 0) 
 +		{
 +			g_print("Error creating ~/.eclipse/.");
-+			g_print(g_strconcat(error->message, "\n\0", NULL));
-+			g_free(error);
++			g_free(platform_xml);
++			g_free(dot_eclipse);
++			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(dot_eclipse);
++			g_free(touched);
++			return;
 +		}
-+		g_free(platform_xml);
-+		g_free(touched);
-+		return;
 +		
-+	} else {
++	} 
++	else if (g_file_test(platform_xml, G_FILE_TEST_EXISTS)) 
++	{
 +		/* platform_xml exists, workaround these two bugs:
 +		 * https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=238107
 +		 * https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=238109
 +		 * 
 +		 * remove the unwanted feature if its in platform.xml */
 +
-+		 if (g_file_get_contents(platform_xml, &platform_xml_contents, NULL, &error) == FALSE) {
++		 if (g_file_get_contents(platform_xml, &platform_xml_contents, NULL, &error) == FALSE) 
++		 {
 +		 	g_print("Error reading platform.xml in ~/.eclipse.\
 +					You should remove ~/.eclipse before restarting Eclipse:\0");
 +			g_print(g_strconcat(error->message, "\n\0", NULL));
@@ -91,19 +99,21 @@
 +		{
 +        		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_print(g_strconcat(error->message, "\n\0", NULL));
 +        		g_free(error);
 +        		g_free(touched);
++        		g_free(dot_eclipse);
 +        		g_free(platform_xml);
 +        		g_free(platform_xml_contents);
 +        		return;
-+    		}
++		}
 +    	
-+        	g_free(platform_xml_contents);
++        g_free(platform_xml_contents);
 +	}
 +	
-+	
-+	if (g_file_test(touched, G_FILE_TEST_EXISTS)) {
++	g_free(dot_eclipse);
++	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);
@@ -111,15 +121,16 @@
 +	}
 +
 +	/* At this point platform_xml exists and touched does not exist. */
-+	if (g_remove(platform_xml) < 0) 
++	if (g_file_test(platform_xml, G_FILE_TEST_EXISTS)) 
 +	{
++		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;
++		         	You should remove ~/.eclipse before restarting Eclipse:\0");
++			g_free(platform_xml);
++			g_free(touched);
++			return;
++		}
 +	}
 +	if (g_file_set_contents(touched, "\0", -1, &error) == FALSE)
 +	{


Index: eclipse.spec
===================================================================
RCS file: /cvs/dist/rpms/eclipse/FC-6/eclipse.spec,v
retrieving revision 1.358
retrieving revision 1.359
diff -u -r1.358 -r1.359
--- eclipse.spec	1 May 2007 08:59:47 -0000	1.358
+++ eclipse.spec	15 May 2007 07:57:07 -0000	1.359
@@ -19,7 +19,7 @@
 Summary:        An open, extensible IDE
 Name:           eclipse
 Version:        %{eclipse_majmin}.%{eclipse_micro}
-Release:        5%{?dist} 
+Release:        6%{?dist} 
 License:        Eclipse Public License
 Group:          Text Editors/Integrated Development Environments (IDE)
 URL:            http://www.eclipse.org/
@@ -1763,6 +1763,10 @@
 %{_libdir}/%{name}/plugins/org.eclipse.sdk_*
 
 %changelog
+* Tue May 15 2007 Ben Konrath <bkonrath at redhat.com> 3.2.2-6.fc6
+- Another bug fix in launcher-addplatformtotildeeclipse.patch.
+- Resolves: #239991
+
 * Tue May 01 2007 Ben Konrath <bkonrath at redhat.com> 3.2.2-5.fc6
 - Bug fix in launcher-addplatformtotildeeclipse.patch.
 - Resolves: #238107.




More information about the fedora-cvs-commits mailing list