bugfindutils - Bugs: bug #54745, -mount needs to be slightly...

 
 

bug #54745: -mount needs to be slightly different from -xdev

Submitter:  Eric Blake <ericb>
Submitted:  Thu 27 Sep 2018 03:31:35 PM UTC
   
 
Category:  None Severity:  3 - Normal
Item Group:  None Status:  None
Privacy:  Public Assigned to:  None
Originator Name:  Open/Closed:  Open
Release:  None Fixed Release:  None
* Mandatory Fields

Add a New Comment Rich Markup
   

Sun 01 Sep 2019 08:45:00 AM UTC, comment #2: 

Eric, would you like to work on this?

James Youngman <jay>
Group administrator
Sun 01 Sep 2019 08:42:26 AM UTC, comment #1: 

The announcement email for the recent 4.7.0 release states:

  • Upcoming changes


For consistency with planned changes to POSIX, the semantics of 'find -mount' may be different from that of 'find -xdev' in future releases.


James Youngman <jay>
Group administrator
Thu 27 Sep 2018 03:31:35 PM UTC, original submission:  

Today during the Austin Group meeting (the folks responsible for POSIX), it was decided that -mount and -xdev should have a subtle difference in behavior, in order to reconcile some differences between implementations and against some other file-traversal programs like pax (the POSIX replacement to tar). The difference stems on the question of whether, when requesting that a cross-device file system entry (whether a mount point, or whether a symlink that crosses mount points when -L follows symlinks), should be visited or omitted during the traversal.  Both styles have their merits.  Quoting from the discussion results:

http://austingroupbugs.net/view.php?id=1133
"
    When restricting the search to files on one file system, it can sometimes be desirable for the crossing points themselves to be acted on and sometimes for them not to be acted on. (Crossing points are mount points and, if the -L option is specified, symbolic links to directories on other file systems.) The -xdev primary acts on them and the -mount primary does not. However, -mount also does not act on symbolic links to non-directory files on other file systems (if -L is specified). If there is a need for an application to exclude crossing points but include symbolic links to non-directory files on other file systems, this can be achieved by using two find commands as follows:

        find -L dir -mount -type d -print
        find -L dir -xdev ! -type d -print

    (in a subshell whose output is piped to sort, if the order matters).

    If both -mount and -xdev are specified, find obeys both primaries but the end result is the same as if -xdev were not specified.
"

We'll need to patch GNU findutils to match, in order to make -mount skip crossing points (while keeping -xdev with its behavior of visiting crossing points).

Eric Blake <ericb>
Group administrator

 

(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 jay (Posted a comment)
  • -email is unavailable- added by ericb (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.

     

    No changes have been made to this item

    Back to the top

    Powered by Savane 3.13-4448.
    Corresponding source code