Since there is a likely chance I'll have to do this again, and no chance I remember how to do it the next time, I'll write down the steps I went through:
I created a p2.inf file with instructions;
instructions.configure=\
org.eclipse.equinox.p2.touchpoint.eclipse.addRepository(type:0,location:http${#58}//<my_url_here>,name:<my_name_here>,enabled:true);\
org.eclipse.equinox.p2.touchpoint.eclipse.addRepository(type:1,location:http${#58}//<my_url_here>,name:<my_name_here>,enabled:true);\
org.eclipse.equinox.p2.touchpoint.eclipse.addRepository(type:0,location:http${#58}//<my_url_here>,name:<my_name_here>,enabled:true);\
org.eclipse.equinox.p2.touchpoint.eclipse.addRepository(type:1,location:http${#58}//<my_url_here>,name:<my_name_here>,enabled:true);`
According to the Eclipse wiki the inf-file could be placed in the same dir as my feature.xml
, so that's what I did.
I had a product that consisted of this feature, so I exported the product using Eclipse product export wizard. I made sure to build a repository.
After the build was done, the repository had a content.jar. Inside the content.jar there was a content.xml. Examining it, I could find:
<touchpointData size='1'>
<instructions size='1'>
<instruction key='configure'>
org.eclipse.equinox.p2.touchpoint.eclipse.addRepository(<all my update sites>);
</instruction>
</instructions>
</touchpointData>
So this verified that the export did actually see my p2.inf file and do something with it.
To install from the repository I used an Eclipse Director script:
cmd /c "C:\Program\Eclipse\director\director -consoleLog -bundlepool c:/program/eclipse/eclipse3.6_custom -profileProperties "org.eclipse.update.install.features=true" -i MyProduct.Product -r "file:/C:\eclipse\exported\repository" -d c:/program/eclipse/eclipse3.6_custom -p helios"`
The script installed the product from the repository to the destination.