[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [p2-dev] Extending p2director.app and the SimplePlanner
- From: Hugues Malphettes <hmalphettes@xxxxxxxxxxx>
- Date: Sun, 7 Nov 2010 10:11:14 -0800
- Delivered-to: email@example.com
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).
On Thu, Nov 4, 2010 at 11:55 AM, Hugues Malphettes <hmalphettes@xxxxxxxxxxx>
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
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
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,