deb: upgrades keep the Verae_Timestamping queue and its jobs (postinst creates only if missing, prerm removes only on remove); default VERSION 0.3.2
This commit is contained in:
parent
7a938892d1
commit
095e1e42ba
1 changed files with 11 additions and 7 deletions
|
|
@ -11,7 +11,7 @@
|
|||
set -euo pipefail
|
||||
|
||||
ROOT="$(cd "$(dirname "$0")/../../.." && pwd)"
|
||||
VERSION="${VERSION:-0.1.2}"
|
||||
VERSION="${VERSION:-0.3.2}"
|
||||
OUT="${OUT:-$ROOT/build/deb}"
|
||||
ARCHS="${1:-all}"
|
||||
PKG_NAME="verae-print"
|
||||
|
|
@ -113,11 +113,14 @@ EOF
|
|||
#!/bin/sh
|
||||
set -e
|
||||
if command -v lpadmin >/dev/null 2>&1 && [ -x /usr/lib/cups/backend/verae ]; then
|
||||
lpadmin -x Verae_Timestamping 2>/dev/null || true
|
||||
# Create the queue only if it doesn't exist: deleting it on upgrade purges
|
||||
# any jobs waiting in it.
|
||||
if ! lpstat -v Verae_Timestamping >/dev/null 2>&1; then
|
||||
lpadmin -p Verae_Timestamping -E -v verae:/ -m raw \
|
||||
-D "Verae Timestamping" -L "Digests-only Verae stamp" 2>/dev/null || \
|
||||
lpadmin -p Verae_Timestamping -E -v verae:/ -m everywhere \
|
||||
-D "Verae Timestamping" 2>/dev/null || true
|
||||
fi
|
||||
cupsenable Verae_Timestamping 2>/dev/null || true
|
||||
cupsaccept Verae_Timestamping 2>/dev/null || true
|
||||
fi
|
||||
|
|
@ -129,7 +132,8 @@ EOF
|
|||
cat >"$stage/DEBIAN/prerm" <<'EOF'
|
||||
#!/bin/sh
|
||||
set -e
|
||||
if command -v lpadmin >/dev/null 2>&1; then
|
||||
# Only drop the queue on a real removal, not on upgrade.
|
||||
if [ "$1" = "remove" ] && command -v lpadmin >/dev/null 2>&1; then
|
||||
lpadmin -x Verae_Timestamping 2>/dev/null || true
|
||||
fi
|
||||
exit 0
|
||||
|
|
|
|||
Loading…
Reference in a new issue