exclude-from= skip --exclude paths in file (may be repeated)
exclude-rx= skip paths matching the unanchored regex (may be repeated)
exclude-rx-from= skip --exclude-rx patterns in file (may be repeated)
-exclude-caches exclude CACHEDIR.TAG-directories
+exclude-caches exclude directories containing a CACHEDIR.TAG
v,verbose increase log output (can be used more than once)
x,xdev,one-file-system don't cross filesystem boundaries
"""
tag_contents = 'Signature: 8a477f597d28d172789f06886806bc55'
if os.path.exists(prepend+name+tag_filename):
f = open(prepend+name+tag_filename, 'rb')
- data = f.read(len(tag_contents))
- f.close()
+ try:
+ data = f.read(len(tag_contents))
+ finally:
+ f.close()
if data == tag_contents:
debug1('Skipping %r: excluding cache dir' % (prepend+name))
continue
WVSTART "exclude-caches"
(
- set -e -o pipefail
- D="$(wvmktempdir)"
- force-delete $D
- mkdir $D
+ D="$(WVPASS wvmktempdir)" || exit $?
+ WVPASS force-delete $D
+ WVPASS mkdir $D
export BUP_DIR="$D/.bup"
WVPASS bup init
- touch $D/a
+ WVPASS touch $D/a
WVPASS bup random 128k >$D/b
- mkdir $D/d $D/d/e
+ WVPASS mkdir $D/d $D/d/e
WVPASS bup random 512 >$D/f
- echo 'Signature: 8a477f597d28d172789f06886806bc55' > $D/d/CACHEDIR.TAG
+ WVPASS echo 'Signature: 8a477f597d28d172789f06886806bc55' > $D/d/CACHEDIR.TAG
WVPASS bup index -ux --exclude-caches $D
- bup save -n exclude $D
+ WVPASS bup save -n exclude $D
WVPASSEQ "$(bup ls exclude/latest/$TOP/$D/)" "a
b
f"