[Releng] Fix expected duplicate reporting/analysis.
diff --git a/features/org.eclipse.oomph.p2-feature/feature.xml b/features/org.eclipse.oomph.p2-feature/feature.xml
index 7335428..4db6971 100644
--- a/features/org.eclipse.oomph.p2-feature/feature.xml
+++ b/features/org.eclipse.oomph.p2-feature/feature.xml
@@ -12,7 +12,7 @@
<feature
id="org.eclipse.oomph.p2"
label="%featureName"
- version="1.24.0.qualifier"
+ version="1.25.0.qualifier"
provider-name="%providerName"
license-feature="org.eclipse.oomph.license"
license-feature-version="0.0.0">
diff --git a/features/org.eclipse.oomph.p2-feature/pom.xml b/features/org.eclipse.oomph.p2-feature/pom.xml
index 19125fa..dc5af4a 100644
--- a/features/org.eclipse.oomph.p2-feature/pom.xml
+++ b/features/org.eclipse.oomph.p2-feature/pom.xml
@@ -20,6 +20,6 @@
</parent>
<groupId>org.eclipse.oomph.features</groupId>
<artifactId>org.eclipse.oomph.p2</artifactId>
- <version>1.24.0-SNAPSHOT</version>
+ <version>1.25.0-SNAPSHOT</version>
<packaging>eclipse-feature</packaging>
</project>
diff --git a/plugins/org.eclipse.oomph.p2.core/META-INF/MANIFEST.MF b/plugins/org.eclipse.oomph.p2.core/META-INF/MANIFEST.MF
index 55cc5a0..cfab55f 100644
--- a/plugins/org.eclipse.oomph.p2.core/META-INF/MANIFEST.MF
+++ b/plugins/org.eclipse.oomph.p2.core/META-INF/MANIFEST.MF
@@ -2,14 +2,14 @@
Bundle-ManifestVersion: 2
Bundle-Name: %pluginName
Bundle-SymbolicName: org.eclipse.oomph.p2.core;singleton:=true
-Bundle-Version: 1.23.0.qualifier
+Bundle-Version: 1.24.0.qualifier
Bundle-ClassPath: .
Bundle-Activator: org.eclipse.oomph.p2.internal.core.P2CorePlugin$Implementation
Bundle-Vendor: %providerName
Bundle-Localization: plugin
Bundle-RequiredExecutionEnvironment: JavaSE-11
-Export-Package: org.eclipse.oomph.p2.core;version="1.23.0";x-internal:=true,
- org.eclipse.oomph.p2.internal.core;version="1.23.0";x-internal:=true
+Export-Package: org.eclipse.oomph.p2.core;version="1.24.0";x-internal:=true,
+ org.eclipse.oomph.p2.internal.core;version="1.24.0";x-internal:=true
Require-Bundle: org.eclipse.core.runtime;bundle-version="[3.24.0,4.0.0)",
org.eclipse.core.variables;bundle-version="[3.0.0,4.0.0)";resolution:=optional,
org.eclipse.emf.ecore.xmi;bundle-version="[2.10.0,3.0.0)",
diff --git a/plugins/org.eclipse.oomph.p2.core/pom.xml b/plugins/org.eclipse.oomph.p2.core/pom.xml
index 272a461..a698ed1 100644
--- a/plugins/org.eclipse.oomph.p2.core/pom.xml
+++ b/plugins/org.eclipse.oomph.p2.core/pom.xml
@@ -20,7 +20,7 @@
</parent>
<groupId>org.eclipse.oomph</groupId>
<artifactId>org.eclipse.oomph.p2.core</artifactId>
- <version>1.23.0-SNAPSHOT</version>
+ <version>1.24.0-SNAPSHOT</version>
<packaging>eclipse-plugin</packaging>
<build>
diff --git a/plugins/org.eclipse.oomph.p2.core/src/org/eclipse/oomph/p2/internal/core/RepositoryIntegrityAnalyzer.java b/plugins/org.eclipse.oomph.p2.core/src/org/eclipse/oomph/p2/internal/core/RepositoryIntegrityAnalyzer.java
index dd6109d..25eaa9b 100644
--- a/plugins/org.eclipse.oomph.p2.core/src/org/eclipse/oomph/p2/internal/core/RepositoryIntegrityAnalyzer.java
+++ b/plugins/org.eclipse.oomph.p2.core/src/org/eclipse/oomph/p2/internal/core/RepositoryIntegrityAnalyzer.java
@@ -31,6 +31,7 @@
import org.eclipse.emf.common.CommonPlugin;
import org.eclipse.emf.common.util.Diagnostic;
import org.eclipse.emf.common.util.URI;
+import org.eclipse.emf.common.util.UniqueEList;
import org.eclipse.emf.ecore.EObject;
import org.eclipse.emf.ecore.resource.Resource;
import org.eclipse.emf.ecore.resource.ResourceSet;
@@ -1294,13 +1295,14 @@
CollectionUtil.addAll(licenseIUs, getLicenses(iu), iu);
Set<String> ids = new HashSet<>();
- for (final IRequirement requirement : iu.getRequirements())
+ for (final IRequirement requirement : new LinkedHashSet<IRequirement>(iu.getRequirements()))
{
if (requirement instanceof IRequiredCapability)
{
IRequiredCapability requiredCapability = (IRequiredCapability)requirement;
String namespace = requiredCapability.getNamespace();
- if (IInstallableUnit.NAMESPACE_IU_ID.equals(namespace))
+ VersionRange range = requiredCapability.getRange();
+ if (IInstallableUnit.NAMESPACE_IU_ID.equals(namespace) && range.getMaximum().equals(range.getMinimum()))
{
String name = requiredCapability.getName();
if (!ids.add(name))
@@ -1899,6 +1901,10 @@
private Map<List<Certificate>, Map<String, IInstallableUnit>> invalidSignatures = new HashMap<>();
+ private Map<String, Set<IInstallableUnit>> packageProviders = new TreeMap<String, Set<IInstallableUnit>>();
+
+ private Map<String, Set<List<List<Certificate>>>> packageCertificates = new TreeMap<>();
+
@Override
public Map<List<Certificate>, Map<String, IInstallableUnit>> getCertificates()
{
@@ -1916,6 +1922,11 @@
if (!path.startsWith("binary/") && !path.endsWith(".pack.gz"))
{
SignedContent signedContent = fileSignedContents.get(file);
+
+ List<String> packages = iu.getProvidedCapabilities().stream().filter(it -> "java.package".equals(it.getNamespace())).map(it -> it.getName())
+ .collect(Collectors.toList());
+ List<List<Certificate>> allCertificates = new UniqueEList<>();
+
if (signedContent != null && signedContent.isSigned())
{
SignerInfo[] signerInfos = signedContent.getSignerInfos();
@@ -1923,6 +1934,7 @@
{
Certificate[] certificateChain = signerInfo.getCertificateChain();
List<Certificate> certificateList = Arrays.asList(certificateChain);
+ allCertificates.add(certificateList);
Map<String, IInstallableUnit> artifacts = certificates.get(certificateList);
if (artifacts == null)
{
@@ -1966,6 +1978,7 @@
}
else if (getPGPKeys(file).isEmpty())
{
+ allCertificates.add(Collections.emptyList());
Map<String, IInstallableUnit> artifacts = certificates.get(Collections.emptyList());
if (artifacts == null)
{
@@ -1975,6 +1988,50 @@
artifacts.put(path, iu);
}
+
+ for (String javaPackage : packages)
+ {
+ packageCertificates.computeIfAbsent(javaPackage, it -> new LinkedHashSet<>()).add(allCertificates);
+ packageProviders.computeIfAbsent(javaPackage, it -> new TreeSet<>()).add(iu);
+ }
+ }
+ }
+ }
+
+ if (Boolean.FALSE)
+ {
+ int count = 0;
+ for (Map.Entry<String, Set<List<List<Certificate>>>> entry : packageCertificates.entrySet())
+ {
+ Set<List<List<Certificate>>> value = entry.getValue();
+ if (value.size() > 1)
+ {
+ Set<IInstallableUnit> set = packageProviders.get(entry.getKey());
+ String prefix = ++count + ". ";
+ System.err.println(prefix + "**" + entry.getKey() + "**");
+ prefix = prefix.replaceAll(".", " ");
+ System.err.println(prefix + "- _" + set + "_");
+ for (List<List<Certificate>> certficateChains : value)
+ {
+ if (certficateChains.isEmpty())
+ {
+ System.err.println(prefix + "- unsigned");
+ }
+ else
+ {
+ for (List<Certificate> certficateChain : certficateChains)
+ {
+ if (certficateChain.isEmpty())
+ {
+ System.err.println(prefix + "- unsigned");
+ }
+ else
+ {
+ System.err.println(prefix + "- " + getCertificateComponents(certficateChain.get(0)));
+ }
+ }
+ }
+ }
}
}
}
diff --git a/plugins/org.eclipse.oomph.setup.core/META-INF/MANIFEST.MF b/plugins/org.eclipse.oomph.setup.core/META-INF/MANIFEST.MF
index e91107a..2f14775 100644
--- a/plugins/org.eclipse.oomph.setup.core/META-INF/MANIFEST.MF
+++ b/plugins/org.eclipse.oomph.setup.core/META-INF/MANIFEST.MF
@@ -32,7 +32,7 @@
org.eclipse.equinox.p2.updatesite;bundle-version="[1.0.0,2.0.0)",
org.eclipse.equinox.security;bundle-version="[1.0.0,2.0.0)",
org.eclipse.oomph.base.edit;bundle-version="[1.15.0,2.0.0)",
- org.eclipse.oomph.p2.core;bundle-version="[1.23.0,2.0.0)",
+ org.eclipse.oomph.p2.core;bundle-version="[1.24.0,2.0.0)",
org.eclipse.oomph.setup;bundle-version="[1.25.0,2.0.0)";visibility:=reexport,
org.eclipse.oomph.setup.p2;bundle-version="[1.19.0,2.0.0)",
org.eclipse.oomph.preferences;bundle-version="[1.13.0,2.0.0)",
diff --git a/plugins/org.eclipse.oomph.setup.core/src/org/eclipse/oomph/setup/internal/core/util/ECFURIHandlerImpl.java b/plugins/org.eclipse.oomph.setup.core/src/org/eclipse/oomph/setup/internal/core/util/ECFURIHandlerImpl.java
index ae94a38..7d7f459 100644
--- a/plugins/org.eclipse.oomph.setup.core/src/org/eclipse/oomph/setup/internal/core/util/ECFURIHandlerImpl.java
+++ b/plugins/org.eclipse.oomph.setup.core/src/org/eclipse/oomph/setup/internal/core/util/ECFURIHandlerImpl.java
@@ -1118,7 +1118,6 @@
}
@Override
- @SuppressWarnings("restriction")
public boolean remove(java.net.URI uri, HttpCookie httpCookie)
{
org.apache.hc.client5.http.impl.cookie.BasicClientCookie basicClientCookie = createCookie(uri, httpCookie);
@@ -1149,7 +1148,6 @@
return delegate.removeAll();
}
- @SuppressWarnings("restriction")
private org.apache.hc.client5.http.impl.cookie.BasicClientCookie createCookie(java.net.URI uri, HttpCookie httpCookie)
{
org.apache.hc.client5.http.impl.cookie.BasicClientCookie basicClientCookie = new org.apache.hc.client5.http.impl.cookie.BasicClientCookie(
diff --git a/plugins/org.eclipse.oomph.setup.ui/META-INF/MANIFEST.MF b/plugins/org.eclipse.oomph.setup.ui/META-INF/MANIFEST.MF
index e000330..7dd2b57 100644
--- a/plugins/org.eclipse.oomph.setup.ui/META-INF/MANIFEST.MF
+++ b/plugins/org.eclipse.oomph.setup.ui/META-INF/MANIFEST.MF
@@ -32,7 +32,7 @@
org.eclipse.oomph.setup.sync;bundle-version="[1.14.0,2.0.0)",
org.eclipse.oomph.ui;bundle-version="[1.18.0,2.0.0)",
org.eclipse.oomph.p2.edit;bundle-version="[1.16.0,2.0.0)";visibility:=reexport,
- org.eclipse.oomph.p2.core;bundle-version="[1.23.0,2.0.0)",
+ org.eclipse.oomph.p2.core;bundle-version="[1.24.0,2.0.0)",
org.eclipse.oomph.p2.ui;bundle-version="[1.18.0,2.0.0)",
org.eclipse.oomph.jreinfo.ui;bundle-version="[1.15.0,2.0.0)",
org.eclipse.oomph.preferences;bundle-version="[1.13.0,2.0.0)"