diff -Nru xorg-7.7+19ubuntu7/debian/changelog xorg-7.7+19ubuntu8/debian/changelog --- xorg-7.7+19ubuntu7/debian/changelog 2018-04-19 16:47:42.000000000 +0200 +++ xorg-7.7+19ubuntu8/debian/changelog 2018-06-19 04:55:18.000000000 +0200 @@ -1,3 +1,11 @@ +xorg (1:7.7+19ubuntu8) UNRELEASED; urgency=medium + + * x11-common.preinst: + - Rename nux config leftovers which might change the environment + even when not running an unity session (LP: #1768610) + + -- Marco Trevisan (TreviƱo) Tue, 19 Jun 2018 04:55:18 +0200 + xorg (1:7.7+19ubuntu7) bionic; urgency=medium [ Simon Quigley ] diff -Nru xorg-7.7+19ubuntu7/debian/x11-common.preinst xorg-7.7+19ubuntu8/debian/x11-common.preinst --- xorg-7.7+19ubuntu7/debian/x11-common.preinst 1970-01-01 01:00:00.000000000 +0100 +++ xorg-7.7+19ubuntu8/debian/x11-common.preinst 2018-06-19 04:55:09.000000000 +0200 @@ -0,0 +1,27 @@ +rm_conffiles_if_uninstalled() { + local PKGNAME="$1" + local MAXVERSION="$2" + + if [ "$(dpkg-query --show --showformat='${db:Status-Status}' $PKGNAME)" != "config-files" ]; then + return 0; + fi + + local pkg_version=$(dpkg-query --show --showformat='${Version}' $PKGNAME) + + if dpkg --compare-versions "$pkg_version" lt-nl $MAXVERSION; then + local conffiles="$(dpkg-query --show -f='${Conffiles}' $PKGNAME)" + local filepaths="$(echo "$conffiles" | cut -f-2 -d' ')" + + for cfile in $filepaths; do + echo "Moving obsolete conffile $cfile to $cfile.x11-back..." + mv -f "$cfile" "$cfile".x11-back + done + fi +} + +case "$1" in +install|upgrade) + rm_conffiles_if_uninstalled nux-tools 4.0.8+18.04.20180613.5-0ubuntu1 +esac + +#DEBHELPER#