On Wed, Jul 20, 2022 at 05:05:03PM +0200, Martin Quinson wrote:
> It would be great if man-db could hint about uninstalled manpages. One 
> possible
> use-case would be when requesting the manpage of pthread_mutex_create when
> glibc-doc is not installed.
> 
> Right now, it displays: "No manual entry for pthread_mutex_create"
> 
> My idea is that it would be much more user-friendly to display something like
> "The manual entry of pthread_mutex_create is not available. Please install the
> package glibc-doc to retrieve it."
> 
> I understand that the information requires a global knowledge over the archive
> and that it will be outdated very easily. I still think that it'd be a good
> improvement for our users to provide this information. Several implementations
> are possible, such as an external package providing the information about all
> existing packages in the Debian archive. It should be possible to keep it 
> kinda
> up to date in testing, and almost perfectly up to date in stable, I think.
> 
> I would be interested in helping here, but I first need to know about your
> feeling about this feature. There is no point thinking of an infrastructure to
> retrieve the info if you don't want to include this feature at the end.

I agree it would be helpful to have such a feature.

My first instinct is that it would make a lot of sense to work rather
similarly to command-not-found or AppStream, ideally sharing
infrastructure if possible; it would be a shame to have to add another
piece of infrastructure like that when there are at least two that
already exist and are somewhat similar.  (I think the approach of having
to keep a package up-to-date in the archive with all the data is a
rather old-fashioned one that we should try to avoid if possible.)

The job is a bit harder than for today's command-not-found though,
because it would need to handle things like .so links in manual pages
that can't be derived solely from file names.  Maybe it would make sense
for debhelper to scan pages at package build time and add control
fields, or perhaps something like the machinery that builds the
AppStream catalog could run lexgrog over everything and see what names
it reports.

Anyway, in terms of what could be done in man-db, I think I'd be willing
to add some kind of simple hook interface along the lines of bash's
command_not_found_handle, and then something could be plugged into that.
I don't think I have time to work on the infrastructure for implementing
such a hook, but I do have some experience with implementing this sort
of thing in Ubuntu and would be happy to give advice on things that seem
like they'd fit most easily into archive infrastructure (both in
Ubuntu's which I know professionally, and in what I know of Debian's).

Thanks, and sorry for the slow response,

-- 
Colin Watson (he/him)                              [cjwat...@debian.org]

Reply via email to