[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [p2-dev] avoiding uninstalling an RCP application

Right now you would have to tweak manually the most recent .profile file and set the property there. Check in an existing profile to see how we set properties.
On the other hand, if you have time, I think you are much better off attaching a patch to the bug mentioned.

HTH

Inactive hide details for Edoardo Comar ---14/11/2008 01:13:51 PM---> Date: Fri, 31 Oct 2008 14:28:09 -0400 > From: Pascal RapiEdoardo Comar ---14/11/2008 01:13:51 PM---> Date: Fri, 31 Oct 2008 14:28:09 -0400 > From: Pascal Rapicault <Pascal_Rapicault@xxxxxxxxxx>


From:

Edoardo Comar <ECOMAR@xxxxxxxxxx>

To:

p2-dev@xxxxxxxxxxx

Date:

14/11/2008 01:13 PM

Subject:

[p2-dev] avoiding uninstalling an RCP application




> Date: Fri, 31 Oct 2008 14:28:09 -0400
> From: Pascal Rapicault <Pascal_Rapicault@xxxxxxxxxx>
> Subject: Re: [p2-dev]
> To: P2 developer discussions <p2-dev@xxxxxxxxxxx>
>When you are doing the initial installation of the application,
>make sure you set the installable unit property IInstallableUnit.PROP_PROFILE_LOCKED_IU to IInstallableUnit.LOCK_UNINSTALL

> when you are installing the IU.
>Note that this currently can not be done from the director app,
>but we are welcoming any contribution to bug
https://bugs.eclipse.org/bugs/show_bug.cgi?id=227688

>Hi

>The software updates menu in our p2-enabled RCP application allows the user to uninstall itself (the RCPapp not the user :-).

>The result is an unusable / unstartable workbench !

>How can this be prevented ?

>--------------------------------------------------

>regards,

>Edoardo Comar



Thanks Pascal,

considering that the product is built headless in two stages (see below) :

can you just please tell explicitly when and where (in which file) should I set that property ?


1)

               <java jar="${launcher.jar}" jvm="${javaexec}" fork="true" failonerror="true">

                       <jvmarg value="-Xms256m" />

                       <jvmarg value="-Xmx768m" />

                       <arg line="-clean" />

                       <arg line="-application org.eclipse.ant.core.
antRunner" />
                       <arg line="-buildfile ${productBuild.xml}" />

                       <arg line="-Dbuilder=@{build}" />

                       <arg value="-Dproduct=@{product}" />

                       <arg value="-Dconfigs=${configs}" />

                       <arg line="-DbuildDirectory=@{build}" />

                       <arg line="-DbaseLocation=@{eclipse}" />

                       <arg line="-DbuildType=${buildType}" />

                       <arg line="-DbuildId=${buildId}" />

                       <arg line="-DarchivePrefix=${buildId}" />

                       <arg line="-DforceContextQualifier=${qualifier}" />

                       <arg line="-DjavacDebugInfo=true" />

                       <arg line="-DjavacVerbose=false" />

                       <arg line="-DjavacSource='1.5'" />

                       <arg line="-DjavacTarget='1.5'" />

                       <arg line="-Dgenerate.p2.metadata=true" />

                       <arg line="-Dp2.metadata.repo=file:@{repository}" />

                       <arg line="-Dp2.artifact.repo=file:@{repository}" />

                       <arg value="-Dp2.metadata.repo.name=@{repositoryName}" />

                       <arg value="-Dp2.artifact.repo.name=@{repositoryName}" />

                       <arg line="-Dp2.flavor=tooling" />

                       <arg line="-Dp2.publish.artifacts=true" />

               </java>


2)
               <java jar="${launcher.jar}" fork="true" jvm="${javaexec}" failonerror="true">

                       <jvmarg value="-Xms256m" />

                       <jvmarg value="-Xmx768m" />

                       <jvmarg value="-Declipse.p2.data.area=@{build}/@{product}/p2" />

                       <arg line="-clean" />

                       <arg line="-application org.eclipse.equinox.p2.
director.app.application" />
                       <arg line="-consoleLog" />

                       <arg line="-metadataRepository
file:@{repository}" />
                       <arg line="-artifactRepository
file:@{repository}" />
                       <arg line="-installIU @{product}" />

                       <arg line="-profile @{product}" />

                       <arg line="-destination @{build}/@{product}" />

                       <arg line="-bundlepool @{build}/@{product}" />

                       <arg line="-p2.os @{os}" />

                       <arg line="-p2.ws @{ws}" />

                       <arg line="-p2.arch @{arch}" />

                       <arg value="-roaming" />

                       <arg line="-profileProperties org.eclipse.update.install.features=true" />

               </java>








Unless stated otherwise above:
IBM United Kingdom Limited - Registered in England and Wales with number 741598.
Registered office: PO Box 41, North Harbour, Portsmouth, Hampshire PO6 3AU











Unless stated otherwise above:
IBM United Kingdom Limited - Registered in England and Wales with number 741598.
Registered office: PO Box 41, North Harbour, Portsmouth, Hampshire PO6 3AU





_______________________________________________
p2-dev mailing list
p2-dev@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/p2-dev

GIF image

GIF image