Globbing exclude fails with trailing slash

Bug #932482 reported by Adam Porter on 2012-02-15
This bug affects 3 people
Affects Status Importance Assigned to Milestone

Bug Description

  Installed: 0.6.17-0ubuntu0ppa9~oneiric1
  Candidate: 0.6.17-0ubuntu0ppa9~oneiric1
  Version table:
 *** 0.6.17-0ubuntu0ppa9~oneiric1 0
        500 oneiric/main i386 Packages
        100 /var/lib/dpkg/status
     0.6.15-0ubuntu2 0
        500 oneiric/main i386 Packages
  Installed: 2.7.2-7ubuntu2
  Candidate: 2.7.2-7ubuntu2
  Version table:
 *** 2.7.2-7ubuntu2 0
        500 oneiric/main i386 Packages
        100 /var/lib/dpkg/status

I want to exclude, e.g.:


and all the files in them.

These two patterns work in an --exclude-globbing-filelist (the first pattern excludes all 3 paths, and the second pattern excludes the first path):


But this one fails to exclude files in /home/me/.mozilla/firefox/profile.blah/Cache:


Naturally, it should fail to exclude the 2nd and 3rd example paths, but it should still match the first one--but it doesn't.

As another example, another path to exclude is:

/home/me/.mozilla/firefox/profile.blah/Crash Reports/

This pattern works:

**/.mozilla/firefox/Crash Reports

But this one doesn't:

**/.mozilla/firefox/Crash Reports/

I don't see why the trailing slash should cause the exclusion of the path to fail.

Related branches

Added functional and unit tests to the linked branch, confirming this behaviour.

Changed in duplicity:
status: New → Confirmed
Changed in duplicity:
assignee: nobody → Aaron Whitehouse (aaron-whitehouse)
Changed in duplicity:
assignee: Aaron Whitehouse (aaron-whitehouse) → nobody
importance: Undecided → Medium
milestone: none → 0.7.04
status: Confirmed → Fix Committed
Dmitry (dmitry-koterov) wrote :

I'd like to add a note why trailing slash processing is so important. Previously (many years ago probably) one could write in an excluding file something like:

+ ./var/log/**/
- ./var/log/**

That means "include the whole directory skeleton in the backup, but DO NOT include actual files with data". It was extremely handy: in many cases the directory structure is important (e.g. for /var/log: if you restore a machine from a full backup and do not have /var/log/apache2 directory, Apache will fail to load after the restoration).

So, trailing / means "hey, I mean directory, not a file!", and that was the only method to distinct directories and files in duplicity. So I would be very happy if plain old days return, and we can include directory skeletons to backups again.

Dmitry (dmitry-koterov) wrote :

...sorry, I discovered my comment is related to another issue (because the fix for the current bug have not fixed the effect in my comment). So I created a separated bugreport:

Changed in duplicity:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Duplicates of this bug

Other bug subscribers