Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAndrew Niefer2008-04-16 19:38:26 +0000
committerAndrew Niefer2008-04-16 19:38:26 +0000
commit84c58e24415426f80553eae9abe20d11d0fff951 (patch)
treef4bbe3e97618b55dfa3a06d15683faaf74cc9dba /bundles/org.eclipse.equinox.p2.jarprocessor
parent307967611a20aba8daffd139b6cc247621a81006 (diff)
downloadrt.equinox.p2-84c58e24415426f80553eae9abe20d11d0fff951.tar.gz
rt.equinox.p2-84c58e24415426f80553eae9abe20d11d0fff951.tar.xz
rt.equinox.p2-84c58e24415426f80553eae9abe20d11d0fff951.zip
bug 226850 - corruption of eclipse.inf
Diffstat (limited to 'bundles/org.eclipse.equinox.p2.jarprocessor')
-rw-r--r--bundles/org.eclipse.equinox.p2.jarprocessor/src/org/eclipse/equinox/internal/p2/jarprocessor/PackStep.java45
1 files changed, 21 insertions, 24 deletions
diff --git a/bundles/org.eclipse.equinox.p2.jarprocessor/src/org/eclipse/equinox/internal/p2/jarprocessor/PackStep.java b/bundles/org.eclipse.equinox.p2.jarprocessor/src/org/eclipse/equinox/internal/p2/jarprocessor/PackStep.java
index 1006dbe42..7a2a74074 100644
--- a/bundles/org.eclipse.equinox.p2.jarprocessor/src/org/eclipse/equinox/internal/p2/jarprocessor/PackStep.java
+++ b/bundles/org.eclipse.equinox.p2.jarprocessor/src/org/eclipse/equinox/internal/p2/jarprocessor/PackStep.java
@@ -12,14 +12,17 @@ package org.eclipse.equinox.internal.p2.jarprocessor;
import java.io.File;
import java.io.IOException;
-import java.util.*;
+import java.util.Collections;
+import java.util.Iterator;
+import java.util.List;
+import java.util.Properties;
+import java.util.Set;
public class PackStep extends CommandStep {
protected static String packCommand = null;
private static Boolean canPack = null;
- private String arguments = null;
private Set exclusions = Collections.EMPTY_SET;
public static boolean canPack() {
@@ -99,7 +102,7 @@ public class PackStep extends CommandStep {
if (container.containsKey(Utils.MARK_EXCLUDE_CHILDREN_PACK)) {
if (Boolean.valueOf(container.getProperty(Utils.MARK_EXCLUDE_CHILDREN_PACK)).booleanValue()) {
if (verbose)
- System.out.println(input.getName() + " is excluded from pack200 by its containers.");
+ System.out.println(input.getName() + " is excluded from pack200 by its containers."); //$NON-NLS-1$
return false;
}
break;
@@ -133,20 +136,16 @@ public class PackStep extends CommandStep {
}
protected String getArguments(File input, Properties inf, List containers) {
- if (arguments != null)
- return arguments;
//1: Explicitly marked in our .inf file
if (inf != null && inf.containsKey(Utils.PACK_ARGS)) {
- arguments = inf.getProperty(Utils.PACK_ARGS);
- return arguments;
+ return inf.getProperty(Utils.PACK_ARGS);
}
//2: Defaults set in one of our containing jars
for (Iterator iterator = containers.iterator(); iterator.hasNext();) {
Properties container = (Properties) iterator.next();
if (container.containsKey(Utils.DEFAULT_PACK_ARGS)) {
- arguments = container.getProperty(Utils.DEFAULT_PACK_ARGS);
- return arguments;
+ return container.getProperty(Utils.DEFAULT_PACK_ARGS);
}
}
@@ -154,19 +153,15 @@ public class PackStep extends CommandStep {
Properties options = getOptions();
String argsKey = input.getName() + Utils.PACK_ARGS_SUFFIX;
if (options.containsKey(argsKey)) {
- arguments = options.getProperty(argsKey);
- return arguments;
+ return options.getProperty(argsKey);
}
//4: Set by default in outside pack.properties file
if (options.containsKey(Utils.DEFAULT_PACK_ARGS)) {
- arguments = options.getProperty(Utils.DEFAULT_PACK_ARGS);
- return arguments;
+ return options.getProperty(Utils.DEFAULT_PACK_ARGS);
}
- if (arguments == null)
- arguments = "";
- return arguments;
+ return ""; //$NON-NLS-1$
}
public String getStepName() {
@@ -186,15 +181,17 @@ public class PackStep extends CommandStep {
}
verbose = v;
- //mark as conditioned
- inf.put(Utils.MARK_PROPERTY, "true"); //$NON-NLS-1$
+ //mark as conditioned if not previously marked. A signed jar is assumed to be previously conditioned.
+ if (inf.getProperty(Utils.MARK_PROPERTY) == null) {
+ inf.put(Utils.MARK_PROPERTY, "true"); //$NON-NLS-1$
- //record arguments used
- String arguments = inf.getProperty(Utils.PACK_ARGS);
- if (arguments == null) {
- arguments = getArguments(input, inf, containers);
- if (arguments != null && arguments.length() > 0)
- inf.put(Utils.PACK_ARGS, arguments);
+ //record arguments used
+ String arguments = inf.getProperty(Utils.PACK_ARGS);
+ if (arguments == null) {
+ arguments = getArguments(input, inf, containers);
+ if (arguments != null && arguments.length() > 0)
+ inf.put(Utils.PACK_ARGS, arguments);
+ }
}
}
}

Back to the top