Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[tycho-dev] tycho-p2-runtime does not consider p2 meta requirements BZ 351487

Hello all,
This discussion is to talk about bz 351487 [1]

- Here is my use case :
I am creating custom p2 touchpoint actions, to  add migration steps on a product build.

- Here is the problem :
tycho-p2-runtime is built in a way that it is not updatable by p2, since it does not have a profile nor the simple configurator activated.
So when I'm building a product relying on a plugin that needs a custom touchpoint action to get executed, then my build fails because tycho-p2-runtime was not aware of this custom touchpoint action
You can reproduce this situation cloning this repo : [2]

- Suggested solution 1: create maven plugin to extend the tycho-p2-runtime
Igor suggested that I would create maven plugin to extend the tycho-p2-runtime; I did not succeed, but the code is available there [3] and it should be close to working (classcast exception on the reactorProject class...)
But I think this solution is not optimal : it makes the developer creates a new maven plugin each time they rely on a custom touchpoint action (additionnal work) and it does not reflect the mechanism of the p2 meta requirements that are here to enrich the builder runtime (tycho-p2-runtime)

- Suggested solution 2: modify the tycho-p2-runtime so that it is p2 updatable
The patch is provided on the BZ, along with its integration tests; in a nutshell it changes the packaging of tycho-p2-runtime from eclipse-application to eclipse-repository and enables the simple configurator.
Thanks to this, the tycho-p2-runtime can enrich itself with custom touchpoint actions and execute them.
To make sure that from a build to another tycho-p2-runtime stays clean, it is deleted and re unzipped each time we notice its content has changed
The integration test provided covers all those aspects.

I thank you very much in advance to consider this patch, p2 custom touchpoint actions are a great way to execute migrations and to set up special environment.[4]

Best regards,
Anthony


[1] https://bugs.eclipse.org/bugs/show_bug.cgi?id=351487
[2] https://github.com/anthonydahanne/tycho-Bug-351487
[3] https://github.com/anthonydahanne/tycho-Bug-351487/tree/master/hello-maven-plugin
[4] http://wiki.eclipse.org/Equinox/p2/Customizing_Metadata#Capability_Advice



Anthony Dahanne
Développeur logiciel / Software Developer
Compuware Montreal
75 Rue Queen, Suite 6500
Montreal, QC, Canada H3C 2N6
+1-514-798-8949


 
Le contenu de ce courriel s'adresse au destinataire seulement. Il contient de l'information pouvant être confidentielle. Vous ne devez ni le copier ni l'utiliser ni le divulguer à qui que ce soit à moins que vous soyez le destinataire ou une personne désignée autorisée. Si vous le receviez par erreur, veuillez nous aviser immédiatement et le détruire.
 
The contents of this e-mail are intended for the named addressee only. It contains information that may be confidential. Unless you are the named addressee or an authorized designee, you may not copy or use it, or disclose it to anyone else. If you received it in error please notify us immediately and then destroy it.
 



Back to the top