diff -Nru less-551/debian/changelog less-551/debian/changelog --- less-551/debian/changelog 2019-09-15 02:28:16.000000000 +0000 +++ less-551/debian/changelog 2020-07-01 23:25:13.000000000 +0000 @@ -1,3 +1,12 @@ +less (551-1ubuntu0.1) focal; urgency=medium + + * On upgrade from packages that shipped less in both /bin and /usr/bin, + call update-alternatives in preinst, such that after unpacking, + /usr/bin/pager remains operational. This should resolve dpkg failing + to invoke pager by dpkg. LP: #1874953 + + -- Brian Murray Wed, 01 Jul 2020 16:25:13 -0700 + less (551-1) sid; urgency=low * many thanks to Anibal Monsalve Salazar for a decade worth of contributions diff -Nru less-551/debian/control less-551/debian/control --- less-551/debian/control 2019-09-13 05:23:24.000000000 +0000 +++ less-551/debian/control 2020-06-05 15:18:51.000000000 +0000 @@ -1,7 +1,8 @@ Source: less Section: text Priority: important -Maintainer: Milan Kupcevic +Maintainer: Ubuntu Developers +XSBC-Original-Maintainer: Milan Kupcevic Build-Depends: debhelper (>= 12), libncurses-dev diff -Nru less-551/debian/preinst less-551/debian/preinst --- less-551/debian/preinst 1970-01-01 00:00:00.000000000 +0000 +++ less-551/debian/preinst 2020-06-05 15:18:51.000000000 +0000 @@ -0,0 +1,18 @@ +#!/bin/sh + +set -e + +case "$1" in + upgrade) + if dpkg --compare-versions "$2" le "551-1"; then + update-alternatives --quiet --install /usr/bin/pager pager \ + /usr/bin/less 77 --slave /usr/share/man/man1/pager.1.gz \ + pager.1.gz /usr/share/man/man1/less.1.gz + update-alternatives --quiet --remove pager /bin/less + fi + ;; +esac + +#DEBHELPER# + +exit 0