-
Notifications
You must be signed in to change notification settings - Fork 41
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
Conversation
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", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This looks strange
There was a problem hiding this 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. |
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
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"); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Indentation looks wrong here
There was a problem hiding this comment.
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.
This returns shared bundle pools as used by the Eclipse Installer.
#373