summaryrefslogtreecommitdiff
path: root/debian/libsane1.postinst
diff options
context:
space:
mode:
Diffstat (limited to 'debian/libsane1.postinst')
-rw-r--r--debian/libsane1.postinst17
1 files changed, 17 insertions, 0 deletions
diff --git a/debian/libsane1.postinst b/debian/libsane1.postinst
index 971103e..7c747f6 100644
--- a/debian/libsane1.postinst
+++ b/debian/libsane1.postinst
@@ -1,6 +1,23 @@
#!/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" = "configure" ]; then
+ # At this point, the package will have installed the same file in */usr*.
+ dpkg-divert --package usr-is-merged --no-rename \
+ --divert /lib/udev/hwdb.d/20-sane.hwdb.usr-is-merged \
+ --remove /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 \
+ --remove /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 \
+ --remove /lib/udev/rules.d/99-libsane1.rules
+fi
+# end-remove-after
+
case "$1" in
configure)
# Add the scanner system group if it doesn't exist