tags:

views:

120

answers:

2

I'm using Eclipse 3.5.2 and I've created a p2.inf with the following information:

instructions.install = \
chmod(targetDir:@artifact,targetFile:$os$/libfoo.so,permissions:755);

instructions.install.import= \
org.eclipse.equinox.p2.touchpoint.natives.chmod

I placed the p2.inf inside the META-INF folder of the fragment, but when I install the update site, libfoo.so does not have execute permissions.

After pulling my hair out, I tried a p2.inf referencing a non-existing *.so, but nothing seems to happen. No error messages, exceptions, or warnings of any kind to indicate the P2 touchpoint action failed...

What's the deal? Any ideas?

A: 

A couple of things I notice:

  1. The "touchpoint.natives.chmod" action does not look like it supports @artifact. Try using org.eclipse.equinox.p2.touchpoint.eclipse.chmod instead.
  2. os does not appear to be a parameter that is replaced at install time. Also, looking at the p2 source code, if "os" was a parameter, it seems the syntax would actually be ${os}. (See ParameterizedProvisioningAction#processVariables)

Note that the $version$ and `$qualifier$' parameters mentioned on the wiki are replaced at metadata generation/publishing time, not at install time.

Andrew Niefer
I can't find org.eclipse.equinox.p2.touchpoint.eclipse.chmod in their documentation...?
Michael
Unfortunately none of the above suggestions worked out...
Michael
A: 

In Eclipse 3.6 (don't know about previous versions), the variable to use instead of @artifact is ${artifact.location}. I had to dig into the p2 source code to find it, but using it in the targetDir parameter worked like a charm.

Ryan