Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update for old installed version still detected #9

Closed
martinet-c opened this issue Jan 20, 2021 · 7 comments
Closed

Update for old installed version still detected #9

martinet-c opened this issue Jan 20, 2021 · 7 comments
Labels
enhancement New feature or request
Milestone

Comments

@martinet-c
Copy link

martinet-c commented Jan 20, 2021

Describe the bug
After a successful update (11.0.9+11 to 11.0.9.1+1), the watcher keep detecting the same update for the old 11.0.9+11 version.

I'm sure that it's not a 'known-not-a-bug'
See: https://github.com/tushev/aojdk-updatewatcher/wiki/Known-not-a-bugs
[X] Yes
It's related to the known-not-a-bug 'Update resulted in duplicate installation of AdoptOpenJDK': it seems to happen only when the old version is not manually uninstalled.

To Reproduce
Steps to reproduce the behavior:

  1. Install AdoptOpenJDK (I installed the 11.0.9+11 version on November 2020)
  2. Install 'Update Watcher for AdoptOpenJDK'
  3. Wait for the next update notification (11.0.9.1+1 in my case) and install it --> you now have 2 installed versions; do not uninstall the old one.
  4. When 'Update Watcher for AdoptOpenJDK' runs again (a few days later in my case), it asks again for the same update.

Expected behavior
The watcher should not ask again for the same update, it has already been done.

Workaround
Uninstall the old version.

Screenshots
adpt-open-jdk-updater-20210121

Desktop (please complete the following information):

  • AJUpdateWatcher-2.0.2.0-setup.msi
@tushev
Copy link
Owner

tushev commented Jan 21, 2021

Hi,

It's related to the known-not-a-bug 'Update resulted in duplicate installation of AdoptOpenJDK': it seems to happen only when the old version is not manually uninstalled.

Yes, this is caused by the limitation in version handling in Windows Installer: Adopt installers cannot remove 11.0.9+11 when installing 11.0.9.1+1. That's why my updater still detects the previous version - it was not uninstalled (and in auto mode the updater checks all existing installations for updates).

I think I could add a prompt for such cases (if there are version changes in the fourth digit only) - with a suggestion either to uninstall old MSI or to disable checking for updates for the old version.

@tushev tushev added the enhancement New feature or request label Jan 21, 2021
@martinet-c
Copy link
Author

martinet-c commented Jan 21, 2021

Thanks for your reply!

The question is: why would someone want to keep checking the updates for an old install?
The only answer I can think of is: because when uninstalling one of the duplicate versions, he uninstalled the new one (most likely by mistake).

@tushev
Copy link
Owner

tushev commented Jan 21, 2021

Actually, this is a side effect of the way my updater works: it supports user-added (or overridden) installations and auto-discovered ones.

For the latter, it tries to list all installed AdoptOpenJDK MSIs in the system, every time, and checks each of them for updates. Since 11.0.9.101 (that's internal number for 11.0.9.1+1) did not uninstall 11.0.9.11 (aka 11.0.9+1), the updater detects both 11.0.9.1+1 and 11.0.9+1, and suggests update for 11.0.9+1 again.

Since both instances are auto-discovered, the updater cannot distinguish whether this is the old version left, or the user installed it again for some reason. It simply suggests to update everything that it sees :)

Sure, this looks like 'unexpected behavior' to the end user, so I think that I should warn users before fourth-digit updates and remove the old version before installing new one (normally, MSIs do this by themselves, but not in case of fourth-digit updates). Thanks for pointing that out.

(BTW, this only happens on fourth-digit updates. Major updates, like the upcoming 11.0.9.1+1 -> 11.0.10, work as expected)

P.S. If someone needs to keep the old version as well for debugging purposes etc, it is possible to disable checking for updates for that very version/instance by context menu in configuration.

@martinet-c
Copy link
Author

martinet-c commented Jan 21, 2021

Yes, I understand this is a side effect, the purpose of my previous comment was to try to find what could be the best way to solve it.
I think that when a version is updated, the checking for updates should be disabled by default for the old version, with a suggestion to uninstall it.
And if the user wants to keep ckecking updates for this old version, there should be a possibility to re-enable it in the configuration menu.

But of course you're the most able to decided what is the best option.
Thanks again.

@tushev
Copy link
Owner

tushev commented Jan 22, 2021

OK, now I see you point. Indeed, this could be a better option, thank you for your suggestion!

@tushev tushev added this to the 2.0.3.0 milestone Mar 20, 2021
@tushev
Copy link
Owner

tushev commented Aug 15, 2021

Version 2.0.3 is live, it now has a mechanism that detects if the old version was not uninstalled and asks user if they want to disable checking for updates for the old version.

As for uninstalling, I think I'll include it in a next major feature release.

I'm closing this for now, please reopen if something works not as expected.

@tushev tushev closed this as completed Aug 15, 2021
@martinet-c
Copy link
Author

I'll test it soon, thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants