Nux

Merge ~3v1n0/nux:preinst-conffiles-restore into nux:master

Proposed by Marco Trevisan (Treviño) on 2018-06-19
Status: Merged
Approved by: Iain Lane on 2018-06-25
Approved revision: 343e7780236aaf35bf38529a9e1ee75a9490905c
Merged at revision: e2030eafcd71f1b0a91f04df7e954ac6b6de2089
Proposed branch: ~3v1n0/nux:preinst-conffiles-restore
Merge into: nux:master
Diff against target: 81 lines (+43/-2)
4 files modified
debian/changelog (+12/-0)
debian/control (+2/-1)
debian/nux-tools.preinst (+28/-0)
debian/rules (+1/-1)
Reviewer Review Type Date Requested Status
Iain Lane 2018-06-19 Approve on 2018-06-25
Review via email: mp+348192@code.launchpad.net

Commit message

debian/nux-tools.preinst: restore backup config files

These might be moved by x11-common.

To post a comment you must log in.
Iain Lane (laney) wrote :

Thanks, some small changes needed. (inline comments)

Please run "shellcheck" over the script and make sure it is clean.

review: Needs Fixing
Iain Lane (laney) wrote :

Thanks for the update. This script and the other one still need "set -e". I'm going to test this a bit now.

review: Needs Fixing
Iain Lane (laney) wrote :

Oh OK, I didn't look closely enough. You can't use "local" in POSIX sh either.

review: Needs Fixing
Iain Lane (laney) wrote :

& should use the cosmic version here, I think?

Iain Lane (laney) :
review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1diff --git a/debian/changelog b/debian/changelog
2index faa2758..9f09809 100644
3--- a/debian/changelog
4+++ b/debian/changelog
5@@ -1,3 +1,15 @@
6+nux (4.0.8+18.10.20180613.3-0ubuntu2) UNRELEASED; urgency=medium
7+
8+ * debian/control: update Vcs
9+ * debian/nux-tools.preinst:
10+ - Restore backup config files before installing nux-tools, so that they
11+ will be updaded with the fixed versions (LP: #1768610)
12+ * debian/rules:
13+ - build tests using LIBGL_ALWAYS_SOFTWARE env var to fix build crash
14+ on launchpad builders (there are memory errors in the hw drivers).
15+
16+ -- Marco Trevisan (Treviño) <marco@ubuntu.com> Tue, 19 Jun 2018 05:20:32 +0200
17+
18 nux (4.0.8+18.10.20180613.3-0ubuntu1) cosmic; urgency=medium
19
20 * debian/50_check_unity_support:
21diff --git a/debian/control b/debian/control
22index e87fa14..b78e6a3 100644
23--- a/debian/control
24+++ b/debian/control
25@@ -39,7 +39,8 @@ Section: libs
26 Homepage: http://launchpad.net/nux
27 # If you aren't a member of ~unity-team but need to upload packaging changes,
28 # just go ahead. ~unity-team will notice and sync up the code again.
29-Vcs-Bzr: https://code.launchpad.net/~unity-team/nux/trunk
30+Vcs-Browser: https://git.launchpad.net/~unity-team/nux
31+Vcs-Git: https://git.launchpad.net/~unity-team/nux
32
33 Package: libnux-4.0-0
34 Section: libs
35diff --git a/debian/nux-tools.preinst b/debian/nux-tools.preinst
36new file mode 100644
37index 0000000..0d01d3a
38--- /dev/null
39+++ b/debian/nux-tools.preinst
40@@ -0,0 +1,28 @@
41+#!/bin/sh
42+
43+set -e
44+
45+restore_backup_conffiles() {
46+ PKGNAME="$1"
47+ PREVERSION="$2"
48+ MAXVERSION="$3"
49+
50+ if dpkg --compare-versions "$PREVERSION" lt-nl "$MAXVERSION"; then
51+ conffiles="$(dpkg-query --show -f='${Conffiles}' "$PKGNAME")"
52+ filepaths="$(echo "$conffiles" | cut -f-2 -d' ')"
53+
54+ for cfile in $filepaths; do
55+ if [ -e "$cfile".x11-back ]; then
56+ echo "Moving conffile $cfile back in place..."
57+ mv -f "$cfile".x11-back "$cfile"
58+ fi
59+ done
60+ fi
61+}
62+
63+case "$1" in
64+install)
65+ restore_backup_conffiles nux-tools "$2" 4.0.8+18.10.20180613.3-0ubuntu1;;
66+esac
67+
68+#DEBHELPER#
69diff --git a/debian/rules b/debian/rules
70index 0152cdf..784cbe2 100755
71--- a/debian/rules
72+++ b/debian/rules
73@@ -33,7 +33,7 @@ override_dh_install:
74
75 override_dh_auto_test:
76 ifeq (,$(filter nocheck,$(DEB_BUILD_OPTIONS)))
77- make check-headless
78+ env LIBGL_ALWAYS_SOFTWARE=1 make check-headless
79 endif
80
81 override_dh_gencontrol:

Subscribers

People subscribed via source and target branches