Skip to main content
Topic solved
This topic has been marked as solved and requires no further attention.
Topic: Incompplete Man Pages (Read 2550 times) previous topic - next topic
0 Members and 1 Guest are viewing this topic.

Incompplete Man Pages

man -k never works.  There is a substantial and useful part of the core unix help system that seems to be missing from the standard distro.

Can't we just lift the man database right out of slackware or something?

Re: Incompplete Man Pages

Reply #1
I'm not sure what you mean. Either:

You installed something but the man database isn't updated so man -k isn't showing up any results:
Code: [Select]
sudo mandb 
(Yes root access is required.)

Or manpages are not included in the installation in some programs.
If this then I'm going to assume that this post is for the Artix devs.

for the latter a good example might be:
7zip has no manpages, but p7zip has.
Code: [Select]
pacman -Fl 7zip | grep 'usr/share/man'
vs
pacman -Fl p7zip | grep 'usr/share/man'

edit: p7zip is only within the omniverse repo

Re: Incompplete Man Pages

Reply #2
I am not sure how I produced confusion.  I appologize. 

There is a man pacman for man-pages

flatbush:[ruben]:~$ sudo pacman -Ss  man-pages
system/man-pages 6.14-1 [installed]
    Linux man pages


and one for a great many languages.

But it is common to use
man -k

that database is empty and highly useful when one wants to explore different tools.

BTW - THIS
sudo mandb


Does fix the problem but this should work out of the box without intervention.  Thank you for the tip.

Re: Incompplete Man Pages

Reply #3
but this should work out of the box without intervention.
That's debatable.

