X-Git-Url: https://git.decadent.org.uk/gitweb/?a=blobdiff_plain;f=debian%2Fion3.postinst;fp=debian%2Fion3.postinst;h=30850138ae4bbd45d87d3f1b49092e572e2932ae;hb=e18e8c469ffe3d7c8256d9da1c1d73bc1b9fecfb;hp=00db80703556d134ddefd1fdfe577fc19132d019;hpb=a5ea360cd6461b4e494e0350bd6c9f5aa9787aca;p=ion3.git diff --git a/debian/ion3.postinst b/debian/ion3.postinst index 00db807..3085013 100644 --- a/debian/ion3.postinst +++ b/debian/ion3.postinst @@ -1,5 +1,43 @@ #!/bin/sh set -e +. /usr/share/debconf/confmodule + +UPSTREAM_VERSION= + +if [ "$1" = configure -a "$2" = "" ]; then + # Installing for the first time (or after a purge). + # To comply with the Ion trademark licence terms, we must ensure + # that this version is up-to-date or that the user acknowledges + # it is not. I freely admit that this is a horrible abuse of + # debconf, but it seems slightly less unpleasant than maintaining + # a renamed version. - benh + uscan_output=$(uscan 2>&1 --no-conf --report-status \ + --package ion3 --upstream-version "$UPSTREAM_VERSION" \ + --watchfile /usr/share/ion3/debian/watch) + case "$uscan_output" in + *"up to date"*) + question='' + ;; + *"Newer version"*) + question=ion3/acknowledge-outdated + ;; + *) + question=ion3/acknowledge-maybe-outdated + ;; + esac + if [ -n "$question" ]; then + db_fset $question seen false + db_subst $question version $UPSTREAM_VERSION + db_input high $question || true + db_go || true + db_get $question + if [ "$RET" != true ]; then + db_input high ion3/did-not-acknowledge-outdated || true + db_go || true + exit 1 + fi + fi +fi if [ -h /etc/X11/ion3/draw.lua ]; then rm -f /etc/X11/ion3/draw.lua