Skip to main content
summaryrefslogtreecommitdiffstats
path: root/p2
diff options
context:
space:
mode:
authorDoug Schaefer2009-04-24 02:37:43 -0400
committerDoug Schaefer2009-04-24 02:37:43 -0400
commit3cf528d8410e7cb9530347a2c0a9e695f52fee32 (patch)
treee99523c5ce4d543557c7b1f6dadb15766f9e52ef /p2
parent3b02a1a7f87ea1c1d1ba6cc9f52cc172bf6f3ba8 (diff)
downloadorg.eclipse.cdt-3cf528d8410e7cb9530347a2c0a9e695f52fee32.tar.gz
org.eclipse.cdt-3cf528d8410e7cb9530347a2c0a9e695f52fee32.tar.xz
org.eclipse.cdt-3cf528d8410e7cb9530347a2c0a9e695f52fee32.zip
Now I got it working...
Diffstat (limited to 'p2')
-rw-r--r--p2/org.eclipse.cdt.p2.generator/src/org/eclipse/cdt/p2/generator/MinGWGenerator.java8
-rw-r--r--p2/org.eclipse.cdt.p2/plugin.xml4
-rw-r--r--p2/org.eclipse.cdt.p2/src/org/eclipse/cdt/internal/p2/touchpoint/natives/actions/UntarAction.java9
3 files changed, 13 insertions, 8 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 ab90fca62b..6ff8fa56e7 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
@@ -61,11 +61,13 @@ public class MinGWGenerator implements IApplication {
Activator.getDefault().getBundle("org.eclipse.equinox.p2.exemplarysetup").start(Bundle.START_TRANSIENT); //$NON-NLS-1$
- File repoDir = new File("C:\\Wascana\\repo");
+ File repoDir = new File("E:\\Wascana\\repo");
+ repoDir.mkdirs();
+
new File(repoDir, "artifacts.xml").delete();
new File(repoDir, "content.xml").delete();
- URI repoLocation = new File("C:\\Wascana\\repo").toURI();
+ URI repoLocation = repoDir.toURI();
IMetadataRepositoryManager metaRepoMgr = Activator.getDefault().getService(IMetadataRepositoryManager.class);
IArtifactRepositoryManager artiRepoMgr = Activator.getDefault().getService(IArtifactRepositoryManager.class);
@@ -269,7 +271,7 @@ public class MinGWGenerator implements IApplication {
}
tpdata.put("install", cmd);
- tpdata.put("install", "cleanup" + cmd);
+ tpdata.put("uninstall", "cleanup" + cmd);
iuDesc.addTouchpointData(MetadataFactory.createTouchpointData(tpdata));
IArtifactKey artiKey = PublisherHelper.createBinaryArtifactKey(id, version);
diff --git a/p2/org.eclipse.cdt.p2/plugin.xml b/p2/org.eclipse.cdt.p2/plugin.xml
index 6ac0bc1c8c..9c25e5449b 100644
--- a/p2/org.eclipse.cdt.p2/plugin.xml
+++ b/p2/org.eclipse.cdt.p2/plugin.xml
@@ -5,7 +5,7 @@
point="org.eclipse.equinox.p2.engine.actions">
<action
class="org.eclipse.cdt.internal.p2.touchpoint.natives.actions.UntarAction"
- name="untar"
+ name="org.eclipse.equinox.p2.touchpoint.natives.untar"
touchpointType="org.eclipse.equinox.p2.native"
touchpointVersion="1.0.0"
version="1.0.0">
@@ -15,7 +15,7 @@
point="org.eclipse.equinox.p2.engine.actions">
<action
class="org.eclipse.cdt.internal.p2.touchpoint.natives.actions.CleanupUntarAction"
- name="cleanupuntar"
+ name="org.eclipse.equinox.p2.touchpoint.natives.cleanupuntar"
touchpointType="org.eclipse.equinox.p2.native"
touchpointVersion="1.0.0"
version="1.0.0">
diff --git a/p2/org.eclipse.cdt.p2/src/org/eclipse/cdt/internal/p2/touchpoint/natives/actions/UntarAction.java b/p2/org.eclipse.cdt.p2/src/org/eclipse/cdt/internal/p2/touchpoint/natives/actions/UntarAction.java
index 4a8b5fa588..546b3f47c5 100644
--- a/p2/org.eclipse.cdt.p2/src/org/eclipse/cdt/internal/p2/touchpoint/natives/actions/UntarAction.java
+++ b/p2/org.eclipse.cdt.p2/src/org/eclipse/cdt/internal/p2/touchpoint/natives/actions/UntarAction.java
@@ -112,10 +112,12 @@ public class UntarAction extends ProvisioningAction {
private static File[] untar(String source, String destination, Compression compression) {
File zipFile = new File(source);
- if (zipFile == null || !zipFile.exists()) {
+ if (!zipFile.exists()) {
Util.log(UnzipAction.class.getName() + " the files to be unzipped is not here"); //$NON-NLS-1$
}
+ File target = new File(destination);
+
try {
FileInputStream fileIn = new FileInputStream(zipFile);
InputStream compIn = fileIn;
@@ -130,7 +132,7 @@ public class UntarAction extends ProvisioningAction {
ArrayList<File> fileList = new ArrayList<File>();
TarInputStream tarIn = new TarInputStream(compIn);
for (TarEntry tarEntry = tarIn.getNextEntry(); tarEntry != null; tarEntry = tarIn.getNextEntry()) {
- File outFile = new File(source, tarEntry.getName());
+ File outFile = new File(target, tarEntry.getName());
if (tarEntry.isDirectory()) {
outFile.mkdirs();
} else {
@@ -149,7 +151,8 @@ public class UntarAction extends ProvisioningAction {
tarIn.close();
return fileList.toArray(new File[fileList.size()]);
} catch (IOException e) {
- Util.log(UnzipAction.class.getName() + " error unzipping zipfile: " + zipFile.getAbsolutePath() + "destination: " + destination); //$NON-NLS-1$ //$NON-NLS-2$
+ Util.log(UnzipAction.class.getName() + " error unzipping zipfile: " + zipFile.getAbsolutePath() + " destination: " + destination); //$NON-NLS-1$ //$NON-NLS-2$
+ Util.log(e.getLocalizedMessage());
}
return null;
}

Back to the top