openhab / openhabian

openHABian - empowering the smart home, for Raspberry Pi and Debian systems
https://community.openhab.org/t/13379
ISC License
822 stars 251 forks source link

Migrate openHABian to OH3 on menu 03 #1553

Closed mstormi closed 3 years ago

mstormi commented 3 years ago

dunno why this slipped before See e.g. https://community.openhab.org/t/openhab-3-1-successful-but-openhabian-putty-always-starts-in-2-5-12-1/124518/11

Signed-off-by: Markus Storm markus.storm@gmx.net

mstormi commented 3 years ago

Hmm. We need an option to work for the majority of people, more than are successful with the current code. Sure we can't handle all cases but we should try to at least handle the case "user selects 03 without reading the docs" because while that's naive, that's what the official docs tell users to do.

As a very hypothetical situation, what if a user only wanted the latest release of OH2 and used this option figuring that it would not upgrade to OH3 but then was upset when it did.

No. The option says to "install or upgrade to OH3", doesn't it. So he knows he must not be using that for what he wants.

I agree this proposal here might be insufficient but I'm unsure why you think it wouldn't work in the cases you named. (originally it was migrate && (original openhab_setup) but turned out that's called during migration). Please help with developing a more foolproof solution: it's better to check some prerequisites and fail if they're not met rather than to execute and fail after.

ecdye commented 3 years ago

The migrate_installation code will automatically stop if it sees that the user is already on OH3 that is why I said it will not work with the way it is now. If you insist I is probably ok to include migrate in menu option 3 but this is not a functional solution.

mstormi commented 3 years ago

The migrate_installation code will automatically stop if it sees that the user is already on OH3

But that is the correct, expected/promised behavior, isn't it ? Again: 03 promises to "Install or upgrade to OH3" (it does not say "upgrade OH3", that's what option 02 is for). Ok strictly speaking the "install" use case does not exist as some OH version is always installed (unless a user manually removed it himself outside of openhabian-config, but even in that case 03 (with migrate) would do what it promises to, wouldn't it ?)

ecdye commented 3 years ago

Hmm, I guess if you put it like that yes that works. If you go through with this then we need to have Kai change the release notes to reflect the new behavior.

My only concern then is that in a way this is a very language specific thing and perhaps in the failed message we should redirect them to menu option 2.

mstormi commented 3 years ago

If you go through with this then we need to have Kai change the release notes to reflect the new behavior.

Not necessarily so. They apply to the case that the user has 2.X installed in which case this PR should deliver what it's supposed to (sure it would be a good idea nonetheless to point that out in the rel notes but needed it isn't). Maybe something in the 00 text ? Or a popup on both, 02 and 03 ?

ecdye commented 3 years ago

I don't know, I feel like we should just have the release notes changed in the future and possibly just note the behavior change in our announcements.

I don't think that much more than that is necessary. We may want to change the behavior in the stable branch too so that it's consistent across openHABian.

mstormi commented 3 years ago

So do I understand it right, you want:

ecdye commented 3 years ago

Yes, although I disagree it is a change in behavior because something that worked before no longer does the way it used to, even if it is a change to make it do what it says it will.

mstormi commented 3 years ago

fyi, I wanted to add a small note the README on dedicating the OH box vs. installing other software. It might have gotten a little larger and more emotional than intended. Please check.

ecdye commented 3 years ago

fyi, I wanted to add a small note the README on dedicating the OH box vs. installing other software. It might have gotten a little larger and more emotional than intended. Please check.

I changed it slightly but mostly just in line with our formatting standards, it seemed fine to me. I think it was a good inclusion that helped clarify the things we are willing and able to support.

mstormi commented 3 years ago

Another one bites the dust https://community.openhab.org/t/clear-items-after-updating-oh2-via-openhabian/123093/12

So changes are ok ?

ecdye commented 3 years ago

An you make the announcement for our repo as a part of this PR? Other than that yes the changes are fine.

mstormi commented 3 years ago

here you are

mstormi commented 3 years ago

FWIW I noticed I didn't totally forget about this. It was already in stable to start migration hence applied to most users as they were on OH2 by that time. https://github.com/openhab/openhabian/blob/stable/functions/menu.bash#L66