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

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