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

 
 

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

Submitted by:  Richard Cobbe <cobbe>
Submitted on:  Mon 03 Mar 2008 04:49:22 PM UTC  
 
Category: updatedbSeverity: 3 - Normal
Item Group: Wrong resultStatus: Postponed
Privacy: PublicAssigned to: None
Originator Name: Richard CobbeOpen/Closed: Open
Release: 4.2.20Fixed Release: None

Add a New Comment (Rich MarkupRich Markup):
   

You are not logged in

Please log in, so followups can be emailed to you.

 

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>
Project 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>
Project 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 File(s):
   
   
Comment:
   

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

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

    Do you think this task is very important?
    If so, you can click here to add your encouragement to it.
    This task has 0 encouragements so far.

    Only logged-in users can vote.

     

    Please enter the title of George Orwell's famous dystopian book (it's a date):

     

     

    Follow 4 latest changes.

    Date Changed By Updated Field Previous Value => Replaced By
    Mon 10 Jan 2011 09:31:47 PM UTCmitarCarbon-Copy-=>Added mitar
    Sun 11 Apr 2010 11:57:53 AM UTCjayStatusNone=>Postponed
    Tue 04 Mar 2008 10:17:26 AM UTCjayCarbon-Copy-=>Added "leslie p. polzer"
      Carbon-Copy-=>Added

    Back to the top


    Powered by Savane 3.1-cleanup