Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[PDE-Build] Copy Eclipse-BundleShape and other headers in wrapped states #1271

Merged

Conversation

HannesWell
Copy link
Member

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.

String shape = properties.getProperty(ECLIPSE_BUNDLE_SHAPE);
if (shape != null) {
return shape.equalsIgnoreCase("dir"); //$NON-NLS-1$
}

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 #770 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 #995

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 eclipse-pde#995

[1] - eclipse-pde#770
Copy link

Test Results

  206 files   -    85    206 suites   - 85   37m 58s ⏱️ - 20m 35s
3 526 tests ±    0  3 468 ✅ ±    0   58 💤 ± 0  0 ❌ ±0 
7 298 runs   - 3 577  7 180 ✅  - 3 518  118 💤  - 59  0 ❌ ±0 

Results for commit ac2891c. ± Comparison against base commit c2d4b0c.

@HannesWell
Copy link
Member Author

API-tools failures in Windows GH workflows seem unrelated.

@HannesWell HannesWell merged commit 2afa4d3 into eclipse-pde:master May 15, 2024
15 of 17 checks passed
@HannesWell HannesWell deleted the copy-shape-header-for-wrapped-states branch May 15, 2024 21:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Workspace Product Export does not respect 'Eclipse-BundleShape: dir' Manifest-Header anymore
1 participant