Summary: | sys-apps/file-5.03 --exclude text or -e text fails (contrary to man page) | ||
---|---|---|---|
Product: | Gentoo Linux | Reporter: | ferret <ferret-bgo> |
Component: | [OLD] Core system | Assignee: | Gentoo's Team for Core System packages <base-system> |
Status: | RESOLVED FIXED | ||
Severity: | normal | CC: | SebastianLuther |
Priority: | High | ||
Version: | unspecified | ||
Hardware: | All | ||
OS: | Linux | ||
Whiteboard: | |||
Package list: | Runtime testing required: | --- | |
Attachments: | file(1) man page (converted to plain text) |
Description
ferret
2009-05-17 22:39:39 UTC
There is no such option in the man page. Sure you read the man page coming from the package? It's there. I even looked in the source tarball file-5.03.tar.gz. It is definitely in the man page. Sorry, the translations are outdated. Could you please give some examples? Created attachment 191741 [details]
file(1) man page (converted to plain text)
Here is the file(1) man page that is installed by file-5.03 on my system.
At least I couldn't find anything in file's ChangeLog about the removal of -e/--exclude option... post actual commands and test files. seems to work fine for me: $ file --version file-5.03 magic file from /usr/share/misc/magic $ echo 'main(){}' > test.c $ file test.c test.c: ASCII text $ file -e ascii test.c test.c: data You have in fact demonstrated another part of the problem. Sorry, the report is unclear. When I say '-e text' I mean literally, '-e text'. The word 'text'. $ file -e ascii test.c test.c: data $ file -e text test.c Usage: file [-bcikLhnNrsvz0] [-e test] [-f namefile] [-F separator] [-m magicfiles] file... file -C -m magicfiles Try `file --help' for more information. In the man page '-e ascii' is not documented as a valid test, whereas '-e text' is. From the man page (attached to this bug report): -e, --exclude testname Exclude the test named in testname from the list of tests made to determine the file type. Valid test names are: apptype EMX application type (only on EMX). text Various types of text files (this test will try to guess the text encoding, irrespective of the setting of the ‘encoding’ option). encoding Different text encodings for soft magic tests. tokens Looks for known tokens inside text files. cdf Prints details of Compound Document Files. compress Checks for, and looks inside, compressed files. elf Prints ELF file details. soft Consults magic files. tar Examines tar files. Note no mention of an 'ascii' testname nothing says "text" is a valid test, so i dont see any bug here What? Are we looking at the same text here? Did you actually read any of what I've said? The man page said -e is followed by one of several test names. It then says (I quote): "Valid test names are:", followed by a list of the test names. Here is that list: apptype text encoding tokens cdf compress elf soft tar Here for you I shall try each one of those in turn. Can you spot the odd one out? $ file -e apptype test.c test.c: ASCII text $ file -e text test.c Usage: file [-bcikLhnNrsvz0] [-e test] [-f namefile] [-F separator] [-m magicfiles] file... file -C -m magicfiles Try `file --help' for more information. $ file -e encoding test.c test.c: ASCII text $ file -e tokens test.c test.c: ASCII text $ file -e cdf test.c test.c: ASCII text $ file -e compress test.c test.c: ASCII text $ file -e elf test.c test.c: ASCII text $ file -e soft test.c test.c: ASCII text $ file -e tar test.c test.c: ASCII text $ seems the bug didnt exist in older man pages and for some reason, on my system, the old man page was staying cached in /var/cache/man/ and it wasnt actually showing me a newer one I contacted the author for 3 gentoo bugs about sys-apps/file-5.0{3,4}, and he says this bug is fixed on head. |