diff options
author | Jörg Frings-Fürst <debian@jff.email> | 2022-02-22 21:30:03 +0100 |
---|---|---|
committer | Jörg Frings-Fürst <debian@jff.email> | 2022-02-22 21:30:03 +0100 |
commit | cfaf9fc8246b4826ff641aad1034cf5a4546219f (patch) | |
tree | f320b4df019b8f896c2ac088da6b240f882d391a /debian | |
parent | 4b201ef213beeb0c1a97ee427525fd59253e1419 (diff) |
Fix debian/sane-utils.preinst
Diffstat (limited to 'debian')
-rw-r--r-- | debian/sane-utils.preinst | 23 |
1 files changed, 16 insertions, 7 deletions
diff --git a/debian/sane-utils.preinst b/debian/sane-utils.preinst index 1a7f24b..2e49781 100644 --- a/debian/sane-utils.preinst +++ b/debian/sane-utils.preinst @@ -6,16 +6,25 @@ MANPAGE=/usr/share/man/man5/sane-umax_pp.5.gz MANLINK=/usr/share/man/man5/umax_pp.5.gz -if [ -f "$MANLINK" ] && [ -L "$MANLINK" ]; then - # Remove old directory and files that are now provided by xsane-common - rm -rf "$MANLINK" -fi + +if [ "$1" = install ] || [ "$1" = upgrade ]; then + + ## Remove obsolete manpages that are now provided by sane-common + if dpkg --compare-versions "$2" le "1.1.1-2"; then + + if [ -f "$MANLINK" ] && [ -L "$MANLINK" ]; then + rm -rf "$MANLINK" + fi -if [ -f "$MANPAGE" ]; then - # Remove old directory and files that are now provided by xsane-common - rm -rf "$MANPAGE" + if [ -f "$MANPAGE" ]; then + rm -rf "$MANPAGE" + fi + fi fi + + + #DEBHELPER# |