Duplicity should ignore leading/trailing whitespace in filelists unless quoted

Bug #584437 reported by Aaron Whitehouse
12
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Duplicity
Fix Released
Medium
Unassigned

Bug Description

I just spent an awful lot of time debugging why my exclude-globbing-filelist was not working. It turned out to be because a couple of my exclude lines had a trailing space.

Picking up on the comments below, duplicity should remove leading/trailing whitespace from filelist lines. Any files/folders with spaces should be quoted.

Related branches

Changed in duplicity:
importance: Undecided → Wishlist
Revision history for this message
Adam Porter (alphapapa) wrote :

I think it would be more useful if trailing spaces were removed or ignored. Many more users will be negatively affected by the confusion this behavior gives than would be affected by the spaces being ignored. If spaces are needed, they could be escaped or quoted. This would prevent much hair-pulling.

Revision history for this message
Aaron Whitehouse (aaron-whitehouse) wrote :

From: http://lists.nongnu.org/archive/html/duplicity-talk/2014-09/msg00011.html

"In my globbing filelist file, I have the line

+ /home/save/systems/Duplicity/Test/src/dirA

I have noticed a couple of things:

1. If there is a space at the end of the line,
the specified folder is not matched. However,
duplicity is silent.

2. If I put a bogus folder name, instead of one
that actually exists, duplicity complains that
the folder does not exist.

So, it seems that duplicity is doing two passes
of the lines in the globbing filelist file. The
first pass vets the file names, ignoring trailing
white space. However, the 2nd pass, which actually
uses the file names, includes the trailing white
space, and does not complain if the resulting
file does not exist.

I can attach the example, it you would find it useful.

Thank you."

Revision history for this message
Kenneth Loafman (kenneth-loafman) wrote :

Yes, it should be consistent and remove leading/trailing whitespace. File specs with spaces should be quoted.

Changed in duplicity:
importance: Wishlist → Medium
summary: - Duplicity should say when include/exclude pattern isn't found
+ Duplicity should ignore leading/trailing whitespace in filelists unless
+ quoted
Changed in duplicity:
assignee: nobody → Aaron Whitehouse (hooloovoo)
description: updated
Revision history for this message
Aaron Whitehouse (aaron-whitehouse) wrote :

I am looking into this.

I suspect Kenneth's consistency point refers to the fact that using --exclude/--include on the commandline seems to correctly exclude leading and trailing whitespace unless the path is quoted (through sys.argv rather than any special code in duplicity, I believe).

Changed in duplicity:
status: New → In Progress
milestone: none → 0.7.01
Revision history for this message
Kenneth Loafman (kenneth-loafman) wrote : Re: [Bug 584437] Re: Duplicity should ignore leading/trailing whitespace in filelists unless quoted

Is this ready to merge. Please mark if so.

On Sat, Jan 3, 2015 at 7:42 PM, Launchpad Bug Tracker <
<email address hidden>> wrote:

> ** Branch linked:
> lp:~hooloovoo/duplicity/include_exclude_filelist_improvements
>
> --
> You received this bug notification because you are subscribed to
> Duplicity.
> https://bugs.launchpad.net/bugs/584437
>
> Title:
> Duplicity should ignore leading/trailing whitespace in filelists
> unless quoted
>
> Status in Duplicity - Bandwidth Efficient Encrypted Backup:
> New
>
> Bug description:
> I just spent an awful lot of time debugging why my exclude-globbing-
> filelist was not working. It turned out to be because a couple of my
> exclude lines had a trailing space.
>
> Picking up on the comments below, duplicity should remove
> leading/trailing whitespace from filelist lines. Any files/folders
> with spaces should be quoted.
>
> To manage notifications about this bug go to:
> https://bugs.launchpad.net/duplicity/+bug/584437/+subscriptions
>

Revision history for this message
Aaron Whitehouse (aaron-whitehouse) wrote :

New branch now ready for merge and marked as such.

I came across Bug #1408411 and wanted to check it wasn't caused by my changes before proposing a merge.

Changed in duplicity:
assignee: Aaron Whitehouse (hooloovoo) → nobody
Changed in duplicity:
status: In Progress → Fix Committed
Changed in duplicity:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.