From 98ceaf34896bc9f372fca92fa448cd2be8364ca5 Mon Sep 17 00:00:00 2001 From: Hannes Wellmann Date: Fri, 22 Mar 2024 19:15:14 +0100 Subject: [PATCH] Exclude upper-bound in version ranges when adding Package-imports This was done wrong in https://github.com/eclipse-pde/eclipse.pde/pull/1007 And fix wrong version ranges in PDE introduced by that bug. --- .../test-manifests/META-INF/MANIFEST.MF | 4 +-- .../META-INF/MANIFEST.MF | 28 +++++++++---------- ui/org.eclipse.pde.core/META-INF/MANIFEST.MF | 6 ++-- .../core/text/bundle/ImportPackageObject.java | 2 +- 4 files changed, 20 insertions(+), 20 deletions(-) diff --git a/apitools/org.eclipse.pde.api.tools.tests/test-manifests/META-INF/MANIFEST.MF b/apitools/org.eclipse.pde.api.tools.tests/test-manifests/META-INF/MANIFEST.MF index 2f6830750c9..b9650c0efe0 100644 --- a/apitools/org.eclipse.pde.api.tools.tests/test-manifests/META-INF/MANIFEST.MF +++ b/apitools/org.eclipse.pde.api.tools.tests/test-manifests/META-INF/MANIFEST.MF @@ -3,8 +3,8 @@ Bundle-Name: Debug Platform UI Bundle-SymbolicName: org.eclipse.debug.ui Bundle-Version: 3.3.100.qualifier Require-Bundle: org.eclipse.core.expressions;bundle-version="(3.3.0,4.0.0)", - org.eclipse.core.variables;bundle-version="[3.2.0,4.0.0]", - org.eclipse.ui;bundle-version="[3.3.0,4.0.0]", + org.eclipse.core.variables;bundle-version="[3.2.0,4.0.0)", + org.eclipse.ui;bundle-version="[3.3.0,4.0.0)", org.eclipse.ui.console;bundle-version="[3.2.0,4.0.0)", org.eclipse.help;bundle-version="3.3.0", org.eclipse.debug.core;bundle-version="3.4.0";visibility:=reexport, diff --git a/ui/org.eclipse.pde.bnd.ui/META-INF/MANIFEST.MF b/ui/org.eclipse.pde.bnd.ui/META-INF/MANIFEST.MF index cb92e4f9352..587dddd2949 100644 --- a/ui/org.eclipse.pde.bnd.ui/META-INF/MANIFEST.MF +++ b/ui/org.eclipse.pde.bnd.ui/META-INF/MANIFEST.MF @@ -16,30 +16,30 @@ Import-Package: aQute.bnd.build;version="4.5.0", aQute.bnd.exceptions;version="3.0.0", aQute.bnd.header;version="2.6.0", aQute.bnd.http;version="2.0.0", - aQute.bnd.maven;version="[3.4.0,4.0.0]", - aQute.bnd.memoize;version="[2.0.0,3.0.0]", + aQute.bnd.maven;version="[3.4.0,4.0.0)", + aQute.bnd.memoize;version="[2.0.0,3.0.0)", aQute.bnd.osgi;version="[7.0.0,8.0.0)", - aQute.bnd.osgi.repository;version="[3.1.0,4.0.0]", + aQute.bnd.osgi.repository;version="[3.1.0,4.0.0)", aQute.bnd.osgi.resource;version="[5.0.0,6)", aQute.bnd.repository.osgi;version="[1.1.1,2)", aQute.bnd.result;version="2.0.0", aQute.bnd.service;version="4.8.0", - aQute.bnd.service.clipboard;version="[1.0.0,2.0.0]", - aQute.bnd.service.progress;version="[1.3.0,2.0.0]", - aQute.bnd.service.repository;version="[1.6.0,2.0.0]", - aQute.bnd.version;version="[2.3.0,3.0.0]", + aQute.bnd.service.clipboard;version="[1.0.0,2.0.0)", + aQute.bnd.service.progress;version="[1.3.0,2.0.0)", + aQute.bnd.service.repository;version="[1.6.0,2.0.0)", + aQute.bnd.version;version="[2.3.0,3.0.0)", aQute.service.reporter;version="[1.2.0,2.0.0)", jakarta.xml.bind;version="[4.0.0,5.0.0)", jakarta.xml.bind.annotation;version="[4.0.0,5.0.0)", - org.bndtools.api;version="[3.1.0,4.0.0]", - org.bndtools.headless.build.manager.api;version="[1.1.0,2.0.0]", + org.bndtools.api;version="[3.1.0,4.0.0)", + org.bndtools.headless.build.manager.api;version="[1.1.0,2.0.0)", org.bndtools.templating;version="[2.0.0,3.0.0)", org.bndtools.templating.util;version="[1.0.0,2.0.0)", - org.bndtools.versioncontrol.ignores.manager.api;version="[1.0.0,2.0.0]", - org.osgi.namespace.contract;version="[1.0.0,2.0.0]", - org.osgi.namespace.extender;version="[1.0.0,2.0.0]", - org.osgi.namespace.service;version="[1.0.0,2.0.0]", - org.osgi.service.event;version="[1.4.0,2.0.0]", + org.bndtools.versioncontrol.ignores.manager.api;version="[1.0.0,2.0.0)", + org.osgi.namespace.contract;version="[1.0.0,2.0.0)", + org.osgi.namespace.extender;version="[1.0.0,2.0.0)", + org.osgi.namespace.service;version="[1.0.0,2.0.0)", + org.osgi.service.event;version="[1.4.0,2.0.0)", org.osgi.service.metatype;version="[1.4.1,2)", org.osgi.service.repository;version="[1.1.0,2.0.0)", org.osgi.util.function;version="[1.2.0,2)", diff --git a/ui/org.eclipse.pde.core/META-INF/MANIFEST.MF b/ui/org.eclipse.pde.core/META-INF/MANIFEST.MF index 34b4361af17..135e9142233 100644 --- a/ui/org.eclipse.pde.core/META-INF/MANIFEST.MF +++ b/ui/org.eclipse.pde.core/META-INF/MANIFEST.MF @@ -87,11 +87,11 @@ Import-Package: aQute.bnd.build;version="[4.4.0,5.0.0)", aQute.bnd.osgi.resource;version="[4.3.0,6.0.0)", aQute.bnd.properties;version="[2.0.0,3.0.0)", aQute.bnd.service;version="[4.7.0,5.0.0)", - aQute.bnd.service.clipboard;version="[1.0.0,2.0.0]", - aQute.bnd.service.progress;version="[1.3.0,2.0.0]", + aQute.bnd.service.clipboard;version="[1.0.0,2.0.0)", + aQute.bnd.service.progress;version="[1.3.0,2.0.0)", aQute.bnd.version;version="[2.2.0,3.0.0)", aQute.service.reporter;version="[1.2.0,2.0.0)", - org.bndtools.versioncontrol.ignores.manager.api;version="[1.0.0,2.0.0]", + org.bndtools.versioncontrol.ignores.manager.api;version="[1.0.0,2.0.0)", org.eclipse.equinox.internal.p2.publisher.eclipse, org.eclipse.equinox.p2.publisher, org.eclipse.equinox.p2.publisher.eclipse, diff --git a/ui/org.eclipse.pde.core/text/org/eclipse/pde/internal/core/text/bundle/ImportPackageObject.java b/ui/org.eclipse.pde.core/text/org/eclipse/pde/internal/core/text/bundle/ImportPackageObject.java index 245702e19d5..39ea89689ae 100644 --- a/ui/org.eclipse.pde.core/text/org/eclipse/pde/internal/core/text/bundle/ImportPackageObject.java +++ b/ui/org.eclipse.pde.core/text/org/eclipse/pde/internal/core/text/bundle/ImportPackageObject.java @@ -35,7 +35,7 @@ private static String getVersion(ExportPackageDescription desc) { Version version = desc.getVersion(); if (version != null && !Version.emptyVersion.equals(version)) { return new VersionRange( - "[" + version.getMajor() + "." + version.getMinor() + "," + (version.getMajor() + 1) + "]") //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$//$NON-NLS-4$ + "[" + version.getMajor() + "." + version.getMinor() + "," + (version.getMajor() + 1) + ")") //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$//$NON-NLS-4$ .toString(); } return null;