Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [p2-dev] what variable should i use to run some native touch point actions on the feature that is just installed?

Hi,

i didn't test chmod yet (dont need that under windows)
but i tested:

instructions.install = \
org.eclipse.equinox.p2.touchpoint.eclipse.setJvm(jvm:${artifact.location}\\jre\\bin\\j9vm\\jvm.dll);

and that doesn't work because the 
ParameterizedProvisioningAction.processVariables(String, Map<String,Object>, boolean) line: 106 

doesn't have that replacement at all the parameter list that is has are:

agent=org.eclipse.equinox.internal.p2.core.ProvisioningAgent@107476e3
forced=false
profile="">phaseId=install
iu=[R]com.servoy.jre.win32.x86_64.feature.feature.group 12.0.0
installFolder=C:\temp\eclipse
context={artifactRepos=[], metadataRepos=[], properties={org.eclipse.equinox.p2.director.followArtifactRepositoryReferences=true, org.eclipse.equinox.p2.director.followRepositoryReferences=null}}
manipulator=org.eclipse.equinox.internal.p2.touchpoint.eclipse.LazyManipulator@f4fdbe75
profileDataDirectory=C:\temp\eclipse\p2\org.eclipse.equinox.p2.engine\profileRegistry\SDKProfile.profile\.data
platformConfiguration=org.eclipse.equinox.internal.p2.touchpoint.eclipse.PlatformConfigurationWrapper@734dac8
_p2_internal_last_result_variable_=org.eclipse.equinox.p2.engine.spi.Value@565ca0eb
operand=null --> [R]com.servoy.jre.win32.x86_64.feature.feature.group 12.0.0
sourceBundles=org.eclipse.equinox.internal.p2.touchpoint.eclipse.SourceManipulator@d99d49a8

you see installFolder is there, but not "artifact.location"

i will have a look how that then supposed to work for chmod 


By the way are you not hitting this bug?
https://bugs.eclipse.org/bugs/show_bug.cgi?id=551378




On Sat, 9 Nov 2019 at 10:43, Torkild U. Resheim <torkildr@xxxxxxxxx> wrote:
Hi,

It seems we had a similar issue at some point. The code that is currently in use and has been for years looks like this:

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

instructions.install = \
        chmod(targetDir:${artifact.location},targetFile:jre/bin/ControlPanel,permissions:755);\
        chmod(targetDir:${artifact.location},targetFile:jre/bin/java,permissions:755);\
        chmod(targetDir:${artifact.location},targetFile:jre/bin/javaws,permissions:755);\
        chmod(targetDir:${artifact.location},targetFile:jre/bin/jcontrol,permissions:755);\
        chmod(targetDir:${artifact.location},targetFile:jre/bin/jjs,permissions:755);\
        chmod(targetDir:${artifact.location},targetFile:jre/bin/keytool,permissions:755);\
        chmod(targetDir:${artifact.location},targetFile:jre/bin/orbd,permissions:755);\
        chmod(targetDir:${artifact.location},targetFile:jre/bin/pack200,permissions:755);\
        chmod(targetDir:${artifact.location},targetFile:jre/bin/policytool,permissions:755);\
        chmod(targetDir:${artifact.location},targetFile:jre/bin/rmid,permissions:755);\
        chmod(targetDir:${artifact.location},targetFile:jre/bin/rmiregistry,permissions:755);\
        chmod(targetDir:${artifact.location},targetFile:jre/bin/servertool,permissions:755);\
        chmod(targetDir:${artifact.location},targetFile:jre/bin/tnameserv,permissions:755);\
        chmod(targetDir:${artifact.location},targetFile:jre/bin/unpack200,permissions:755);

I don't know why we are not using the "-R" option.

Best regards,
Torkild

> 8. nov. 2019 kl. 22:07 skrev Mickael Istria <mistria@xxxxxxxxxx>:
>
>
>
> On Fri, Nov 8, 2019 at 5:37 PM Johan Compagner <jcompagner@xxxxxxxxx> wrote:
> I guess it should work for that target dir.  But what about the vm setting? That's just one argument that needs to then be concat to each other.
>
> But I will have ab test if I can seer how the code works for this argument.. I expected it to be more like a variable.  (Like installDir)
>
> Looking in the code of the Eclipse touchpoints (including setJVM and chmod), there seems to be a ${artifact.location} property you can use for this purpose.
> So you could maybe use
>
> org.eclipse.equinox.p2.touchpoint.eclipse.setJvm(jvm:${artifact.location}/jre/Contents/Home/bin);\
> org.eclipse.equinox.p2.touchpoint.eclipse.chmod(targetDir:${artifact.location}/jre/Contents/Home/,targetFile:bin,permissions:755,options:-R);
> _______________________________________________
> p2-dev mailing list
> p2-dev@xxxxxxxxxxx
> To change your delivery options, retrieve your password, or unsubscribe from this list, visit
> https://www.eclipse.org/mailman/listinfo/p2-dev

_______________________________________________
p2-dev mailing list
p2-dev@xxxxxxxxxxx
To change your delivery options, retrieve your password, or unsubscribe from this list, visit
https://www.eclipse.org/mailman/listinfo/p2-dev

Back to the top