dex icon indicating copy to clipboard operation
dex copied to clipboard

no whatis in Arch linux

Open igorzhilin opened this issue 9 months ago • 5 comments

When there's no whatis on the system, this part fails, and dex as well.

				if os.name == 'posix':
					whatis = subprocess.Popen(['whatis', filename], stdout=subprocess.PIPE, stderr=subprocess.PIPE)
					stdout, stderr = whatis.communicate()
					res = stdout.decode(sys.stdin.encoding).split('- ', 1)
					if len(res) == 2:
						de.set_value('Comment', res[1].split(os.linesep, 1)[0])

igorzhilin avatar Mar 13 '25 15:03 igorzhilin

Apologies for the noise, I wrote that really late :)

stuaxo avatar Mar 14 '25 14:03 stuaxo

Maybe, we should implement our own whatis, i.e. test existence of program in $PATH.

jceb avatar Mar 17 '25 09:03 jceb

There is also whereis which might be more appropriate if nothing from the manpage is needed, and which.

stuaxo avatar Mar 17 '25 10:03 stuaxo

There is also whereis which might be more appropriate if nothing from the manpage is needed, and which.

Neither whereis nor which is standard. The standard is command -v. I don't know what the standard equivalent of whatis is.

In any case, it would be really weird if ArchLinux doesn't allow whatis to be installed. I'm not an Arch user, but it seems to have the biggest collection of packages. In fact, I found this project when I did a DDG search about the XDG Autostart specification and the ArchLinux Wiki article was the top result. I don't know how you search for which package contains a file in ArchLinux; in RPM-based distros, you use dnf provides or dnf rq -f.

So for me:

$ dnf provides whatis
man-db-2.11.2-1.mga9.i586 : Tools for searching and reading man pages
Deponejo    : mageia-i586
Kongruita de:
Dosiernomo  : /usr/bin/whatis

man-db-2.11.2-1.mga9.x86_64 : Tools for searching and reading man pages
Deponejo    : @System
Kongruita de:
Dosiernomo  : /usr/bin/whatis

man-db-2.11.2-1.mga9.x86_64 : Tools for searching and reading man pages
Deponejo    : local
Kongruita de:
Dosiernomo  : /usr/bin/whatis

man-db-2.11.2-1.mga9.x86_64 : Tools for searching and reading man pages
Deponejo    : mageia-x86_64
Kongruita de:
Dosiernomo  : /usr/bin/whatis
$ dnf rq -f */whatis
bash-completion-2:2.11-2.mga9.noarch
bash-doc-0:5.2.15-2.mga9.i586
bash-doc-0:5.2.15-2.mga9.x86_64
man-db-0:2.11.2-1.mga9.i586
man-db-0:2.11.2-1.mga9.x86_64

That includes things that contain whatis but not /usr/bin/whatis (perhaps a better pattern would be */*bin/whatis):

$ dnf rq -l bash-completion | grep whatis
/usr/share/bash-completion/completions/whatis

keithbowes avatar Jul 02 '25 02:07 keithbowes

from the manpages: the whatis command is included with the package man-db in the core repo. installing it did the trick. perhaps a quicker to implement band-aid solution could be to adjust the error message to include a clearer explanation of this but this seems more like an enhancement than an urgent issue

DinoSour69 avatar Aug 08 '25 06:08 DinoSour69