Nux

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

Proposed by Marco Trevisan (Treviño) on 2018-06-22
Status: Merged
Approved by: Iain Lane on 2018-06-25
Approved revision: c62b69465850cfd237b0b6cca40a35a371b1030e
Merged at revision: fcd2043db00b365b453399ac8e94b2a497886391
Proposed branch: ~3v1n0/nux:preinst-conffiles-restore-xenial
Merge into: nux:ubuntu/xenial
Diff against target: 65 lines (+39/-1)
3 files modified
debian/changelog (+9/-0)
debian/control (+2/-1)
debian/nux-tools.preinst (+28/-0)
Reviewer Review Type Date Requested Status
Iain Lane 2018-06-22 Approve on 2018-06-25
Review via email: mp+348390@code.launchpad.net

Commit message

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

These might be moved by x11-common.

LP: #1768610

Description of the change

To post a comment you must log in.
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 f86fea3..41893fb 100644
3--- a/debian/changelog
4+++ b/debian/changelog
5@@ -1,3 +1,12 @@
6+nux (4.0.8+16.04.20180613.1-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+
13+ -- Marco Trevisan (Treviño) <marco@ubuntu.com> Fri, 22 Jun 2018 14:31:28 +0200
14+
15 nux (4.0.8+16.04.20180613.1-0ubuntu1) xenial; urgency=medium
16
17 * debian/50_check_unity_support:
18diff --git a/debian/control b/debian/control
19index def29f0..c63c284 100644
20--- a/debian/control
21+++ b/debian/control
22@@ -39,7 +39,8 @@ Section: libs
23 Homepage: http://launchpad.net/nux
24 # If you aren't a member of ~unity-team but need to upload packaging changes,
25 # just go ahead. ~unity-team will notice and sync up the code again.
26-Vcs-Bzr: https://code.launchpad.net/~unity-team/nux/trunk
27+Vcs-Browser: https://git.launchpad.net/~unity-team/nux
28+Vcs-Git: https://git.launchpad.net/~unity-team/nux
29
30 Package: libnux-4.0-0
31 Section: libs
32diff --git a/debian/nux-tools.preinst b/debian/nux-tools.preinst
33new file mode 100644
34index 0000000..6558821
35--- /dev/null
36+++ b/debian/nux-tools.preinst
37@@ -0,0 +1,28 @@
38+#!/bin/sh
39+
40+set -e
41+
42+restore_backup_conffiles() {
43+ PKGNAME="$1"
44+ PREVERSION="$2"
45+ MAXVERSION="$3"
46+
47+ if dpkg --compare-versions "$PREVERSION" lt-nl "$MAXVERSION"; then
48+ conffiles="$(dpkg-query --show -f='${Conffiles}' "$PKGNAME")"
49+ filepaths="$(echo "$conffiles" | cut -f-2 -d' ')"
50+
51+ for cfile in $filepaths; do
52+ if [ -e "$cfile".x11-back ]; then
53+ echo "Moving conffile $cfile back in place..."
54+ mv -f "$cfile".x11-back "$cfile"
55+ fi
56+ done
57+ fi
58+}
59+
60+case "$1" in
61+install)
62+ restore_backup_conffiles nux-tools "$2" 4.0.8+16.04.20180613.1-0ubuntu1;;
63+esac
64+
65+#DEBHELPER#

Subscribers

People subscribed via source and target branches