diff options
author | Michał Górny <mgorny@gentoo.org> | 2022-12-05 16:17:13 +0100 |
---|---|---|
committer | Sam James <sam@gentoo.org> | 2022-12-06 09:15:49 +0000 |
commit | d4c96a45f9e0c5401a6d4df4867dc85348fd7989 (patch) | |
tree | f520630d5e33bdafd1ab85e6b306dd05bc471e5e /app-alternatives/awk | |
parent | x11-libs/libICE: drop 1.1.0 (diff) | |
download | gentoo-d4c96a45f9e0c5401a6d4df4867dc85348fd7989.tar.gz gentoo-d4c96a45f9e0c5401a6d4df4867dc85348fd7989.tar.bz2 gentoo-d4c96a45f9e0c5401a6d4df4867dc85348fd7989.zip |
app-alternatives/awk: Clean up stale manpages from eselect-awk
Closes: https://bugs.gentoo.org/884427
Signed-off-by: Michał Górny <mgorny@gentoo.org>
Closes: https://github.com/gentoo/gentoo/pull/28551
Signed-off-by: Sam James <sam@gentoo.org>
Diffstat (limited to 'app-alternatives/awk')
-rw-r--r-- | app-alternatives/awk/awk-3.ebuild (renamed from app-alternatives/awk/awk-2.ebuild) | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/app-alternatives/awk/awk-2.ebuild b/app-alternatives/awk/awk-3.ebuild index c20aa0953478..d722129ee333 100644 --- a/app-alternatives/awk/awk-2.ebuild +++ b/app-alternatives/awk/awk-3.ebuild @@ -44,6 +44,27 @@ src_install() { fi } +pkg_preinst() { + local v + for v in ${REPLACING_VERSIONS}; do + # if we are upgrading from a new enough version, leftover manpage + # symlink cleanup was done already + if ver_test "${v}" -ge 3; then + return + fi + done + + # otherwise, remove leftover files/symlinks created by eselect-awk (sic!) + shopt -s nullglob + local files=( "${EROOT}"/usr/share/man/man1/awk.1* ) + shopt -u nullglob + + if [[ ${files[@]} ]]; then + einfo "Cleaning up leftover manpage symlinks from eselect-awk ..." + rm -v "${files[@]}" || die + fi +} + pkg_postrm() { # make sure we don't leave the user without the symlinks, since # they've not been owned by any other package |