Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Oomph » Install requirements on startup "Always" not working
Install requirements on startup "Always" not working [message #1799264] Mon, 03 December 2018 16:55 Go to next message
Ge Strait is currently offline Ge StraitFriend
Messages: 37
Registered: September 2017
Member
I use Eclipse Installer to install my product from a product "latest" repository.

I'm expecting Oomph to install new product feature/plugin versions in a repository pointed to by the product setup file upon startup. The Oomph preference "Install requirements on startup" set to Always. But new feature/plugin versions in the repository are not installed on startup.

If I manually select Help>Check for Updates the updates are found and I can install the updates. But my hope is that my users don't have to perfrom this manual step.

I'm not using version codes in the setupTask. In the setup editor version is set to 0.0.0. My thinking is 0.0.0 should cause the latest feature/plugin versions in the repository to install on startup. Is that correct?

Can anyone explain why the "Install requirements on startup" Always might not be working?
I see "Setup check" appear in the lower right task area for a second or so but nothing appears to happen.

My product is built on Eclipse Neon.
My product has org.eclipse.oomph.setup.ui installed.

I read the "Product Setup update" thread but did not glean a solution to my problem.

Thanks.
Re: Install requirements on startup "Always" not working [message #1799272 is a reply to message #1799264] Mon, 03 December 2018 19:08 Go to previous messageGo to next message
Ge Strait is currently offline Ge StraitFriend
Messages: 37
Registered: September 2017
Member
Apparently my problem has to do with the versionRange on the requirement in the P2 Director task.

My product currently has 4.6.1 installed. And my latest repository has 4.6.2.

If I set versionRange="4.6.2" then Oomph Updater installs the latest version on startup as I desire.

<requirement
name="com.xyz.my.product"
versionRange="4.6.2"
filter=""/>

Is it possible to specify a versionRange that will force the latest version in a repository to be installed upon startup?
For example, when 4.6.3 is moved into my latest repository the versionRange in the .setup file does not need to be updated and the latest gets installed on startup.

Thanks
Re: Install requirements on startup "Always" not working [message #1799288 is a reply to message #1799272] Tue, 04 December 2018 06:31 Go to previous messageGo to next message
Ed Merks is currently offline Ed MerksFriend
Messages: 30439
Registered: July 2009
Senior Member
Version ranges on the p2 director task's requirements is the way to force an update on startup. The way this works is that org.eclipse.oomph.setup.p2.impl.P2TaskImpl.isNeeded(SetupTaskContext), for startup trigger, compares the task's requirements against what is currently actually already installed. So not only must the required unit be present (if not optional ), it must lie within the version range of the requirement; note that as a version range 0.0.0 is all inclusive, i.e., all versions are within this range. If the current installation already satisfies the requirements, the p2 task is not needed.

There is no other proper way to force a full update on startup. The cost of actually checking the repositories for updates is very high. It involves not only loading all the repositories, which is in and of itself expensive, but also involves computing a prerequisite plan to see if there are any actual updates for the requirements relative to what's actually already installed, which is also expensive.

Note that our product catalogs are generated, so the "latest" and "latest.released" have version ranges that change over time (and also the repositories change over time) to force updates on startup. Changing the range (the setup) is the only way to force an update...
Re: Install requirements on startup "Always" not working [message #1799312 is a reply to message #1799288] Tue, 04 December 2018 15:31 Go to previous messageGo to next message
Ge Strait is currently offline Ge StraitFriend
Messages: 37
Registered: September 2017
Member
Thanks!

After the Oomph Updater complete the installation of my latest software, there is no prompt asking the user to restart Eclipse. Should such a prompt be presented as occurs when installing via Install New Software.
Re: Install requirements on startup "Always" not working [message #1799321 is a reply to message #1799312] Tue, 04 December 2018 16:56 Go to previous messageGo to next message
Ed Merks is currently offline Ed MerksFriend
Messages: 30439
Registered: July 2009
Senior Member
Doesn't the status area continue to show the animated icon that tasks have been (are being) performed? You need to open the progress dialog...
Re: Install requirements on startup "Always" not working [message #1799353 is a reply to message #1799321] Wed, 05 December 2018 13:26 Go to previous messageGo to next message
Ge Strait is currently offline Ge StraitFriend
Messages: 37
Registered: September 2017
Member
The status area shows progress while the updates are being installed. I can double-click in the status area to open the progress in the Progress View.

But after the update is complete, there is no indication to the user that they need to restart as I would expect.

When I install software via Help>Install New Software, I'm prompted with a popup "You will need to restart for changes to take effect. Would you like to restart now?"

I don't see any similar popup presented by the Oomph Updater. Would you expect there to be?

Thanks.
Re: Install requirements on startup "Always" not working [message #1799360 is a reply to message #1799353] Wed, 05 December 2018 15:17 Go to previous messageGo to next message
Ed Merks is currently offline Ed MerksFriend
Messages: 30439
Registered: July 2009
Senior Member
I expect the status icon stays there are stays animated with the exclamation mark to catch the user's attention. The dialog itself gives you the option to restart, which it will do if you hit finish (and it will not do if you hit cancel). Isn't that the case?

Note that the dialog itself has an option to restart automatically. This is stored persistently a dialog setting in <workspace>/ws/.metadata/.plugins/org.eclipse.oomph.setup.ui/dialog_settings.xml :
<?xml version="1.0" encoding="UTF-8"?>
<section name="Workbench">
	<section name="SetupWizard">
		<section name="ProgressPage">
			<item value="true" key="restartIfNeeded"/>
			<item value="true" key="dismissAutomatically"/>
		</section>
	</section>
</section>
So in principle you could have a resource creation task to create that file. But I assume you want to do this in a Product setup and a product setup doesn't know which workspace will be used. And if you do it later once the product is launched, at this point the dialog will already be up before the task to create the dialog settings could run...
Re: Install requirements on startup "Always" not working [message #1799374 is a reply to message #1799360] Wed, 05 December 2018 19:30 Go to previous messageGo to next message
Ge Strait is currently offline Ge StraitFriend
Messages: 37
Registered: September 2017
Member
I don't see any dialog. Just a progress bar. I attached a picture file.
Re: Install requirements on startup "Always" not working [message #1799389 is a reply to message #1799374] Thu, 06 December 2018 05:39 Go to previous messageGo to next message
Ed Merks is currently offline Ed MerksFriend
Messages: 30439
Registered: July 2009
Senior Member
For me I see the following icon the entire time the tasks are executing. It's animated and you can click it any time to bring up the dialog. The dialog itself has an icon next to to its progress bar to hide the dialog again. When tasks finish performing successfully without action required, the icon disappears after a short while. If there is a restart needed, it animates with and orange exclamation mark (and if something failed, it animates with an red x). It looks like this:
index.php/fa/34467/0/
When you click on it, the dialog looks like this:
index.php/fa/34468/0/
Re: Install requirements on startup "Always" not working [message #1799422 is a reply to message #1799374] Thu, 06 December 2018 14:14 Go to previous messageGo to next message
Ge Strait is currently offline Ge StraitFriend
Messages: 37
Registered: September 2017
Member
Do I have sufficient Oopmh plugins installed? See attached screen capture.
Re: Install requirements on startup "Always" not working [message #1799453 is a reply to message #1799422] Fri, 07 December 2018 04:19 Go to previous messageGo to next message
Ed Merks is currently offline Ed MerksFriend
Messages: 30439
Registered: July 2009
Senior Member
The org.eclipse.oomph.setup.editor seems missing and indeed that's what contributes org.eclipse.oomph.setup.presentation.handlers.PerformStatusControl.
Re: Install requirements on startup "Always" not working [message #1799484 is a reply to message #1799453] Fri, 07 December 2018 15:13 Go to previous messageGo to next message
Ge Strait is currently offline Ge StraitFriend
Messages: 37
Registered: September 2017
Member
I updated my product catalog to install Oomph Setup Editor (which I now see in the Installation Details Installed Software) but I still don't see the dialog you see when the Oomph Updater runs.. Might there be something else I also need to install?

My product catalog now installs...

<setupTask
xsi:type="setup.p2:P2Task"
label="Oomph Setup UI">
<requirement
name="org.eclipse.oomph.setup.ui"/>
<repository
url="http://download.eclipse.org/oomph/updates/latest"/>
</setupTask>
<setupTask
xsi:type="setup.p2:P2Task"
label="Oomph Setup Editor">
<requirement
name="org.eclipse.oomph.setup.editor"/>
<repository
url="http://download.eclipse.org/oomph/updates/latest"/>
</setupTask>

Thanks.

Re: Install requirements on startup "Always" not working [message #1799495 is a reply to message #1799484] Fri, 07 December 2018 17:31 Go to previous messageGo to next message
Ed Merks is currently offline Ed MerksFriend
Messages: 30439
Registered: July 2009
Senior Member
The eclipse project catalog has this:
<?xml version="1.0" encoding="UTF-8"?>
<p2:Requirement
    xmi:version="2.0"
    xmlns:xmi="http://www.omg.org/XMI"
    xmlns:p2="http://www.eclipse.org/oomph/p2/1.0"
    name="org.eclipse.oomph.setup.feature.group"/>
I.e., it requires the whole feature, not individual plugins. I'm not sure what product you're installing, but potentially the product might not include certain things in the status area where this control would normally show up...
Re: Install requirements on startup "Always" not working [message #1799510 is a reply to message #1799495] Fri, 07 December 2018 22:24 Go to previous message
Ge Strait is currently offline Ge StraitFriend
Messages: 37
Registered: September 2017
Member
I installed the setup feature group and now I see the what you see when the updater runs.

Thanks for your help as always.
Previous Topic:Cannot change PHP value of variable using xdebug
Next Topic:Extract and recompose windows installer - Java not found
Goto Forum:
  


Current Time: Sun Sep 15 19:53:54 GMT 2019

Powered by FUDForum. Page generated in 0.02849 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top