man-db-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Man-db-devel] [PATCH v2 1/2] src/tests: Fix man-9 depending on --ov


From: Mihail Konev
Subject: Re: [Man-db-devel] [PATCH v2 1/2] src/tests: Fix man-9 depending on --override_dir
Date: Thu, 5 Jan 2017 21:16:09 +0500

On Thu, Jan 05, 2017 at 08:56:22PM +0500, Mihail Konev wrote:
> On Thu, Jan 05, 2017 at 12:20:09PM +0100, Nikola Forró wrote:
> > On Tue, 2017-01-03 at 01:46 +0500, Mihail Konev wrote:
> > > The man() in src/man.c calls sort_candidates(), so -w option sorts
> > > its output before displaying.
> > > As value of override_dir affects paths to pages used in the test,
> > > it also affects the output which is being checked.
> > > 
> > > Sort outputs before comparing them.
> > > 
> > > Reported-by: Nikola Forró <address@hidden>
> > > ---
> > > v2: sort both outputs, not only the reference one
> > > 
> > >  src/tests/man-9 | 6 +++---
> > >  1 file changed, 3 insertions(+), 3 deletions(-)
> > > 
> > 
> > Hi Mihail,
> > this indeed fixes the test, but not the real use case for override dir.
> > 
> > The point of override dir is that overriden path has to be higher in
> > the path list than the path it overrides, so that overriden man page is
> > shown instead of the original one.
> > 
> > So either sort_candidates() function should prioritize paths containing
> > OVERRIDE_DIR, or the inclusion of overriden paths should happen only
> > after the path list is sorted.
> 
> In a show-single-page case, the page from override dir should be shown anyway,
> as it would be noticed first.
> 
> When showing any available pages (with or without the -w),
> the override-vs-non-ov. order probably doesn't matter much.
> 
> Tagging as 'from-override' and sorting accordingly can be done,
> but it would not be a simple incremental change.
> 

BTW, is there any reason for sort_candidates() to exist?



reply via email to

[Prev in Thread] Current Thread [Next in Thread]