openhab / openhab-linuxpkg

Repo for Linux packages
Eclipse Public License 2.0
18 stars 33 forks source link

Handle tmp folder in the same way as disto #57

Closed BClark09 closed 7 years ago

BClark09 commented 7 years ago

Signed-off-by: Ben Clark ben@benjyc.uk

BClark09 commented 7 years ago

@kaikreuzer, I had forgotten that oh_dir_layout is unique on linuxpkg... Think it's worth re-packaging 2.1.0 (i.e. 2.1.0-2)?

I've also tried deleting the cache again after the install completes, just in case...

kaikreuzer commented 7 years ago

Does it have to be unique on linuxpkg? I would prefer not having to maintain such things in different files in the same way. The oh_dir_layout mainly sets the Karaf env variables based on the setting of the openHAB env variables - this should be fine to be used by the linuxpkg as well.

No need to repackage 2.0.0, I think. The upgrade creates the tmp folder and users normally should not manually delete it, so I don't think this is a severe issue.

ThomDietrich commented 7 years ago

@BClark09 This PR also contains clearing out the cache and tmp folder after upgrade, which was not done till now!? In the forum I'm seeing multiple users which had to do so in order to get their setup working again. I've upgraded an old 2.0 stable setup this morning and ran into issues and had to clear cache and tmp.

Did you find the answer for this? https://community.openhab.org/t/many-issues-with-v2-1/30703/15

BClark09 commented 7 years ago

Hi @ThomDietrich, no it is already done in the pre-install stage. I have been repeatedly told that the apt folders are suffering from this and up until now I was worried that it wasn't, so added it to post-install too.

This is unnecessary though as I have tested this and it is indeed being removed preinst. It turns out that other people using manual install are having to deal with tmp/cache folders twice.

It is my belief that something's happening on the first run of a new distro, regardless of installation method.

@kaikreuzer

would prefer not having to maintain such things in different files in the same way. The oh_dir_layout mainly sets the Karaf env variables based on the setting of the openHAB env variables - this should be fine to be used by the linuxpkg as well.

So would I, will close this PR and attempt to do it this instead. I hope and assume @theoweiss does not mind this.