Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 723322 - app-eselect/eselect-awk can't handle awk man pages compressed with xz
Summary: app-eselect/eselect-awk can't handle awk man pages compressed with xz
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Christoph Junghans (RETIRED)
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2020-05-16 07:18 UTC by Andrew Savchenko
Modified: 2021-10-19 09:50 UTC (History)
3 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
emerge --info (emerge.info,8.94 KB, text/plain)
2020-05-16 07:18 UTC, Andrew Savchenko
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Andrew Savchenko gentoo-dev 2020-05-16 07:18:59 UTC
Created attachment 639498 [details]
emerge --info

Hi!

eselect-awk assumes fixed list of compressed man page file extensions:
    rm -f "${EROOT}"/usr/share/man/man1/awk.1{,.bz2,.gz,lzma}
    for x in ".1" ".1.bz2" ".1.gz" ".1.lzma" ; do

This is wrong, since user may use any compress algo and with using one not listed here (e.g. xz) it leads to a problem:

# eselect awk set 2
Couldn't find a man page for mawk; skipping.
Comment 1 Andrew Savchenko gentoo-dev 2020-05-16 07:20:31 UTC
IMHO it will be better to change check to only ".1" and ".1.*" patterns.
Comment 2 Ionen Wolkens gentoo-dev 2020-05-16 10:31:12 UTC
(In reply to Andrew Savchenko from comment #1)
> IMHO it will be better to change check to only ".1" and ".1.*" patterns.
Agreed for something like that, I use .zst man pages myself which wouldn't be supported either (although zst man pages have other problems, so I doubt many use them right now).
Comment 3 Christoph Junghans (RETIRED) gentoo-dev 2020-05-16 15:03:31 UTC
I think I stole that logic from eselect-vi.

eselect-python has the same logic as well.

@mgorny: any idea how to best fix it for all of them?
Comment 4 Ionen Wolkens gentoo-dev 2020-05-16 15:45:11 UTC
But yeah, on second thought, wildcards are scary in any automated things. If were to ask me, I feel need a inherit function (either to get compression formats, or straight up handle man page directly) rather than try to share the code like this. Adding formats would be easy then.

I was user-patching eselect-python myself for .zst, although that one has .xz at least (zst is not very relevant right now because man-db doesn't support it without a patch, so I wasn't sure if I should report those things).
Comment 5 Larry the Git Cow gentoo-dev 2020-05-16 20:41:29 UTC
The bug has been closed via the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=997ccf6a65158850ee3107c9c01cc18ce1b67473

commit 997ccf6a65158850ee3107c9c01cc18ce1b67473
Author:     Christoph Junghans <junghans@gentoo.org>
AuthorDate: 2020-05-16 20:39:47 +0000
Commit:     Christoph Junghans <junghans@gentoo.org>
CommitDate: 2020-05-16 20:41:14 +0000

    app-eselect/eselect-awk: version bump
    
    Closes: https://bugs.gentoo.org/723322
    Package-Manager: Portage-2.3.99, Repoman-2.3.22
    Signed-off-by: Christoph Junghans <junghans@gentoo.org>

 app-eselect/eselect-awk/Manifest               |  1 +
 app-eselect/eselect-awk/eselect-awk-0.3.ebuild | 18 ++++++++++++++++++
 app-eselect/eselect-awk/metadata.xml           |  6 +-----
 3 files changed, 20 insertions(+), 5 deletions(-)