Timo Aaltonen pushed to branch ubuntu at X Strike Force / xorg

Commits:
53a9aa3b by Iain Lane at 2018-06-21T14:01:43+01:00
Add mitigations for nux-tools installing a broken Xsession.d file

https://bugs.launchpad.net/ubuntu/+source/nux/+bug/1768610

- - - - -
04f1a466 by Iain Lane at 2018-06-21T14:01:43+01:00
Finalise changelog

- - - - -


3 changed files:

- debian/changelog
- debian/control
- + debian/x11-common.preinst


Changes:

=====================================
debian/changelog
=====================================
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,15 @@
+xorg (1:7.7+19ubuntu8) cosmic; urgency=medium
+
+  * x11-common.preinst:
+    - Rename nux config leftovers which might change the environment
+      even when not running an unity session (LP: #1768610)
+  * debian/control:
+    - x11-common breaks nux-tools (<< 4.0.8+18.04.20180613.5-0ubuntu1) - this
+      version contains the fixed conffile; if it's installed on the system we
+      need people to be upgraded to the new version.
+
+ -- Marco Trevisan (TreviƱo) <[email protected]>  Thu, 21 Jun 2018 11:37:03 
+0100
+
 xorg (1:7.7+19ubuntu7) bionic; urgency=medium
 
   [ Simon Quigley ]


=====================================
debian/control
=====================================
--- a/debian/control
+++ b/debian/control
@@ -18,6 +18,7 @@ Package: x11-common
 Architecture: all
 Multi-Arch: foreign
 Depends: ${misc:Depends}, lsb-base (>= 1.3-9ubuntu2)
+Breaks: nux-tools (<< 4.0.8+18.10.20180613.3-0ubuntu1)
 Description: X Window System (X.Org) infrastructure
  x11-common contains the filesystem infrastructure required for further
  installation of the X Window System in any configuration; it does not


=====================================
debian/x11-common.preinst
=====================================
--- /dev/null
+++ b/debian/x11-common.preinst
@@ -0,0 +1,36 @@
+#!bin/sh
+
+set -e
+
+rm_conffiles_if_uninstalled() {
+    PKGNAME="$1"
+    MAXVERSION="$2"
+
+    if [ "$(dpkg-query --show --showformat='${db:Status-Status}' "$PKGNAME")" 
!= "config-files" ]; then
+        return 0;
+    fi
+
+    pkg_version=$(dpkg-query --show --showformat='${Version}' "$PKGNAME")
+
+    if dpkg --compare-versions "$pkg_version" lt-nl "$MAXVERSION"; then
+        conffiles="$(dpkg-query --show -f='${Conffiles}' "$PKGNAME")"
+        filepaths="$(echo "$conffiles" | cut -f-2 -d' ')"
+
+        for cfile in $filepaths; do
+            if [ -f "$cfile" ]; then
+                echo "Moving obsolete conffile $cfile to $cfile.x11-back..."
+                mv -f "$cfile" "$cfile".x11-back
+            fi
+        done
+    fi
+}
+
+case "$1" in
+install|upgrade)
+    if dpkg --compare-versions "$2" lt 1:7.7+19ubuntu8; then
+        rm_conffiles_if_uninstalled nux-tools 4.0.8+18.10.20180613.3-0ubuntu1
+    fi
+    ;;
+esac
+
+#DEBHELPER#



View it on GitLab: 
https://salsa.debian.org/xorg-team/xorg/compare/bfb9cc99000e62bb67556a2564e234ab813206a5...04f1a466326c35d9718da65ba3e29f41a3eb5c7c

-- 
View it on GitLab: 
https://salsa.debian.org/xorg-team/xorg/compare/bfb9cc99000e62bb67556a2564e234ab813206a5...04f1a466326c35d9718da65ba3e29f41a3eb5c7c
You're receiving this email because of your account on salsa.debian.org.

Reply via email to