927b8c
### Eclipse Workspace Patch 1.0
927b8c
#P org.eclipse.jdt.core
927b8c
Index: batch/org/eclipse/jdt/internal/compiler/batch/Main.java
927b8c
===================================================================
927b8c
RCS file: /cvsroot/eclipse/org.eclipse.jdt.core/batch/org/eclipse/jdt/internal/compiler/batch/Main.java,v
927b8c
retrieving revision 1.327
927b8c
diff -u -r1.327 Main.java
927b8c
--- batch/org/eclipse/jdt/internal/compiler/batch/Main.java	21 Apr 2008 15:00:59 -0000	1.327
927b8c
+++ batch/org/eclipse/jdt/internal/compiler/batch/Main.java	20 Nov 2008 19:26:57 -0000
927b8c
@@ -2609,6 +2609,29 @@
927b8c
 		this.options.put(CompilerOptions.OPTION_Process_Annotations, CompilerOptions.ENABLED);
927b8c
 	}
927b8c
 
927b8c
+	{
927b8c
+		// If we're building an RPM, force full debugging info to
927b8c
+		// be generated, no matter what options have been passed
927b8c
+		// by Ant.  This is something of a kludge, but it is far
927b8c
+		// better than the alternative, which is having class
927b8c
+		// files with debug info mysteriously missing.
927b8c
+
927b8c
+		String RpmPackageName = System.getenv("RPM_PACKAGE_NAME");
927b8c
+		String RpmArch = System.getenv("RPM_ARCH");
927b8c
+		String RpmBuildRoot = System.getenv("RPM_BUILD_ROOT");
927b8c
+		if (RpmPackageName != null && RpmArch != null && RpmBuildRoot != null) {
927b8c
+			this.options.put(
927b8c
+					CompilerOptions.OPTION_LocalVariableAttribute,
927b8c
+					CompilerOptions.GENERATE);
927b8c
+			this.options.put(
927b8c
+					CompilerOptions.OPTION_LineNumberAttribute,
927b8c
+					CompilerOptions.GENERATE);
927b8c
+			this.options.put(
927b8c
+					CompilerOptions.OPTION_SourceFileAttribute,
927b8c
+					CompilerOptions.GENERATE);
927b8c
+		}
927b8c
+	}
927b8c
+
927b8c
 	this.logger.logCommandLineArguments(newCommandLineArgs);
927b8c
 	this.logger.logOptions(this.options);
927b8c