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

OH tries to uninstall Regex transformation at each startup #342

Closed
lolodomo opened this issue Dec 1, 2016 · 18 comments
Closed

OH tries to uninstall Regex transformation at each startup #342

lolodomo opened this issue Dec 1, 2016 · 18 comments

Comments

@lolodomo
Copy link
Contributor

lolodomo commented Dec 1, 2016

At each startup, I can see this error:

2016-12-02 00:17:04.169 [ERROR] [core.karaf.internal.FeatureInstaller] - Failed uninstalling 'openhab-transformation-regex': Feature named 'openhab-transformation-regex/0.0.0' is not installed

Please note that the Regex transformation is marked as installed in Paper UI. This transformation was installed automatically when the MiOS binding was installed (required dependency).
In my addons.cfg file, I have only:

transformation = map

and my file org.openhab.addons.cfg only contains:

transformation = map

It is something that was working well in the past, I was not forced to set regex as transformation.

@BClark09
Copy link
Member

BClark09 commented Dec 2, 2016

With all these issues, have you tried commenting out each line in the addons.cfg so that it is not trying to override the org.openhab.addons.cfg file? And then setting them in paperUI?

@lolodomo
Copy link
Contributor Author

lolodomo commented Dec 2, 2016

No because I expect like before to be able using config files to setup what to be installed, without using Paper UI.
I have no such issue with snapshot 607 which is my current (stable) reference.

@kaikreuzer
Copy link
Member

Well, don't define a (strict) list of transformation services then. What is in addons.cfg is considered to be the truth of what you want. And if you say you do not want regex there, it will try to deinstall it.
Simply comment out the transformation line or add regex to it.

@lolodomo
Copy link
Contributor Author

lolodomo commented Dec 2, 2016

Of course I can add regex in addons.cfg but a normal user will probably not do it because he will not know that this is something required by another binding.
The user should not have to take care and know all hardcoded dependencies for bindings.
And why changing that while it was working well before ?

@kaikreuzer
Copy link
Member

Other people complained that if they remove something from addons.cfg, it still stays installed. So addons.cfg only works for adding stuff, not removing, which doesn't make much sense either.

Work in on the way to update the documentation. "normal" users should probably not use addons.cfg anymore at all.

@ThomDietrich
Copy link
Member

We were talking about this topic at openhab/openhab-docs#146 (comment)
The way how @lolodomo misunderstood the addons.cfg file here (especially the change in concept) is clear to me. The file should contain more information regarding the absolute nature of the file and in regards to the other ticket, maybe we should give defaults like #ui = basic,paper,habpanel.
@lolodomo if you want, please prepare a PullRequest.

@lolodomo
Copy link
Contributor Author

lolodomo commented Dec 2, 2016

Until recently the addons.cfg was a way to add features to the package. Now it is add and delete.

@ThomDietrich
Copy link
Member

ThomDietrich commented Dec 2, 2016

Instead of "add and delete" I would phrase it as "update". If you think about it, this is how it should be.
Imagine you sell your Sonos speaker and do not need the binding any longer. What's the expected outcome of removing "sonos" from the binding = sonos,knx,zwave list?
The recent change is a change to the better, it just has to be transported and documented correctly.

Would you take it upon you to update the phrasing inside the file?

@lolodomo
Copy link
Contributor Author

lolodomo commented Dec 2, 2016

In my current use case, that is MiOS binding requiring regex and map transformations, the user should not have to know that and these features should not be uninstalled because the user has requested to install another transformation.
But I will not insist more because I know the workaround now. I will try it with the next snapshot I will install.

@lolodomo
Copy link
Contributor Author

lolodomo commented Dec 2, 2016

I will not change the file myself as there is no clear way to explain the current behavior.

@ThomDietrich
Copy link
Member

I disagree. addons.cfg allows to define an absolute list of addons. Nothing more or less will be available. Straight and simple as that. I would go as far as to say that any other behavior would be wrong. If you want the comfort of automatic dependency management, use PaperUI.
I am aware that recommendations regarding addons changed over the last few months. A lot happened to solve this unclear situation and we are now at a state where both paths are functional and allow users to follow their preferred addons management strategy. All that's needed is additional information in addons.cfg and apparently a note regarding the dependencies of the MiOS binding in its documentation article. Do you still disagree?

@lolodomo
Copy link
Contributor Author

lolodomo commented Dec 2, 2016

I agree even if I still think that's a pity to force the user dealing with hidden dependencies. Hopefully the uninstall is failing (why?) and the binding probably continues working. By the way, documenting the special case of the MiOS binding would be a minimum workaround.

@lolodomo
Copy link
Contributor Author

lolodomo commented Dec 2, 2016

Note that the new principle does not work with HABpanel.

@kaikreuzer
Copy link
Member

the special case of the MiOS binding

I'd like to stress that this is indeed a very exceptional case, because no add-on should usually depend on another add-on. For MiOS, this is purely the case for historic reasons, being an 1.x binding.

@kaikreuzer
Copy link
Member

Note that the new principle does not work with HABpanel.

What exactly do you mean?

@lolodomo
Copy link
Contributor Author

lolodomo commented Dec 2, 2016

I explaimed in issue #340. As HABpanel is not included in my ui= line, it should be uninstalled and not present in my dashboard.

@dpackham
Copy link

I see the same error

2017-01-23 13:57:53.656 [ERROR] [core.karaf.internal.FeatureInstaller] - Failed uninstalling 'openhab-transformation-map': Feature named 'openhab-transformation-map/0.0.0' i s not installed
2017-01-23 13:57:53.668 [ERROR] [core.karaf.internal.FeatureInstaller] - Failed uninstalling 'openhab-transformation-regex': Feature named 'openhab-transformation-regex/0.0. 0' is not installed

the addons file is stock

@dpackham
Copy link

I am using the MIOS binding that comes with the latest 2.0 release. BTW

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

No branches or pull requests

5 participants