Filelist (non-globbing) should include a folder if it contains higher priority included files
Bug #1408411 reported by
Aaron Whitehouse
This bug affects 1 person
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Duplicity |
Fix Released
|
Medium
|
Aaron Whitehouse |
Bug Description
Using the --include/--exclude commandline options, or either an exclude or include globbing filelist, with the following instructions:
+ testfiles/
- testfiles/
- testfiles/
- testfiles/
will include the folder 1/2 because it contains an included folder (1/2/1).
By contrast, using --include-filelist or --exclude-filelist with the same comments will not include anything. I'll upload some test cases to show this issue.
Related branches
lp:~aaron-whitehouse/duplicity/filelist_select_bug_1408411
- duplicity-team: Pending requested
-
Diff: 105 lines (+101/-0)1 file modifiedtesting/functional/test_select.py (+101/-0)
lp:~aaron-whitehouse/duplicity/filelist_combine
- duplicity-team: Pending requested
-
Diff: 2740 lines (+683/-919)7 files modifiedbin/duplicity.1 (+20/-82)
duplicity/commandline.py (+27/-4)
duplicity/selection.py (+27/-128)
po/duplicity.pot (+99/-106)
testing/functional/test_selection.py (+203/-193)
testing/stdin_test.sh (+203/-0)
testing/unit/test_selection.py (+104/-406)
Changed in duplicity: | |
assignee: | nobody → Aaron Whitehouse (aaron-whitehouse) |
Changed in duplicity: | |
status: | New → Fix Committed |
importance: | Undecided → Medium |
Changed in duplicity: | |
status: | Fix Committed → Fix Released |
To post a comment you must log in.
I note that this was explicitly flagged in the manual (see point 2): filelist- stdin, and --exclude- filelist- stdin options also introduce file selection conditions. They direct duplicity to read in a file, each line of which is a file specification, and to include or exclude the matching files. Lines are separated by newlines or nulls, depending on whether the --null-separator switch was given. Each line in a filelist is interpreted similarly to the way extended shell patterns are, with a few exceptions:
"The --include-filelist, --exclude-filelist, --include-
1. Globbing patterns like *, **, ?, and [...] are not expanded.
2. Include patterns do not match files in a directory that is included. So /usr/local in an include file will not match /usr/local/doc. #
"
But I maintain that this should be changed. It seems a bizarre distinction to have between normal and globbing filelists. There is some risk that changing this could mean users have additional subfolders backed up that were not previously included, but this seems less of an issue than the potential that desired subfolders are mistakenly excluded.