You are not logged in.

#1 2017-07-03 21:43:48

gauthma
Member
Registered: 2010-02-16
Posts: 215
Website

[Solved] Man-pages for uninstalled packages?

I've been a linux user for quite a few years, but I feel this might actually be somewhat of a noob question... Earlier today I was running a script that uses the `time` command, along with a simple format string. It wasn't working, even though the `time` command, with no arguments, worked as (at least I) would expect. It took a while to notice that it gave an error when I tried running with the -f option (it complained that *bash* new of no such option). This, it turns out, was because the *gnu time* program was actually *not installed* -- what I was running was actually a bash built-in. But the reason I'm writing is that, even though the program was not installed, **its man page was**!!

Its man page, it turns out, belongs to the man-pages package. So my question is... is this something to be expected (to have the man page available for stuff that is *not* available), or should I go post a new entry to arch-bugs?

Last edited by gauthma (2017-07-05 07:37:17)

Offline

#2 2017-07-03 22:36:31

Trilby
Inspector Parrot
Registered: 2011-11-29
Posts: 29,579
Website

Re: [Solved] Man-pages for uninstalled packages?

See the COLOPHON in that man page.  Also note that the -f flag is not listed under OPTIONS.  It is listed under the subheading "Gnu options" under the heading "GNU VERSION".


"UNIX is simple and coherent..." - Dennis Ritchie, "GNU's Not UNIX" -  Richard Stallman

Offline

#3 2017-07-04 08:57:16

gauthma
Member
Registered: 2010-02-16
Posts: 215
Website

Re: [Solved] Man-pages for uninstalled packages?

Duly noted, but I point out the following: in the COLOPHON, the url https://www.kernel.org/doc/man-pages/ is given, where one can read that man-pages includes a very few Section 1 pages that document programs supplied by the GNU C library. Following the relevant link (http://man7.org/linux/man-pages/dir_section_1.html), it indeed lists both time(1p) and time(1); the latter being the man page in question that refers to GNU version of `time`.

So doesn't this mean that GNU time program ought to be installed along with glibc? Note that besides the bash builtin, I had no program named "time" previously installed (GNU version or not).

Last edited by gauthma (2017-07-04 08:58:44)

Offline

#4 2017-07-04 09:59:11

Trilby
Inspector Parrot
Registered: 2011-11-29
Posts: 29,579
Website

Re: [Solved] Man-pages for uninstalled packages?

You did not have a package called "time", but you did have a command time provided by bash.

You have a point that that website, and the man pages, are very GNU-centric which I find unfortunate.  But you are taking that a bit out of context.  The first sentence is the real description:

The Linux man-pages project documents the Linux kernel and C library interfaces that are employed by user-space programs.

There are many different implementations of C libraries and different POSIX user-space providers.  There is a standard of behavior - a set of commands and minimal parameters - that any POSIX system must provide.  The man-pages document that standardized interface.

GNU's glibc, coreutils, and other programs are only one instantiation of that interface.  It is the most popular one at the moment, and so more and more documentation is just assuming that everyone uses everything GNU.  This is noted in the second sentence on that website:

With respect to the C library, the primary focus is the GNU C library (glibc), although, where known, documentation of variations on other C libraries available for Linux is also included.

I wish that wasn't the primary focus, but it is.  However, the very fact that they note that this is the primary focus implies it is not the sole focus.  These are not GNU-invented tools; the GNU simply made one implementation of them.

If you are running a linux system, you should have these tools available in some form.  On arch linux, you can use the [extra]/time package, or you can use the bash builting `time`.  On other distros `time` might be provided by another shell, or by busybox.  Every implementation of `time` must meet the same minimum standards documented in the man-page for the `time` interface.  They can each add on as much as they want after that, as long as they meet the minimum standards.

So in conclusion, I think your question can be partitioned into two: 1) why do you have a man page for `time` at all? and 2) why is there such of a focus on gnu's time in the man-page project?  For 1 the answer is what I've been getting at above.  For 2, I have no good answer - the only real answer is popularity and momentum.  As a bit of an aside, I'm currently experimenting with systems with as little GNU-stuff as possible.  I'm considering even switching to BSD due to the linux kernel being GPL.  Any value judgements aside, this is a interesting learning experience that reveals how much there is out there that is not GNU an at the same time how much the GNU is just assumed to be the one-and-only libc and userland.


"UNIX is simple and coherent..." - Dennis Ritchie, "GNU's Not UNIX" -  Richard Stallman

Offline

#5 2017-07-04 19:18:55

gauthma
Member
Registered: 2010-02-16
Posts: 215
Website

Re: [Solved] Man-pages for uninstalled packages?

So to sum up, bash's builtin `time` does the minium required by POSIX, and the GNU extension is something that is not required (by POSIX), and that explains why it is not available by default, even though it is described in the man pages (due to these being very gnu centric). Correct?

Offline

#6 2017-07-04 19:52:50

Trilby
Inspector Parrot
Registered: 2011-11-29
Posts: 29,579
Website

Re: [Solved] Man-pages for uninstalled packages?

Pretty much - but this strikes me as a little odd:

gauthma wrote:

and that explains why it is not available by default

The gnu version of time is not available because you didn't install it.  If you mean "by default" to mean in the arch linux base group, then the explanation for that is that the arch devs didn't see a need for this gnu version of time to be included in a base install.

Personally, I'd prefer it if the man-pages (i.e. the man-pages project) stuck with the POSIX standards - but it's not my call.


"UNIX is simple and coherent..." - Dennis Ritchie, "GNU's Not UNIX" -  Richard Stallman

Offline

#7 2017-07-05 07:36:33

gauthma
Member
Registered: 2010-02-16
Posts: 215
Website

Re: [Solved] Man-pages for uninstalled packages?

Thank you for your help in clarifying this!

Offline

Board footer

Powered by FluxBB