mirror of
https://github.com/jiangcuo/zfsonlinux.git
synced 2025-08-26 00:18:40 +00:00

moving file canonical locations from e.g. /lib to /usr/lib (usr-merge) while renaming a package (libzfs4linux -> libzfs6linux) could result in file deletions during upgrades. The following workaround has been used in debian upstream. see https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1092598 for the details. based on commit 0431247714965007bc156fd57852689b395b2bae https://salsa.debian.org/zfsonlinux-team/zfs/ Originally-by: Shengqi Chen <harry-chen@outlook.com> Signed-off-by: Stoiko Ivanov <s.ivanov@proxmox.com>
17 lines
458 B
Bash
17 lines
458 B
Bash
#!/bin/sh
|
|
|
|
set -e
|
|
|
|
if test "$1" = install -o "$1" = upgrade; then
|
|
# DEP17 P1 M8: Divert aliased files to avoid their removal deleting the
|
|
# moved ones. These diversions should be removed via postinst once
|
|
# trixie is released.
|
|
for lib in zfs_core.so.3 zfs_core.so.3.0.0; do
|
|
dpkg-divert --package libzfs6linux --no-rename --divert "/lib/#DEB_HOST_MULTIARCH#/lib$lib.usr-is-merged" --add "/lib/#DEB_HOST_MULTIARCH#/lib$lib"
|
|
done
|
|
fi
|
|
|
|
#DEBHELPER#
|
|
|
|
exit 0
|