[Merge] ~3v1n0/nux:preinst-conffiles-restore into nux:master
Iain Lane
iain at orangesquash.org.uk
Thu Jun 21 09:05:07 UTC 2018
Review: Needs Fixing
Thanks for the update. This script and the other one still need "set -e". I'm going to test this a bit now.
Diff comments:
> diff --git a/debian/nux-tools.preinst b/debian/nux-tools.preinst
> new file mode 100644
> index 0000000..14ec082
> --- /dev/null
> +++ b/debian/nux-tools.preinst
> @@ -0,0 +1,26 @@
> +#!/bin/sh
> +
set -e needed here still.
> +restore_backup_conffiles() {
> + local PKGNAME="$1"
> + local PREVERSION="$2"
> + local MAXVERSION="$3"
> +
> + if dpkg --compare-versions "$PREVERSION" 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
> + if [ -e "$cfile".x11-back ]; then
> + echo "Moving conffile $cfile back in place..."
> + mv -f "$cfile".x11-back "$cfile"
> + fi
> + done
> + fi
> +}
> +
> +case "$1" in
> +install)
> + restore_backup_conffiles nux-tools "$2" 4.0.8+18.04.20180613.5-0ubuntu1;;
> +esac
> +
> +#DEBHELPER#
--
https://code.launchpad.net/~3v1n0/nux/+git/nux/+merge/348192
Your team Unity Team is subscribed to branch nux:master.
More information about the Ubuntu-reviews
mailing list