[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [p2-dev] Extending p2director.app and the SimplePlanner

I think it would be useful to see the solution.  Please open a bug and attach patches/new code

Jeff

On 2010-11-07, at 1:11 PM, Hugues Malphettes wrote:

I have ported Jeff's patch  "[Bug 328929] [target] Would you like source with that?" to an extended p2director application.
Following Jeff's approach the only class I had to copy-paste is the DirectorApplication class itself.
Promoting a couple of methods from private to protected would make it possible to not fork anything at all.

Please let me know if this is worth putting into as a patch in bugzilla. (no is an answer).

Thanks,
Hugues

On Thu, Nov 4, 2010 at 11:55 AM, Hugues Malphettes <hmalphettes@xxxxxxxxxxx> wrote:
Hi everyone,

I would like to add a -addSources to the arguments of p2director.
It has the same functionality than "[Bug 328929] [target] Would you
like source with that?" but it makes it available on the command-line.

It is probably not relevant to support in p2director a situation only
useful to osgi bundles and their source bundles that follow a naming
convention.

So how can we extend p2director.app?
So far I copied, pasted and forked DirectorApplication and SimplePlanner.
Here is a list of the things needed to avoid having to fork:
- add a new command-line argument
- customize the ProvisioningContext with a new constant
- add a callback after the slicer is called to customize the plan.

p2 makes it easy to put together your own agent with your own planner
and everything.
However in this scenario I need all of the functionality already there
and just a few extra bits and pieces.

Let me know if I overlooked something or if there is a different way
to approach this.
Thanks a lot,
Hugues

_______________________________________________
p2-dev mailing list
p2-dev@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/p2-dev