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

Provide RepositoryHelper.getSharedBundlePools() #377

Merged
merged 1 commit into from
Nov 5, 2023

Conversation

merks
Copy link
Contributor

@merks merks commented Nov 5, 2023

This returns shared bundle pools as used by the Eclipse Installer.

#373

This returns shared bundle pools as used by the Eclipse Installer.

eclipse-equinox#373
@@ -31,7 +31,8 @@ Export-Package: org.eclipse.equinox.internal.p2.persistence;
org.eclipse.equinox.p2.publisher,
org.eclipse.equinox.p2.repository.tools,
org.eclipse.equinox.p2.ui,
org.eclipse.equinox.p2.updatesite",
org.eclipse.equinox.p2.updatesite,
org.eclipse.pde.core",
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks strange

Copy link
Member

@HannesWell HannesWell left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me.

I wonder are there already classes/packages in P2 dedicated to bundle-pooling? Or is a bundle pool for p2 simply a local repository?
The p2 wiki is not clear about this: https://wiki.eclipse.org/Equinox/p2/Getting_Started#Bundle_pooling

*
* @return an unmodifiable list of global shared bundle pools.
*
* @throws IOException if there are problems loading the pool information.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

On the long term I think we might simply return an empty list in such case?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, I wondered too about guarding all exceptions within the method....

*/
@SuppressWarnings("nls")
public static List<Path> getSharedBundlePools() throws IOException {
Path bundlePools = Path.of(System.getProperty("user.home"), ".p2/pools.info");
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Indentation looks wrong here

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Feel free to improve things. This often happens because only touched lines are formatted, and I removed the if guard. Sorry about that.

Copy link

github-actions bot commented Nov 5, 2023

Test Results

       9 files  ±0         9 suites  ±0   34m 57s ⏱️ - 3m 29s
2 181 tests ±0  2 177 ✔️ ±0    4 💤 ±0  0 ±0 
6 633 runs  ±0  6 622 ✔️ ±0  11 💤 ±0  0 ±0 

Results for commit 5ce3eea. ± Comparison against base commit df5d137.

@merks merks merged commit 3734726 into eclipse-equinox:master Nov 5, 2023
9 checks passed
@merks merks deleted the issue-373 branch November 5, 2023 09:54
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.

3 participants