[Merge] ~gunnarhj/ubuntu-release-upgrader:more-temp-font into ubuntu-release-upgrader:ubuntu/main
Nick Rosbrook
mp+453593 at code.launchpad.net
Mon Oct 16 14:29:02 UTC 2023
Review: Needs Fixing
Thanks for looking into all of these flavors. I think the approach here makes sense, I just left some minor comments on the diff.
Diff comments:
> diff --git a/DistUpgrade/DistUpgradeQuirks.py b/DistUpgrade/DistUpgradeQuirks.py
> index 3ba9fc7..855abe5 100644
> --- a/DistUpgrade/DistUpgradeQuirks.py
> +++ b/DistUpgrade/DistUpgradeQuirks.py
> @@ -1493,6 +1484,24 @@ class DistUpgradeQuirks(object):
> )
> return
>
> + schema = 'org.gnome.desktop.interface'
> + use_autostart = False
> +
> + desktops = os.getenv('XDG_CURRENT_DESKTOP', '').split(':')
Is there a spec for XDG_CURRENT_DESKTOP somewhere? From what I've seen, it's something like "<distro>:<flavor/desktop env>". If that's specified somewhere, it would be nice to simplify this logic (i.e. desktop = os.getenv('XDG_CURRENT_DESKTOP', '').parition(':')[2]). Then we wouldn't need all these "x in desktops" checks.
> +
> + # Some flavors use other schemas for the desktop font.
> + if 'MATE' in desktops or 'UKUI' in desktops:
> + schema = 'org.mate.interface'
> + elif 'X-Cinnamon' in desktops:
> + schema = 'org.cinnamon.desktop.interface'
> +
> + # Some flavors lack the systemd integration needed for a
> + # user service, so we create an autostart file instead.
> + for d in ['Budgie', 'LXQt', 'MATE', 'UKUI', 'X-Cinnamon', 'XFCE']:
With the current logic, I think `use_autostart = set(['Budgie', 'LXQt', 'MATE', 'UKUI', 'X-Cinnamon', 'XFCE']) & set(desktops)` is simpler. Or, if we can simplify the assignment of desktop as mentioned above, then it would just be `use_autostart = desktop in ['Budgie', 'LXQt', 'MATE', 'UKUI', 'X-Cinnamon', 'XFCE']`.
> + if d in desktops:
> + use_autostart = True
> + break
> +
> r = subprocess.run(
> ['systemd-run', '--user', '-M', f'{pwuid.pw_name}@.host',
> '--wait', '--pipe', '-q', '--',
--
https://code.launchpad.net/~gunnarhj/ubuntu-release-upgrader/+git/ubuntu-release-upgrader/+merge/453593
Your team Ubuntu Core Development Team is requested to review the proposed merge of ~gunnarhj/ubuntu-release-upgrader:more-temp-font into ubuntu-release-upgrader:ubuntu/main.
More information about the Ubuntu-reviews
mailing list