From 2afa4d373b2abaca07839a2cacbb5f51271af54e Mon Sep 17 00:00:00 2001 From: Hannes Wellmann Date: Wed, 15 May 2024 22:41:24 +0200 Subject: [PATCH] [PDE-Build] Copy Eclipse-BundleShape and other headers in wrapped states For wrapped OSGi States obtained from pde.core/ui the Manifest 'Eclipse-BundleShape' entries, besides others, were not copied into the bundle's user-object Properties. This had the consequence that in ShapeAdvisor.getUnpackClause() the value of that entry could never be considered. The method only used to return the expected boolean value because of corresponding unpack-attributes in 'plugin' entries of feature.xml files. But since the removal of that otherwise unused attribute in [1] this makeshift was gone and ShapeAdvisor.getUnpackClause() always return false leading to all bundles in an exported product being in jar-shape, even if the 'Eclipse-BundleShape' entry in the MANIFEST.MF told something different. Fixes https://github.com/eclipse-pde/eclipse.pde/issues/995 [1] - https://github.com/eclipse-pde/eclipse.pde/pull/770 --- .../src/org/eclipse/pde/internal/build/site/PDEState.java | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/build/org.eclipse.pde.build/src/org/eclipse/pde/internal/build/site/PDEState.java b/build/org.eclipse.pde.build/src/org/eclipse/pde/internal/build/site/PDEState.java index bf02516ac5..082ba54a92 100644 --- a/build/org.eclipse.pde.build/src/org/eclipse/pde/internal/build/site/PDEState.java +++ b/build/org.eclipse.pde.build/src/org/eclipse/pde/internal/build/site/PDEState.java @@ -104,6 +104,10 @@ public PDEState(PDEUIStateWrapper initialState) { addedBundle = new ArrayList<>(); unqualifiedBundles = new ArrayList<>(); //forceQualifiers(); + for (BundleDescription bundle : state.getBundles()) { + Dictionary manifest = loadManifest(new File(bundle.getLocation())); + rememberManifestEntries(bundle, manifest, MANIFEST_ENTRIES); + } } public PDEState() {