List Info

Thread: --findoptions no




--findoptions no
country flaguser name
United States
2008-03-26 19:13:47
I spoke too soon.  --findoptions is not being sufficient.  I
tried simply

  updatedb --findoptions="-type f"

to try to get it to only index plain files.

But this had the highly undesirable side effect of ignoring
the pruning
expressions.  Looking at the code:

    $find $SEARCHPATHS $FINDOPTIONS 
     ( $prunefs_exp 
     -type d -regex "$PRUNEREGEX" ) -prune -o
$print_option

Clearly the -type f has the effect of making $PRUNEREGEX
never match,
since the latter is only checked against directories.

Which is why I ended up with what I was doing before, where
I manually
put the  -type f  into $print_option.

I don't see a way to play with the variables to get the
-type f to be
effective, but I really want that, since it reduces the
useless matches
(for my usage pattern) greatly.

Any ideas?

Thanks,
k



Re: --findoptions no
user name
2008-03-27 05:14:21
On Thu, Mar 27, 2008 at 12:13 AM, Karl Berry <karlfreefriends.org> wrote:
> I spoke too soon.  --findoptions is not being
sufficient.  I tried simply
>
>   updatedb --findoptions="-type f"
>
>  to try to get it to only index plain files.
>
>  But this had the highly undesirable side effect of
ignoring the pruning
>  expressions.  Looking at the code:
>
>     $find $SEARCHPATHS $FINDOPTIONS 
>      ( $prunefs_exp 
>      -type d -regex "$PRUNEREGEX" ) -prune
-o $print_option
>
>  Clearly the -type f has the effect of making
$PRUNEREGEX never match,
>  since the latter is only checked against directories.
>
>  Which is why I ended up with what I was doing before,
where I manually
>  put the  -type f  into $print_option.
>
>  I don't see a way to play with the variables to get
the -type f to be
>  effective, but I really want that, since it reduces
the useless matches
>  (for my usage pattern) greatly.
>
>  Any ideas?

I can't think of a way that doesn't involve editing the
updatedb script.  Sorry.

James.



[1-2]

about | contact  Other archives ( Real Estate discussion Medical topics )