bugfindutils - Bugs: bug #22467, updatedb: --prunepaths doesn't...

 
 

bug #22467: updatedb: --prunepaths doesn't allow directories with whitespace

Submitter:  Richard Cobbe <cobbe>
Submitted:  Mon 03 Mar 2008 04:49:22 PM UTC
   
 
Category:  updatedb Severity:  3 - Normal
Item Group:  Wrong result Status:  Postponed
Privacy:  Public Assigned to:  None
Originator Name:  Richard Cobbe Open/Closed:  Open
Release:  4.2.20 Fixed Release:  None
* Mandatory Fields

Add a New Comment Rich Markup
   

Mon 10 Jan 2011 09:31:47 PM UTC, comment #4: 

As updatedb is currently implemented with find it is possible to use patterns which are then passed as prune arguments. So this is a workaround I use: /path/to/directory?with?space and it works. Of course it matches a bit too much but I have not had problems with that. Of course you could use also some other pattern-based workaround.

Mitar <mitar>
Sun 11 Apr 2010 11:57:53 AM UTC, comment #3: 

updatedb would probably be best rewritten.   I'm going to mark the updatedb-related bus as "Postponed" in order to consider them all in a batch, when I get around to the rewrite.

(Leslie P. Polzer did start on a rewrite some time back as part of the Summer of Code but there are some updatedb-related issues his changes don't resolve yet, I think)

James Youngman <jay>
Group administrator
Tue 04 Mar 2008 03:26:44 PM UTC, comment #2: 

Sounds great.  Moving away from the shell to avoid (or at least reduce) quoting problems and supporting multiple --prunepath options are definitely good moves.  And maintaining backward compatibility by providing a new option with the correct semantics makes sense -- just so long as the correct semantics are available!

I did a quick scan of the C implementation of updatedb, and it doesn't look like it implements the desired semantics yet, so I haven't tried it out.  But I'm looking forward to the new version!

Richard Cobbe <cobbe>
Tue 04 Mar 2008 10:17:26 AM UTC, comment #1: 

See also bug #19374.   The plan is to replace the current shell script with a C program.  Leslie Polzer has already written this.   His code has yet to be merged but it is available at http://repo.or.cz/w/findutils.git?a=tree;h=polzer;hb=polzer.

The C program will probably accept multiple --prunepaths options, allowing us (probably) to deprecate the use of the space character within the option argument as a separator.    It may be necessary to maintain backward compatibility somehow by using a new option with the imporved semantics, instead of changing the behaviour of the existing one.

James Youngman <jay>
Group administrator
Mon 03 Mar 2008 04:49:22 PM UTC, original submission:  

FindUtils 4.2.20 on Mac OS X, although a brief look at the source for 4.2.33 suggests that it shares this behavior.

Because the --prunepaths switch takes a space-separated list of directories as its argument, there's no way to include a directory whose name contains whitespace as part of this argument.  The script interprets it as two separate directories.  Trying to escape the spaces with backslashes or quotes doesn't work; the escape characters get interpreted as part of the directory name as well.

Richard Cobbe <cobbe>

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach Files:
   
   
Comment:
   

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by mitar (Posted a comment)
  • -email is unavailable- added by mitar
  • -email is unavailable- added by jay (Posted a comment)
  • -email is unavailable- added by jay
  • -email is unavailable- added by cobbe (Submitted the item)
  •  

    There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.

    Only logged-in users can vote.

     

    Follow 5 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2024-01-21 None Carbon-CopyRemoved -
    2011-01-10 mitar Carbon-Copy- Added mitar
    2010-04-11 jay StatusNone Postponed
    2008-03-04 jay Carbon-Copy- Added "leslie p. polzer" <leslie.polzer@gmx.net>
        Carbon-Copy- Added

    Back to the top

    Powered by Savane 3.13-758e.
    Corresponding source code