This should be a comment as it's only a partial answer, but it's too long.
It seems that .eclipseproduct
is a file generated at build time, and not created by p2 at provisioning time:
To find this I provisioned a copy of Eclipse 4.2 using p2 director (for instructions I used the Installing a Complete product section of this page, updating the repository to the 4.2 site instead of using the 3.6 ones, and changed from using Windows paths to ones more suited for my mac).
I noticed on the file listing that the .eclipseproduct
file seemed to be an unzipped artifact instead of a generated one since the time stamp was different:
$ ls -lA
total 304
-rw-r--r-- 1 myself group 60 Sep 14 18:13 .eclipseproduct
drwxr-xr-x 3 myself group 102 Nov 2 14:49 Eclipse.app
-rw-r--r-- 1 myself group 112366 Nov 2 14:49 artifacts.xml
...
This got me looking through the various caches in the ./p2
directory, and I found that there is an Installable Unit org.eclipse.platform_root
which is a zip file containing licensing and the .eclipseproduct
file...
:p2 $ zipinfo org.eclipse.equinox.p2.core/cache/binary/org.eclipse.platform_root_*
Archive: org.eclipse.equinox.p2.core/cache/binary/org.eclipse.platform_root_4.2.1.v20120814-120134-9JF7BHVGFyMveli1uX6aTH0q-eAap6PAgOP5mO 38125 5
-rw---- 2.0 fat 0 bl defN 14-Sep-12 18:13 readme/
-rw---- 2.0 fat 104173 bl defN 14-Sep-12 18:13 readme/readme_eclipse.html
-rw---- 2.0 fat 9051 bl defN 14-Sep-12 18:13 notice.html
-rw---- 2.0 fat 60 bl defN 14-Sep-12 18:13 .eclipseproduct
-rw---- 2.0 fat 16536 bl defN 14-Sep-12 18:13 epl-v10.html
5 files, 129820 bytes uncompressed, 37501 bytes compressed: 71.1%
I found the P2 IU information in the content.xml files found in the org.eclipse.equinox.p2.repository/cache/content*.jar
files:
...
<unit id='org.eclipse.platform_root' version='4.2.1.v20120814-120134-9JF7BHVGFyMveli1uX6aTH0q-eAap6PAgOP5mO'>
<provides size='1'>
<provided namespace='org.eclipse.equinox.p2.iu' name='org.eclipse.platform_root' version='4.2.1.v20120814-120134-9JF7BHVGFyMveli1uX6aTH0q-eAap6PAgOP5mO'/>
</provides>
<artifacts size='1'>
<artifact classifier='binary' id='org.eclipse.platform_root' version='4.2.1.v20120814-120134-9JF7BHVGFyMveli1uX6aTH0q-eAap6PAgOP5mO'/>
</artifacts>
<touchpoint id='org.eclipse.equinox.p2.native' version='1.0.0'/>
<touchpointData size='1'>
<instructions size='2'>
<instruction key='install'>
unzip(source:@artifact, target:${installFolder});
</instruction>
<instruction key='uninstall'>
cleanupzip(source:@artifact, target:${installFolder});
</instruction>
</instructions>
</touchpointData>
</unit>
...
In short: when this IU is installed (as required by org.eclipse.platform.feature.group
), p2 simply unzips the artifact with .eclipseproduct
to the install folder. No transformations required. Therefore it must be generated before install time.
Edit: I also found it in the Eclipse Git Repositories but haven't figured out if this is the one that is turned into the IU mentioned above or not...