On 2011-02-11, at 7:19 PM, Triet Kha wrote:

> I have some custom touchpoints, and I would like to create generic/re-usable 
> IUs with the variable parameters factored out, so that I can just generate 
> simpler IUs/IU-fragments that encapsulate the generic IU's and only need to 
> provide the actual value for the parameters.
> 
> I am thinking of using property for the touchpoint action parameter values in 
> the generic IU's and filling in these property values in the encapsulating 
> IUs/IU-fragments. 
> 
> Here is an example.  This might not be very useful example, but just for the 
> purpose of illustrating what I want to do. We have a custom touchpoint action 
> in one IU:
>  execScript(scriptPath:/opt/myapp/launcher, args:${myAppArgs});
> 
> and I will provide the actual value for ${myAppArgs} in another IU as 
> property.
        It was in the goals of p2 to allow for this and especially to achieve 
to do what you are mentioning (reusing common config) however I don't think we 
are quite there yet because we never needed it in eclipse.
At this point, the only way I could see this work is if the IU providing the 
value is installed before the IU using it (and you could store your touchpoint 
to store the value) but this is dependent on the order in which the IUs are 
being processed which is currently not guaranteed (see bug 327127). Otherwise 
you may try to set the value as an IU fragment but I don't have a clear idea 
how this may work.

In short I'm afraid that we don't have a solution for you, but something could 
surely be done. If all the references to your variables are handled by the same 
touchpoint, then you had some spare cycle to help address bug  327127 then we 
could definitely make it work.

HTH



> Is there any problem with this approach? Will it work? The problem I have is 
> that I haven't been able to construct an IU that properly injects the value 
> for the 'myAppArgs' variable.
> 
> Your helps and advices would be greatly appreciated.
> 
> Regards,
> 
> Triet
> 
> 
> 
> _______________________________________________
> p2-dev mailing list
> [email protected]
> https://dev.eclipse.org/mailman/listinfo/p2-dev

_______________________________________________
p2-dev mailing list
[email protected]
https://dev.eclipse.org/mailman/listinfo/p2-dev

Reply via email to