Prior to the introduction of systemd Arch (AFAIKT) did no automatic updating of mandb. Then with systemd they started using a timer service to update mandb daily. Briefly, in 2016, they switched to a pacman hook (probably because they'd just created pacman hooks and wanted to use them?) before reverting back to the timer

It could be argued that as an Arch derived distro Artix should mirror Arch's behaviour in updating the mandb periodically or use pacman hooks to do so.
It could also be argued that as an Arch based distro without systemd Artix is simply doing what Arch did before systemd i.e. nothing (caveat 'I think').

If you want your mandb bang up to date after every upgrade a hook in /etc/pacman.d/hooks is probably the way to go.
This will of course slow down the process.
I did not know any of this until just now so I thank you for that.

Re: Incompplete Man Pages

Reply #4
@mrbrklyn

As what Gripped said it's done with soystemd these days and the alternative is that a pacman hook can be set.

Another way of this is to automate this with a daily cron job.
https://wiki.archlinux.org/title/Cron

If you are unaware it's a program that runs programs/scripts repeatedly on a set schedule (every minute, hourly, daily, weekly, monthly, yearly, or a custom schedule like every 1pm, 9pm of every other week in every 2 months for example.)

If the wiki is confusing (for me it is), this is also a good source: https://www.youtube.com/watch?v=7cbP7fzn0D8

Re: Incompplete Man Pages

Reply #5
but this should work out of the box without intervention.
That's debatable.

Prior to the introduction of systemd Arch (AFAIKT) did no automatic updating of mandb. Then with systemd they started using a timer service to update mandb daily. Briefly, in 2016, they switched to a pacman hook (probably because they'd just created pacman hooks and wanted to use them?) before reverting back to the timer

It could be argued that as an Arch derived distro Artix should mirror Arch's behaviour in updating the mandb periodically or use pacman hooks to do so.
It could also be argued that as an Arch based distro without systemd Artix is simply doing what Arch did before systemd i.e. nothing (caveat 'I think').

If you want your mandb bang up to date after every upgrade a hook in /etc/pacman.d/hooks is probably the way to go.
This will of course slow down the process.
I did not know any of this until just now so I thank you for that.


This has nothing to do with systemd.  Man pages has been a core part of Unix systems since the inception at AT&T (actually I don't know that but I am guessing since it has been taught to me to use them since 1994 or so).    If you want to know how sound works, you can run
Code: [Select]
man -k sound

It is a core part of the unix design  How it is implement is a design decision.  Not having it implemented at all,  that is an error in judgement.

or if you code

Code: [Select]
man -k printf

Re: Incompplete Man Pages

Reply #6
To get history right, 'man' is a core piece of old UNIX, while 'man -k' for accessing the database is not quite so.
See for instance man page for man from 7th Ed UNIX, where '-k' does something very different. (Yes, I know that's from 46 years ago. But still. That's oldcore UNIX!)

I for one use 'man' a lot, 'man -k' never. So for me building the database would be a waste of resources. I say let those who want it generate it. I'm not arguing that it wouldn't be a good functionality. I'm sure it is. But not everybody needs it.


Re: Incompplete Man Pages

Reply #8
This has nothing to do with systemd.
Okey-doke.
You can lead a horse to water but you can't make him think....


Neee Neee

Why do cows have bells?

man man

Quote
HISTORY
       1990, 1991 – Originally written by John W. Eaton ([email protected]).
 
       Dec 23 1992: Rik Faith ([email protected]) applied bug fixes supplied  by
       Willem Kasdorp ([email protected]).
 
       30th  April 1994 – 23rd February 2000: Wilf. ([email protected])
       has been developing and maintaining this package with the help of a  few
       dedicated people.
 
       30th  October  1996  –  30th  March 2001: Fabrizio Polacco <fpolacco@de‐
       bian.org> maintained and enhanced this package for the  Debian  project,
       with the help of all the community.
 
       31st March 2001 – present day: Colin Watson <[email protected]> is now
       developing and maintaining man-db.
 

Re: Incompplete Man Pages

Reply #9

That's debatable.

Prior to the introduction of systemd Arch (AFAIKT) did no automatic updating of mandb. Then with systemd they started using a timer service to update mandb daily. Briefly, in 2016, they switched to a pacman hook (probably because they'd just created pacman hooks and wanted to use them?) before reverting back to the timer

It could be argued that as an Arch derived distro Artix should mirror Arch's behaviour in updating the mandb periodically or use pacman hooks to do so.
It could also be argued that as an Arch based distro without systemd Artix is simply doing what Arch did before systemd i.e. nothing (caveat 'I think').

This has nothing to do with systemd.

But it does:
On the first sentence in the Cron arch page link I gave above:
Quote
There are many cron implementations, but none of them are installed by default as the base system uses systemd/Timers instead.
I looked into their gitlab site, but I can't find anything that's too old.
In the forums there seems to be implications that Cron was used in tandem with mandb.
https://bbs.archlinux.org/viewtopic.php?id=93244


and it seems to solidify (not conclusive but good enough) gripped's assumption of:
It could also be argued that as an Arch based distro without systemd Artix is simply doing what Arch did before systemd i.e. nothing (caveat 'I think').
https://bbs.archlinux.org/viewtopic.php?pid=616805#p616805



Checked in my kvm endeavouros:
Code: [Select]
cat /usr/lib/systemd/system/timers.target.wants/man-db.timer

[Unit]
Description=Daily man-db regeneration
Documentation=man:mandb(8)

[Timer]
OnCalendar=daily
RandomizedDelaySec=12h
Persistent=true

[Install]
WantedBy=timers.target


It is a core part of the unix design  How it is implement is a design decision.  Not having it implemented at all,  that is an error in judgement.

To understand, in what you're really implying for is that Artix should have already installed Cron by default or something similar that would automate mandb?

Re: Incompplete Man Pages

Reply #10
I have never seen a working distro since the early 1990s and before without a working man and apropos

until now

Re: Incompplete Man Pages

Reply #11
You are making yourself look silly again. Just saying.

Re: Incompplete Man Pages

Reply #12
You are making yourself look silly again. Just saying.


It is not silly to expect  the Man Pages to work correctly out of the box.  I don't even know why we are in a side conversation about systemd and the history of Arch.  And I have no idea why you are making this personal.

Early Linux versions came, not only, with complete man pages, but a series of HowTo's that were critical learning tools.  This was all YEARS befores  Judd Vinet started Arch in March 2002.  The Howtos taught about terminals, ttys, init systems, socket programming, semiphores, pipes, routing strategy, packet filtering etc etc.

 The Man pages would let you find programs to tasks and syntax for core C and C++ programming, not to mention use of Make and autoconf.


Re: Incompplete Man Pages

Reply #13

This has nothing to do with systemd.

But it does:
On the first sentence in the Cron arch page link I gave above:
Quote
There are many cron implementations, but none of them are installed by default as the base system uses systemd/Timers instead.
I looked into their gitlab site, but I can't find anything that's too old.
In the forums there seems to be implications that Cron was used in tandem with mandb.
https://bbs.archlinux.org/viewtopic.php?id=93244


and it seems to solidify (not conclusive but good enough) gripped's assumption of:
It could also be argued that as an Arch based distro without systemd Artix is simply doing what Arch did before systemd i.e. nothing (caveat 'I think').
https://bbs.archlinux.org/viewtopic.php?pid=616805#p616805



Checked in my kvm endeavouros:
Code: [Select]
cat /usr/lib/systemd/system/timers.target.wants/man-db.timer

[Unit]
Description=Daily man-db regeneration
Documentation=man:mandb(8)

[Timer]
OnCalendar=daily
RandomizedDelaySec=12h
Persistent=true

[Install]
WantedBy=timers.target


It is a core part of the unix design  How it is implement is a design decision.  Not having it implemented at all,  that is an error in judgement.

To understand, in what you're really implying for is that Artix should have already installed Cron by default or something similar that would automate mandb?


If I am no mistaken, cron IS installed by default.  Why would it not be?  How else do you do routine timely system maintenance like rotating system logs etc?

Re: Incompplete Man Pages

Reply #14
It is not silly to expect  the Man Pages to work correctly out of the box.  I don't even know why we are in a side conversation about systemd and the history of Arch.  And I have no idea why you are making this personal.
What's silly is to have it explained how we got to where we are at with the little used 'man -k' & 'man -f' not working, unless you manually update the database, and then state "This has nothing to do with systemd". Because it's handled by systemd on Arch. Handled by nothing on Artix. To me that's a systemd involvement even if indirectly.

I wonder about this: As someone who's used Artix a long time how is it you've only just noticed that  'man -k' & 'man -f' don't work 'out of the box'? One might suspect that it's not actually a feature you use much at all? Or have you just been stewing on this for years, regularly running 'man-k', discovering it still doesn't work, but doing nothing to remedy it. Because that might also be considered a bit silly by some. Certainly by me.

Your original post was
Quote
man -k never works.  There is a substantial and useful part of the core unix help system that seems to be missing from the standard distro.

Can't we just lift the man database right out of slackware or something?
Lift it out of Slackware ?
How about you just read the man page for man ? (bit ironic really)
Quote
u, --update

This option causes man to update its database caches of installed manual pages. This is only needed in rare situations, and it is normally better to run mandb(8) instead

man mandb
Quote
NAME

mandb - create or update the manual page index caches

I took no position in whether or not Artix should update mandb automatically. But on consideration I think, if anything, it should be a periodic thing, not a pacman hook, as the later would introduce regular lengthening of the time taken to complete pacman upgrades and installs for a feature used by very few. A cron job would not cover everyone as no cron is installed by default on a base install.

The thread started silly and just gets sillier :)