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 ab90fca62b8..6ff8fa56e71 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 6ac0bc1c8c0..9c25e5449bf 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"> @@ -15,7 +15,7 @@ point="org.eclipse.equinox.p2.engine.actions"> 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 4a8b5fa5884..546b3f47c51 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 fileList = new ArrayList(); 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; }