From fd0870acd9dacfa6738f3176aa4da6efec575850 Mon Sep 17 00:00:00 2001 From: Alex Dupre Date: Thu, 21 Jan 2010 08:51:59 +0000 Subject: - Fix a bug in 'jar' utility - Add support for running regression tests - Respect LOCALBASE - Bump PORTREVISION These are the test results on: FreeBSD 6 i386: passed: 3113; failed: 29; error: 2 FreeBSD 8 amd64: passed: 3107; failed: 35; error: 2 Note: a couple of tests passed only after a few runs. Submitted by: ale Approved by: maintainer --- java/openjdk6/files/patch-set | 41 +++++++++++++++++++---------------------- 1 file changed, 19 insertions(+), 22 deletions(-) (limited to 'java/openjdk6/files/patch-set') diff --git a/java/openjdk6/files/patch-set b/java/openjdk6/files/patch-set index 4f047ac9e689..8548c42baae9 100644 --- a/java/openjdk6/files/patch-set +++ b/java/openjdk6/files/patch-set @@ -8852,27 +8852,24 @@ diff -uNr ../orig/jdk/src/share/classes/sun/tools/jar/Main.java ./jdk/src/share/ // An entryName(path)->File map generated during "expand", it helps to // decide whether or not an existing entry in a jar file needs to be -@@ -860,6 +861,19 @@ - * Extracts specified entries from JAR file. - */ - void extract(InputStream in, String files[]) throws IOException { -+ // Current working directory -+ -+ cwd = System.getProperty("user.dir"); -+ if (cwd == null) { -+ fatalError(getMsg("error.no.cwd")); -+ } -+ cwd = (new File(cwd)).getCanonicalPath(); -+ if (!cwd.endsWith(File.separator)) { -+ cwd += File.separator; -+ } -+ -+ // Extract the files -+ - ZipInputStream zis = new ZipInputStream(in); - ZipEntry e; - // Set of all directory entries specified in archive. Disallows -@@ -921,6 +935,10 @@ +@@ -249,6 +250,16 @@ + } + } + } else if (xflag) { ++ // Current working directory ++ cwd = System.getProperty("user.dir"); ++ if (cwd == null) { ++ fatalError(getMsg("error.no.cwd")); ++ } ++ cwd = (new File(cwd)).getCanonicalPath(); ++ if (!cwd.endsWith(File.separator)) { ++ cwd += File.separator; ++ } ++ // Extract the files + replaceFSC(files); + if (fname != null && files != null) { + extract(fname, files); +@@ -921,6 +932,10 @@ ZipEntry rc = null; String name = e.getName(); File f = new File(e.getName().replace('/', File.separatorChar)); @@ -8883,7 +8880,7 @@ diff -uNr ../orig/jdk/src/share/classes/sun/tools/jar/Main.java ./jdk/src/share/ if (e.isDirectory()) { if (f.exists()) { if (!f.isDirectory()) { -@@ -942,6 +960,10 @@ +@@ -942,6 +957,10 @@ } else { if (f.getParent() != null) { File d = new File(f.getParent()); -- cgit v1.2.3