Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 352128

Summary: Contribution of p2 helper shell scripts
Product: [Eclipse Project] Equinox Reporter: Brian de Alwis <bsd>
Component: p2Assignee: P2 Inbox <equinox.p2-inbox>
Status: RESOLVED WONTFIX QA Contact:
Severity: normal    
Priority: P3 CC: akurtakov, anthony.dahanne, hmalphettes, irbull, krzysztof.daniel, pascal.rapicault, pascal
Version: unspecified   
Target Milestone: ---   
Hardware: All   
OS: All   
Whiteboard: stalebug
Attachments:
Description Flags
Contribution of p2 helper shell scripts none

Description Brian de Alwis CLA 2011-07-14 12:00:01 EDT
Created attachment 199677 [details]
Contribution of p2 helper shell scripts

I'd like to contribute the following set of shell scripts to the p2 project.

All scripts were written by me (Brian de Alwis).  I am an Eclipse committer (bdealwis) on the p2 incubator.  They are licensed under the EPL v1.0.
Comment 1 Pascal Rapicault CLA 2011-07-20 15:11:14 EDT
How do you think we should be distributing those? A separate zip as it is now, added to the eclipse SDK (but where), or a new distro of p2 called p2 tools would include those scripts?
Comment 2 Anthony Dahanne CLA 2011-07-20 15:31:59 EDT
hello,
many users work on MS Windows oses; would it be a good idea to include bat equivalents of those scripts ? is it easily doable (I'm totally not a bat expert) ? would using the p2 ant tasks be a way to provide portable shell scripts ? re using what Brian already did ?

to answer your question Pascal, in my opinion a distro zip containing a base equinox runtime including p2 jars and those scripts would be really easy for people to consume.
Comment 3 Pascal Rapicault CLA 2011-07-20 15:37:15 EDT
From what I have seen in other places, having equivalent scripts for windows should be entirely doable. However I don't have the expertise either.

As for the ant tasks, I think they are targeted at a different audience trying to deal with p2 in the context of an Ant build but it does not seem to be real up to the job for someone scripting works.
Comment 4 Brian de Alwis CLA 2011-07-22 14:21:22 EDT
(In reply to comment #1 from Pascal)
> How do you think we should be distributing those? A separate zip as it is now,
> added to the eclipse SDK (but where), or a new distro of p2 called p2 tools
> would include those scripts?

A fine question!

I think it might make sense to have them distributed as a separate dir-shaped bundle (e.g., org.eclipse.equinox.p2.scripts.sh).  The bundle could then have the appropriate Require-Bundle dependencies on the necessary p2 bundles.

Alternatively they could be shipped as a set of rootfiles and installed relative to the Eclipse distribution.

The scripts currently require an ECLIPSEHOME environment variable to specify the p2 distribution; this code can disappear providing we ship the scripts within the distribution.

(In reply to comment #2 from Anthony)
> many users work on MS Windows oses; would it be a good idea to include bat
> equivalents of those scripts ? is it easily doable (I'm totally not a bat
> expert) ? would using the p2 ant tasks be a way to provide portable shell
> scripts ? re using what Brian already did ?

I'm willing to help fix any issues required to get the scripts to work under mingw's bash.  Windows .bat creation is far beyond my talents :)
Comment 5 Ian Bull CLA 2012-06-11 14:22:06 EDT
Sorry, this got missed. Since we have a contribution, I'm going to put this on Kepler.
Comment 6 Alexander Kurtakov CLA 2013-12-10 03:06:48 EST
Is this planned for Luna now?
Comment 7 Brian de Alwis CLA 2013-12-10 04:21:48 EST
There are really one issue to figure out: where should the scripts live when shipped?  E.g., in a scripts/ directory?  Under p2/ or p2/bin?

Given that, it should be easy enough to locate the Eclipse binary.
Comment 8 Krzysztof Daniel CLA 2013-12-10 06:55:34 EST
I'd like those scripts to form a feature that could be downloaded when needed, but wouldn't be distributed with the platform build.
The location scripts/ looks good, but other projects could also distribute their scripts, so maybe sth like scripts/p2/?
Comment 9 Pascal Rapicault CLA 2013-12-10 12:54:15 EST
The other question is who is going to provide the scripts for windows?
Comment 10 Krzysztof Daniel CLA 2013-12-10 13:27:00 EST
(In reply to Pascal Rapicault from comment #9)
> The other question is who is going to provide the scripts for windows?

I have no idea. I'd release Brian's scripts, described them in a blogpost and hoped there is someone who would care for the windows version enough to port them.

If this is not acceptable, we could release those scripts via the incubator (but it is of low visibility and not easily accessible) or look for another way of distributing them (linux scripts via linuxtools)?
Comment 11 Eclipse Genie CLA 2019-04-26 15:56:58 EDT
This bug hasn't had any activity in quite some time. Maybe the problem got resolved, was a duplicate of something else, or became less pressing for some reason - or maybe it's still relevant but just hasn't been looked at yet.

If you have further information on the current state of the bug, please add it. The information can be, for example, that the problem still occurs, that you still want the feature, that more information is needed, or that the bug is (for whatever reason) no longer relevant.

--
The automated Eclipse Genie.
Comment 12 Lars Vogel CLA 2019-10-29 05:33:14 EDT
This bug is marked as stale for some time. If it is still relevant for the current release, please reopen and remove the stalebug whiteboard tag.