> Well, I just wanted to make sure this happened as early as possible,
since this is not related to what the package installs, I thought it was
better to handle this in preinst, so that this can be also just removed
at later times.

The thing about the preinst is that it runs super early, you can't even
rely on the package's dependencies being installed. In this case we
don't use any non-Essential tools, so it's OK, but often this is a
problem. We don't *need* to use the preinst, since either the pkg is
removed or not removed before we even start installing x11-common - at
postinst time it's going to still be removed or it's going to get
upgraded to the fixed version.

There's a bug in x11-common. If the preinst check triggers twice (like
on a xenial dist-upgrade and then again when you upgrade to bionic), the
upgrade fails:

Preparing to unpack .../x11-common_1%3a7.7+19ubuntu7.1_all.deb ...
Moving obsolete conffile /etc/X11/Xsession.d/50_check_unity_support to 
/etc/X11/Xsession.d/50_check_unity_support.x11-back...
mv: cannot stat '/etc/X11/Xsession.d/50_check_unity_support': No such file or 
directory
dpkg: error processing archive 
/var/cache/apt/archives/x11-common_1%3a7.7+19ubuntu7.1_all.deb (--unpack):
 new x11-common package pre-installation script subprocess returned error exit 
status 1
Errors were encountered while processing:
 /var/cache/apt/archives/x11-common_1%3a7.7+19ubuntu7.1_all.deb
E: Sub-process /usr/bin/dpkg returned an error code (1)

Fixed that by adding a [ -f ] check, and then I made the same fixes as
on the MP, expanded the changelog a bit, and uploaded to the silo (3299)
for all releases. Please check my diffs - particularly the versions.

Could you add some testcases for this please? Like

 - remove nux-tools from bionic-release (pre-sru), upgrade, reinstall nux-tools 
(no prompt)
 - remove nux-tools from bionic-proposed/updates (sru), upgrade, reinstall 
nux-tools (no prompt)
 - modify config file, remove nux-tools, upgrade, reinstall nux-tools (should 
prompt)
 - install nux-tools, upgrade, no prompt

You end up with either no /etc/X11/Xsession.d/50_check_unity_support,
its new contents or you are asked what to do if you've changed it
before. Never the old content.

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/1768610

Title:
  leftover conffile forces GNOME is software rendering

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/nux/+bug/1768610/+subscriptions

-- 
ubuntu-bugs mailing list
[email protected]
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

Reply via email to