Bug 1075971 - update-alternatives - settings being reset
update-alternatives - settings being reset
Status: RESOLVED FIXED
Classification: openSUSE
Product: openSUSE Tumbleweed
Classification: openSUSE
Component: Other
Current
Other Other
: P3 - Medium : Normal (vote)
: ---
Assigned To: Tomáš Chvátal
E-mail List
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2018-01-15 11:08 UTC by Ian Powell
Modified: 2018-08-08 07:35 UTC (History)
8 users (show)

See Also:
Found By: ---
Services Priority:
Business Priority:
Blocker: ---
Marketing QA Status: ---
IT Deployment: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Ian Powell 2018-01-15 11:08:36 UTC
[opensuse-factory] New Tumbleweed snapshot 20180110 released!

This snapshot changed my manual settings in "alternatives" with regards 
to "default-displaymanager" and "postgres" back to "auto" and hence the overriding my choices of "kdm" and "postgresql96".

This has happened a few times with new snapshots.
Comment 1 Dominique Leuenberger 2018-01-15 11:27:50 UTC
The man page for u-a saus:

--install
If the alternative name specified exists already in the alternatives system's records, the information supplied will be added as a new set of alternatives for the group.  Otherwise, a new group, set  to
              automatic  mode,  will  be added with this information.  If the group is in automatic mode, and the newly added alternatives' priority is higher than any other installed alternatives for this group, the
              symlinks will be updated to point to the newly added alternatives.


The spec files DO call u-a --install for targers (even if already there), but since the users switched to manual mode, the man page implies no change would happen (which is also what the user would expect)

From various reports though, u-a switches the groups back to auto mode
Comment 2 Gertjan Lettink 2018-01-15 11:31:56 UTC
(In reply to Ian Powell from comment #0)
> [opensuse-factory] New Tumbleweed snapshot 20180110 released!
> 
> This snapshot changed my manual settings in "alternatives" with regards 
> to "default-displaymanager" and "postgres" back to "auto" and hence the
> overriding my choices of "kdm" and "postgresql96".
> 
> This has happened a few times with new snapshots.

I can confirm this.
Comment 3 Tomáš Chvátal 2018-01-15 18:58:42 UTC
It is for sure exposed mostly because of the patch:

https://build.opensuse.org/package/view_file/system:packagemanager/dpkg/0001-In-case-of-equal-priority-rather-update.patch?expand=1

Which forces same priority regeneration.

But even then it should not change from manual to auto if the "manual" choice is still present.
Comment 4 Dominique Leuenberger 2018-01-15 19:10:30 UTC
(In reply to Tomáš Chvátal from comment #3)
> It is for sure exposed mostly because of the patch:
> 
> https://build.opensuse.org/package/view_file/system:packagemanager/dpkg/0001-
> In-case-of-equal-priority-rather-update.patch?expand=1

Even that sounds somewhat weird/wrong - taking gdm/sddm into account, both .spec files contain

u-a --install … 25

do I get it right that those two keep on switching like this?
Comment 5 Tomáš Chvátal 2018-01-15 19:54:09 UTC
(In reply to Dominique Leuenberger from comment #4)
> (In reply to Tomáš Chvátal from comment #3)
> > It is for sure exposed mostly because of the patch:
> > 
> > https://build.opensuse.org/package/view_file/system:packagemanager/dpkg/0001-
> > In-case-of-equal-priority-rather-update.patch?expand=1
> 
> Even that sounds somewhat weird/wrong - taking gdm/sddm into account, both
> .spec files contain
> 
> u-a --install … 25
> 
> do I get it right that those two keep on switching like this?

Actually, you are supposed to update the prio each time you change the alternative path, the reason for the patch is that we have s**taton of python modules calling py2.7 with prio 20 and py3.x with prio 30, and that totally screwed up systems when we moved ie from python 3.4 to 3.5.

it should not replace them if selected by the user. otherwise, it should rerun the magic auto selection otherwise.
Comment 6 Tomáš Chvátal 2018-01-16 11:19:16 UTC
I've sent submission to TW removing the mentioned patch because we switched to singlespec and thus it is no longer really needed. Retry with that and we can continue if it is still too eager.
Comment 7 Swamp Workflow Management 2018-01-16 11:50:05 UTC
This is an autogenerated message for OBS integration:
This bug (1075971) was mentioned in
https://build.opensuse.org/request/show/566374 Factory / dpkg
Comment 8 Swamp Workflow Management 2018-01-16 14:00:07 UTC
This is an autogenerated message for OBS integration:
This bug (1075971) was mentioned in
https://build.opensuse.org/request/show/566413 Factory / dpkg
Comment 9 Dominique Leuenberger 2018-01-16 16:14:05 UTC
(In reply to Tomáš Chvátal from comment #6)
> I've sent submission to TW removing the mentioned patch because we switched
> to singlespec and thus it is no longer really needed. Retry with that and we
> can continue if it is still too eager.

For reference only: the submissions also remove a post script entry, which was certainly involved in resets back to --auto too:

-# Fix broken alternatives list bnc#969171
-cd %{_sysconfdir}/alternatives/
-for i in $(ls .) ; do
-    # continue on errors
-    update-alternatives --auto $i 2>/dev/null || :
-done
Comment 10 Ken Schneider 2018-01-16 17:18:02 UTC
This has happened to me as well since U-A was made the norm.
Comment 11 Ian Powell 2018-08-08 07:35:24 UTC
This seems to have been resolved and working as it should for a while now, time to closed as FIXED 

THanks for the work.