From b281b11e5526f46c6890975d07e8ca7d8ee9f35e Mon Sep 17 00:00:00 2001 From: Pascal Rapicault Date: Fri, 24 Apr 2015 10:29:54 -0400 Subject: Revert "Bug 462282 - Prevent (automatic) update to new Mac layout" This reverts commit c2595d75a8a591bcae06c4e5efb6aa30dde3952d. --- .../META-INF/MANIFEST.MF | 2 +- .../org.eclipse.equinox.p2.core/META-INF/p2.inf | 7 -- .../META-INF/MANIFEST.MF | 4 +- .../META-INF/p2.inf | 8 --- .../plugin.xml | 11 --- .../internal/p2/touchpoint/natives/Messages.java | 2 - .../touchpoint/natives/actions/BlockMacUpdate.java | 78 ---------------------- .../p2/touchpoint/natives/messages.properties | 2 - 8 files changed, 2 insertions(+), 112 deletions(-) delete mode 100644 bundles/org.eclipse.equinox.p2.core/META-INF/p2.inf delete mode 100644 bundles/org.eclipse.equinox.p2.touchpoint.natives/META-INF/p2.inf delete mode 100644 bundles/org.eclipse.equinox.p2.touchpoint.natives/src/org/eclipse/equinox/internal/p2/touchpoint/natives/actions/BlockMacUpdate.java diff --git a/bundles/org.eclipse.equinox.p2.core/META-INF/MANIFEST.MF b/bundles/org.eclipse.equinox.p2.core/META-INF/MANIFEST.MF index 3fd4ab2d8..394b34494 100644 --- a/bundles/org.eclipse.equinox.p2.core/META-INF/MANIFEST.MF +++ b/bundles/org.eclipse.equinox.p2.core/META-INF/MANIFEST.MF @@ -64,7 +64,7 @@ Export-Package: org.eclipse.equinox.internal.p2.core;x-friends:="org.eclipse.equ org.eclipse.equinox.p2.updatesite, org.eclipse.equinox.p2.director.app, org.eclipse.equinox.p2.transport.ecf", - org.eclipse.equinox.p2.core;version="2.1.0", + org.eclipse.equinox.p2.core;version="2.0.0", org.eclipse.equinox.p2.core.spi;version="2.1.0" Require-Bundle: org.eclipse.equinox.common;bundle-version="[3.5.0,4.0.0)" Bundle-RequiredExecutionEnvironment: J2SE-1.5 diff --git a/bundles/org.eclipse.equinox.p2.core/META-INF/p2.inf b/bundles/org.eclipse.equinox.p2.core/META-INF/p2.inf deleted file mode 100644 index 5ea2c4acd..000000000 --- a/bundles/org.eclipse.equinox.p2.core/META-INF/p2.inf +++ /dev/null @@ -1,7 +0,0 @@ -provides.1.namespace=org.eclipse.equinox.p2.iu -provides.1.name=org.eclipse.equinox.p2.core -provides.1.version=2.3.0.v20131211-1531 - -provides.0.namespace=org.eclipse.equinox.p2.iu -provides.0.name=org.eclipse.equinox.p2.core -provides.0.version=2.4.0.$qualifier$ diff --git a/bundles/org.eclipse.equinox.p2.touchpoint.natives/META-INF/MANIFEST.MF b/bundles/org.eclipse.equinox.p2.touchpoint.natives/META-INF/MANIFEST.MF index 898e2bf1d..3ecd5aacf 100644 --- a/bundles/org.eclipse.equinox.p2.touchpoint.natives/META-INF/MANIFEST.MF +++ b/bundles/org.eclipse.equinox.p2.touchpoint.natives/META-INF/MANIFEST.MF @@ -22,7 +22,5 @@ Import-Package: org.eclipse.equinox.internal.p2.core.helpers, org.eclipse.equinox.p2.query;version="2.0.0";resolution:=optional, org.eclipse.equinox.p2.repository;version="[2.0.0,3.0.0)", org.eclipse.equinox.p2.repository.artifact;version="[2.0.0,3.0.0)", - org.eclipse.osgi.service.environment;version="1.3.0", org.eclipse.osgi.util;version="1.0.0", - org.osgi.framework;version="1.3.0", - org.osgi.service.packageadmin;version="1.2.0" + org.osgi.framework;version="1.3.0" diff --git a/bundles/org.eclipse.equinox.p2.touchpoint.natives/META-INF/p2.inf b/bundles/org.eclipse.equinox.p2.touchpoint.natives/META-INF/p2.inf deleted file mode 100644 index c7908b7a1..000000000 --- a/bundles/org.eclipse.equinox.p2.touchpoint.natives/META-INF/p2.inf +++ /dev/null @@ -1,8 +0,0 @@ -provides.0.namespace=org.eclipse.equinox.p2.iu -provides.0.name=org.eclipse.equinox.p2.touchpoint.natives -provides.0.version=1.1.100.v20140523-0116 - -provides.1.namespace=org.eclipse.equinox.p2.iu -provides.1.name=org.eclipse.equinox.p2.touchpoint.natives -provides.1.version=1.2.0.$qualifier$ - diff --git a/bundles/org.eclipse.equinox.p2.touchpoint.natives/plugin.xml b/bundles/org.eclipse.equinox.p2.touchpoint.natives/plugin.xml index 26f6da746..067b2d715 100644 --- a/bundles/org.eclipse.equinox.p2.touchpoint.natives/plugin.xml +++ b/bundles/org.eclipse.equinox.p2.touchpoint.natives/plugin.xml @@ -131,17 +131,6 @@ touchpointVersion="1.0.0" version="1.0.0"> - - - - parameters) { - if (!runningOldMacLayout()) - return Status.OK_STATUS; - return new Status(IStatus.ERROR, Activator.ID, Messages.BlockMacUpdate_1); - } - - private boolean runningOldMacLayout() { - if (!org.eclipse.osgi.service.environment.Constants.OS_MACOSX.equals(getOS())) - return false; - Version fwkAdminVersion = getFrameworkAdminVersion(); - if (fwkAdminVersion == null) - return false; - if (fwkAdminVersion.compareTo(new Version("1.0.500.v201523")) < 0) //$NON-NLS-1$ - return true; - return false; - } - - private Version getFrameworkAdminVersion() { - ServiceReference sr = Activator.getContext().getServiceReference(PackageAdmin.class); - if (sr == null) - return null; - PackageAdmin packageAdmin = Activator.getContext().getService(sr); - if (packageAdmin == null) - return null; - Activator.getContext().ungetService(sr); - Bundle[] bundles = packageAdmin.getBundles("org.eclipse.equinox.frameworkadmin.equinox", null); //$NON-NLS-1$ - if (bundles == null) - return null; - //Return the first bundle that is not installed or uninstalled - for (int i = 0; i < bundles.length; i++) { - if ((bundles[i].getState() & (Bundle.INSTALLED | Bundle.UNINSTALLED)) == 0) { - return bundles[i].getVersion(); - } - } - return null; - } - - private String getOS() { - ServiceReference sr = Activator.getContext().getServiceReference(EnvironmentInfo.class); - if (sr == null) - return null; - String value = Activator.getContext().getService(sr).getOS(); - Activator.getContext().ungetService(sr); - return value; - } - - @Override - public IStatus undo(Map parameters) { - // TODO Auto-generated method stub - return null; - } - -} diff --git a/bundles/org.eclipse.equinox.p2.touchpoint.natives/src/org/eclipse/equinox/internal/p2/touchpoint/natives/messages.properties b/bundles/org.eclipse.equinox.p2.touchpoint.natives/src/org/eclipse/equinox/internal/p2/touchpoint/natives/messages.properties index 304d40114..2df1df727 100644 --- a/bundles/org.eclipse.equinox.p2.touchpoint.natives/src/org/eclipse/equinox/internal/p2/touchpoint/natives/messages.properties +++ b/bundles/org.eclipse.equinox.p2.touchpoint.natives/src/org/eclipse/equinox/internal/p2/touchpoint/natives/messages.properties @@ -29,8 +29,6 @@ BackupStore_manual_restore_needed=Manual restore of backup needed for: {0} BackupStore_missing_backup_directory=Missing backup directory - can not restore: {0} BackupStore_not_a_directory=File is not a directory: {0} BackupStore_restore_closed_store=Can not perform restore on closed backup store -BlockMacUpdate_0=Installation impossible -BlockMacUpdate_1=The installation/update you are trying to perform can not completed because of structural changes to Eclipse. The installation/update will fail and will leave your existing eclipse installation intact. You need to retrieve a new version of Eclipse from http://download.eclipse.org/. action_0_failed_file_1_doesNotExist=The action {0} failed - file {1} does not exist artifact_not_available=The artifact for {0} is not available. -- cgit v1.2.3