Merge lp:~laney/lightdm/no-prompt-upgrade into lp:lightdm

Proposed by Iain Lane
Status: Merged
Merged at revision: 2495
Proposed branch: lp:~laney/lightdm/no-prompt-upgrade
Merge into: lp:lightdm
Diff against target: 37 lines (+15/-1)
2 files modified
debian/changelog (+12/-0)
debian/lightdm.config (+3/-1)
To merge this branch: bzr merge lp:~laney/lightdm/no-prompt-upgrade
Reviewer Review Type Date Requested Status
Didier Roche-Tolomelli Approve
Ken VanDine Pending
LightDM Development Team Pending
Review via email: mp+327521@code.launchpad.net

Description of the change

gdm3 is fixed for this issue, but lightdm causes the same prompt to be shown. Something like this happens-

  - user does a dist-upgrade (or release upgrade)
  - after downloading the packages, they are preconfigured (.config scripts are run)
    + ...
    + gdm3.config is run, sets gdm3 as the default
    + ...
    + lightdm.config is run, sees gdm3 is the default and prompts the user

I think at the last step there we should intercept and not show the prompt.

I didn't think of a really good way to do this. You can't tell from the script if you're being called as part of preconfiguring or configuring (postinst). So after some head scratching I just decided to do this: if you're upgrading from an old version, don't show the prompt. The rationale is that it's not very likely that an upgrader wants to change their display manager - that is normally going to come from a new install.

But I think this is worth a review instead of me just uploading. Opinions welcomed.

To post a comment you must log in.
lp:~laney/lightdm/no-prompt-upgrade updated
2493. By Iain Lane

Don't mangle db_fset ...

2494. By Iain Lane

Add a ~

Revision history for this message
Didier Roche-Tolomelli (didrocks) wrote :

As discussed on IRC, and with your additional manual testing, +1 from my side

review: Approve
Revision history for this message
Iain Lane (laney) wrote :

Thanks!

For the record, the valid concern was that we might suppress the prompt for the initial upgrade but then trigger it for the next update of lightdm. I tested and this doesn't happen. I think this is because gdm3.config is setting "shared/default-x-display-manager seen true".

lp:~laney/lightdm/no-prompt-upgrade updated
2495. By Iain Lane

releasing package lightdm version 1.22.0-0ubuntu6

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'debian/changelog'
2--- debian/changelog 2017-06-21 09:51:55 +0000
3+++ debian/changelog 2017-07-18 09:22:13 +0000
4@@ -1,3 +1,15 @@
5+lightdm (1.22.0-0ubuntu6) artful; urgency=medium
6+
7+ * debian/lightdm.config: When upgrading to this version, don't show the DM
8+ selection prompt. We're trying to suppress the prompt and switch Ubuntu
9+ desktop users to gdm3 smoothly, but lightdm's prompt is showing up as gdm3
10+ is on the system when lightdm.config is executed. This means that if there
11+ is a situation when upgraders to this version *should* be shown the
12+ prompt, they won't be. If that is the case, we'll need to think again
13+ about how to implement this.
14+
15+ -- Iain Lane <iain.lane@canonical.com> Tue, 18 Jul 2017 10:21:45 +0100
16+
17 lightdm (1.22.0-0ubuntu5) artful; urgency=medium
18
19 * Change back the default session to 'ubuntu', as it now corresponds to
20
21=== modified file 'debian/lightdm.config'
22--- debian/lightdm.config 2013-07-16 23:36:16 +0000
23+++ debian/lightdm.config 2017-07-18 09:22:13 +0000
24@@ -46,10 +46,12 @@
25
26 # when installing from scratch as part of a release upgrade, default to
27 # lightdm, otherwise ask
28+
29+# GDM transition: When upgrading from an old version, don't ask the question.
30 if [ -z "$2" -a -n "$RELEASE_UPGRADE_IN_PROGRESS" ]; then
31 db_set shared/default-x-display-manager lightdm
32 db_fset shared/default-x-display-manager seen true
33-else
34+elif ! dpkg --compare-versions "$2" lt-nl "1.22.0-0ubuntu6~"; then
35 db_input high shared/default-x-display-manager || :
36 db_go || :
37 fi

Subscribers

People subscribed via source and target branches