]> arthur.barton.de Git - bup.git/commit
Never omit explicitly named mounts during index -x
authorRob Browning <rlb@defaultvalue.org>
Sun, 10 Jan 2016 19:44:04 +0000 (13:44 -0600)
committerRob Browning <rlb@defaultvalue.org>
Sat, 5 Mar 2016 17:35:28 +0000 (11:35 -0600)
commit38ab72c98ea162df2c8c2312cf48c889c9e0d3f8
treeda84c204401c752a8a299aa94d92911e7cd98298
parent9268378e79d20d66647240b926cfcc1d8e95901f
Never omit explicitly named mounts during index -x

Assuming mounts like this:

  /
  /usr

and an index invocation like "bup index -x / /usr", don't skip indexing
/usr.  Previously bup would skip /usr when -x was specified because
reduce_paths() would drop /usr from the list of paths to index, assuming
that /usr would be covered when indexing /.  However, when /usr was
actually reached, -x would cause it to be skipped.

To fix that, exempt all mount points mentioned on the command line from
-x during filesystem traversal, expand the (root only) tests to cover
this situation, and check some corner cases.

Thanks to Wayne Scott for reporting the problem, and Yves-Alexis Perez
for a reminder.

Signed-off-by: Rob Browning <rlb@defaultvalue.org>
Tested-by: Rob Browning <rlb@defaultvalue.org>
Documentation/bup-index.md
cmd/index-cmd.py
lib/bup/drecurse.py
lib/bup/index.py
t/test-xdev.sh