Skip to main content
summaryrefslogtreecommitdiffstats
path: root/p2
diff options
context:
space:
mode:
authorDoug Schaefer2008-12-19 15:32:33 -0500
committerDoug Schaefer2008-12-19 15:32:33 -0500
commitd735f36b31775490d9e1c744e019a814197a8672 (patch)
tree82da73a320b4daaa241337f388edb44316be3464 /p2
parente3a1eeca7a07a737cdf647c972234c038283052a (diff)
downloadorg.eclipse.cdt-d735f36b31775490d9e1c744e019a814197a8672.tar.gz
org.eclipse.cdt-d735f36b31775490d9e1c744e019a814197a8672.tar.xz
org.eclipse.cdt-d735f36b31775490d9e1c744e019a814197a8672.zip
Some fixes for zip compression.
Diffstat (limited to 'p2')
-rw-r--r--p2/org.eclipse.cdt.p2.generator/src/org/eclipse/cdt/p2/generator/MinGWGenerator.java20
-rw-r--r--p2/org.eclipse.cdt.p2/src/org/eclipse/cdt/p2/internal/repo/artifact/InstallArtifactRepository.java2
-rw-r--r--p2/org.eclipse.cdt.p2/src/org/eclipse/cdt/p2/internal/repo/artifact/TarExtractor.java2
-rw-r--r--p2/org.eclipse.cdt.p2/src/org/eclipse/cdt/p2/internal/repo/artifact/ZipExtractor.java2
4 files changed, 16 insertions, 10 deletions
diff --git a/p2/org.eclipse.cdt.p2.generator/src/org/eclipse/cdt/p2/generator/MinGWGenerator.java b/p2/org.eclipse.cdt.p2.generator/src/org/eclipse/cdt/p2/generator/MinGWGenerator.java
index b1ac1bd050..d91a9d6290 100644
--- a/p2/org.eclipse.cdt.p2.generator/src/org/eclipse/cdt/p2/generator/MinGWGenerator.java
+++ b/p2/org.eclipse.cdt.p2.generator/src/org/eclipse/cdt/p2/generator/MinGWGenerator.java
@@ -83,7 +83,7 @@ public class MinGWGenerator implements IApplication {
IInstallableUnit runtimeIU = createIU(runtimeIUDesc, runtimeId, runtimeVersion,
"http://downloads.sourceforge.net/mingw/mingwrt-3.15.1-mingw32.tar.gz",
mingwSubdir,
- InstallArtifactRepository.GZIP_COMPRESSON);
+ InstallArtifactRepository.GZIP_COMPRESSION);
// w32api
String w32apiId = "wascana.mingw.w32api";
@@ -92,7 +92,7 @@ public class MinGWGenerator implements IApplication {
IInstallableUnit w32apiIU = createIU(w32apiIUDesc, w32apiId, w32apiVersion,
"http://downloads.sourceforge.net/mingw/w32api-3.13-mingw32-dev.tar.gz",
mingwSubdir,
- InstallArtifactRepository.GZIP_COMPRESSON);
+ InstallArtifactRepository.GZIP_COMPRESSION);
// binutils
String binutilsId = "wascana.mingw.binutils";
@@ -101,7 +101,7 @@ public class MinGWGenerator implements IApplication {
IInstallableUnit binutilsIU = createIU(binutilsIUDesc, binutilsId, binutilsVersion,
"http://downloads.sourceforge.net/mingw/binutils-2.19-mingw32-bin.tar.gz",
mingwSubdir,
- InstallArtifactRepository.GZIP_COMPRESSON);
+ InstallArtifactRepository.GZIP_COMPRESSION);
// gcc-4 core
String gcc4coreId = "wascana.mingw.gcc4.core";
@@ -122,7 +122,7 @@ public class MinGWGenerator implements IApplication {
IInstallableUnit gcc4coreIU = createIU(gcc4coreIUDesc, gcc4coreId, gcc4Version,
"http://downloads.sourceforge.net/tdm-gcc/gcc-4.3.2-tdm-1-core.tar.gz",
mingwSubdir,
- InstallArtifactRepository.GZIP_COMPRESSON);
+ InstallArtifactRepository.GZIP_COMPRESSION);
// gcc-4 g++
String gcc4gppId = "wascana.mingw.gcc4.g++";
@@ -137,7 +137,7 @@ public class MinGWGenerator implements IApplication {
IInstallableUnit gcc4gppIU = createIU(gcc4gppIUDesc, gcc4gppId, gcc4Version,
"http://downloads.sourceforge.net/tdm-gcc/gcc-4.3.2-tdm-1-g++.tar.gz",
mingwSubdir,
- InstallArtifactRepository.GZIP_COMPRESSON);
+ InstallArtifactRepository.GZIP_COMPRESSION);
// gdb
String gdbId = "wascana.mingw.gdb";
@@ -155,7 +155,7 @@ public class MinGWGenerator implements IApplication {
IInstallableUnit msysIU = createIU(msysIUDesc, msysId, msysVersion,
"http://downloads.sourceforge.net/mingw/msysCORE-1.0.11-20080826.tar.gz",
"msys",
- InstallArtifactRepository.GZIP_COMPRESSON);
+ InstallArtifactRepository.GZIP_COMPRESSION);
// MinGW toolchain category
InstallableUnitDescription mingwToolchainDesc = createIUDesc("wascana.mingw", wascanaVersion, "MinGW Toolchain", null);;
@@ -200,9 +200,9 @@ public class MinGWGenerator implements IApplication {
Version sdlVersion = new Version("1.2.13");
InstallableUnitDescription sdlIUDesc = createIUDesc(sdlId, sdlVersion, "Wascana SDL (Simple Directmedia Layer) Library", lgplLic);
IInstallableUnit sdlIU = createIU(sdlIUDesc, sdlId, sdlVersion,
- "http://www.libsdl.org/release/SDL-devel-1.2.13-mingw32.tar.gz",
+ "http://downloads.sourceforge.net/wascana/SDL-mingw-1.2.13.zip",
mingwSubdir,
- InstallArtifactRepository.GZIP_COMPRESSON);
+ InstallArtifactRepository.ZIP_COMPRESSION);
// Libraries toolchain category
InstallableUnitDescription libsIUDesc = createIUDesc("wascana.libs", wascanaVersion, "Libraries", null);;
@@ -211,6 +211,9 @@ public class MinGWGenerator implements IApplication {
MetadataFactory.createRequiredCapability(
IInstallableUnit.NAMESPACE_IU_ID,
zlibIU.getId(), new VersionRange(null), null, false, false),
+ MetadataFactory.createRequiredCapability(
+ IInstallableUnit.NAMESPACE_IU_ID,
+ sdlIU.getId(), new VersionRange(null), null, false, false),
};
libsIUDesc.setRequiredCapabilities(libsReqs);
IInstallableUnit libsIU = MetadataFactory.createInstallableUnit(libsIUDesc);
@@ -226,6 +229,7 @@ public class MinGWGenerator implements IApplication {
mingwToolchainIU,
zlibIU,
+ sdlIU,
libsIU
});
diff --git a/p2/org.eclipse.cdt.p2/src/org/eclipse/cdt/p2/internal/repo/artifact/InstallArtifactRepository.java b/p2/org.eclipse.cdt.p2/src/org/eclipse/cdt/p2/internal/repo/artifact/InstallArtifactRepository.java
index 9c105aa88d..9202a2299e 100644
--- a/p2/org.eclipse.cdt.p2/src/org/eclipse/cdt/p2/internal/repo/artifact/InstallArtifactRepository.java
+++ b/p2/org.eclipse.cdt.p2/src/org/eclipse/cdt/p2/internal/repo/artifact/InstallArtifactRepository.java
@@ -54,7 +54,7 @@ public class InstallArtifactRepository extends AbstractArtifactRepository {
public static final String FILENAME = "installArtifact.xml"; //$NON-NLS-1$
public static final String COMPRESSION = "compression";
- public static final String GZIP_COMPRESSON = "tar.gz";
+ public static final String GZIP_COMPRESSION = "tar.gz";
public static final String BZIP2_COMPRESSION = "tar.bz2";
public static final String ZIP_COMPRESSION = "zip";
diff --git a/p2/org.eclipse.cdt.p2/src/org/eclipse/cdt/p2/internal/repo/artifact/TarExtractor.java b/p2/org.eclipse.cdt.p2/src/org/eclipse/cdt/p2/internal/repo/artifact/TarExtractor.java
index be70385deb..43b3fb0ca3 100644
--- a/p2/org.eclipse.cdt.p2/src/org/eclipse/cdt/p2/internal/repo/artifact/TarExtractor.java
+++ b/p2/org.eclipse.cdt.p2/src/org/eclipse/cdt/p2/internal/repo/artifact/TarExtractor.java
@@ -43,7 +43,7 @@ public class TarExtractor extends Thread {
public void run() {
try {
InputStream compIn;
- if (InstallArtifactRepository.GZIP_COMPRESSON.equals(compression))
+ if (InstallArtifactRepository.GZIP_COMPRESSION.equals(compression))
compIn = new GZIPInputStream(in);
else if (InstallArtifactRepository.BZIP2_COMPRESSION.equals(compression)) {
// Skip the magic bytes first
diff --git a/p2/org.eclipse.cdt.p2/src/org/eclipse/cdt/p2/internal/repo/artifact/ZipExtractor.java b/p2/org.eclipse.cdt.p2/src/org/eclipse/cdt/p2/internal/repo/artifact/ZipExtractor.java
index ef7d046343..793c2325c4 100644
--- a/p2/org.eclipse.cdt.p2/src/org/eclipse/cdt/p2/internal/repo/artifact/ZipExtractor.java
+++ b/p2/org.eclipse.cdt.p2/src/org/eclipse/cdt/p2/internal/repo/artifact/ZipExtractor.java
@@ -41,6 +41,8 @@ public class ZipExtractor extends Thread {
}
zipIn.closeEntry();
}
+ // Keep reading until there's none left
+ while (in.read() != -1);
zipIn.close();
fileListWriter.close();
} catch (IOException e) {

Back to the top