summaryrefslogtreecommitdiff
path: root/debian/libsane1.preinst
diff options
context:
space:
mode:
authorJörg Frings-Fürst <debian@jff.email>2023-11-27 08:06:25 +0100
committerJörg Frings-Fürst <debian@jff.email>2023-11-27 08:06:25 +0100
commit68ddaed33f40c7af96bb962ba70854340685219e (patch)
treeed98819837864b81ca28ea88fd966b87ec41989e /debian/libsane1.preinst
parent957b126ad9ebe2fcd142f8d930a85a84f560c037 (diff)
parentdf5b35d76db5acfc0a82a75c54acfc5d1579e17b (diff)
Merge branch 'release/debian/1.2.1-6'debian/1.2.1-6
Diffstat (limited to 'debian/libsane1.preinst')
-rw-r--r--debian/libsane1.preinst22
1 files changed, 22 insertions, 0 deletions
diff --git a/debian/libsane1.preinst b/debian/libsane1.preinst
new file mode 100644
index 0000000..4ceccd3
--- /dev/null
+++ b/debian/libsane1.preinst
@@ -0,0 +1,22 @@
+#!/bin/sh
+
+set -e
+
+# begin-remove-after: released:trixie
+# protective diversion of files moved from / to /usr, to avoid file loss.
+# Only for upgrades.
+if [ "$1" = "upgrade" ]; then
+ dpkg-divert --package usr-is-merged --no-rename \
+ --divert /lib/udev/hwdb.d/20-sane.hwdb.usr-is-merged \
+ --add /lib/udev/hwdb.d/20-sane.hwdb
+ dpkg-divert --package usr-is-merged --no-rename \
+ --divert /lib/udev/rules.d/60-libsane1.rules.usr-is-merged \
+ --add /lib/udev/rules.d/60-libsane1.rules
+ dpkg-divert --package usr-is-merged --no-rename \
+ --divert /lib/udev/rules.d/99-libsane1.rules.usr-is-merged \
+ --add /lib/udev/rules.d/99-libsane1.rules
+fi
+# end-remove-after
+
+#DEBHELPER#
+