hello, On 25.3.2017 11:27, Luigi Baldoni wrote:
Ok. I have a number of binaries and for the sake of simplicity let's just call them foo and bar.
So, %python_install installs them unversioned and then I have %python_clone -a %{buildroot}%{_bindir}/foo %python_clone -a %{buildroot}%{_bindir}/bar (...) %post %python_install_alternative foo %python_install_alternative bar (...) %files %{python_files} %python_alternative %{_bindir}/foo %python_alternative %{_bindir}/bar
this is the correct approach. Except, why don't you want to create a group? Does it make sense in your package to use different versions of the accompanying tools?
How come I see
Nothing to do with number of groups. This is how update-alternatives seem to work.
update-alternatives: using /usr/bin/foo-3.6 to provide /usr/bin/foo (foo) in
you get this when an alternative provider changes automatically -- such as when there are two and you remove the currently used one, or when you install a higher priority alternative. (...)
warning: file /usr/bin/foo: remove failed: No such file or directory
This is actually a RPM warning; update-alternatives deleted /usr/bin/foo and RPM was supposed to do that. If you moved to %postun, you would get a slightly different error from update-alternatives telling you that the files it's checking are not present anymore. Speaking of which, please move to %postun. With the latest update, %preun will no longer work for uninstalling alternatives. I'll have to re-check all packages. regards m. -- To unsubscribe, e-mail: opensuse-packaging+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-packaging+owner@opensuse.org