Nux

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

Proposed by Marco Trevisan (Treviño)
Status: Merged
Approved by: Iain Lane
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 Approve
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.
Revision history for this message
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
Revision history for this message
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
Revision history for this message
Iain Lane (laney) wrote :

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

review: Needs Fixing
Revision history for this message
Iain Lane (laney) wrote :

& should use the cosmic version here, I think?

Revision history for this message
Iain Lane (laney) :
review: Approve

Preview Diff

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

Subscribers

People subscribed via source and target branches