best order is unclear, of exclude-if-present and exclude-device-files

Bug #1755955 reported by David Williams
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Duplicity
Fix Released
Medium
Unassigned

Bug Description

Duplicity version 0.7.17 (and, was in 0.7.16 as well -- probably much earlier too).

This may be a "man page only" issue, but a warning message may not even be needed? Or perhaps improved?

If I specify "--exclude-device-files" first and then specify "--exclude-if-present filename" after that everything runs fine, no warnings.

But, then I read in man pages about "--exclude-if-present filename" :
"This option needs to come before any other include or exclude options."

So, I put that first, followed by "--exclude-device-files" and now get a warning that says
"
Warning: exclude-device-files is not the first selector.
This may not be what you intended
"

So, in short, which is it? Must exclude-device-files come first or exclude-if-present?

Perhaps merely the man pages should be updated to be clearer?

But, honestly, the warning message does not help me much in terms of knowing if it is what I intend or not. :) Perhaps the warning should be improved?

description: updated
Revision history for this message
Kenneth Loafman (kenneth-loafman) wrote : Re: [Bug 1755955] [NEW] best order is unclear, of exclude-if-present and exclude-device-files
Download full text (3.9 KiB)

I'm guessing that the runs completed as they should? Were there any
inclusions that should not have been made?

On Wed, Mar 14, 2018 at 8:00 PM, David Williams <
<email address hidden>> wrote:

> Public bug reported:
>
> Duplicity version 0.7.17 (and, was in 0.7.16 as well -- probably much
> earlier too).
>
> This may be a "man page only" issue, but a warning message may not even
> be needed? Or perhaps improved?
>
> If I specify "--exclude-device-files" first and then specify "--exclude-
> if-present filename" after that everything runs fine, no warnings.
>
> But, then I read in man pages about "--exclude-if-present filename" :
> "This option needs to come before any other include or exclude options."
>
> So, I put that first, followed by "--exclude-device-files" and now get a
> warning that says
> "
> Warning: exclude-device-files is not the first selector.
> This may not be what you intended
> "
>
> So, in short, which is it? Must exclude-device-files come first or
> exclude-if-present?
>
> Perhaps merely the man pages should be updated to be clearer?
>
> But, honestly, the warning message does not help me much in terms of
> knowing if it is what I intend or not. :) Perhaps the warning should be
> improved?
>
> ** Affects: duplicity
> Importance: Undecided
> Status: New
>
> ** Description changed:
>
> Duplicity version 0.7.17 (and, was in 0.7.16 as well -- probably much
> earlier too).
>
> - This may be a "map page only" issue, but a warning message may not even
> + This may be a "man page only" issue, but a warning message may not even
> be needed? Or perhaps improved?
>
> If I specify "--exclude-device-files" first and then specify "--exclude-
> if-present filename" after that everything runs fine, no warnings.
>
> But, then I read in man pages about "--exclude-if-present filename" :
> "This option needs to come before any other include or exclude options."
>
> - So, I put that first, followed by "--exclude-device-files" and now get a
> warning that says
> + So, I put that first, followed by "--exclude-device-files" and now get a
> warning that says
> "
> Warning: exclude-device-files is not the first selector.
> This may not be what you intended
> - "
> + "
>
> So, in short, which is it? Must exclude-device-files come first or
> exclude-if-present?
>
> Perhaps merely the man pages should be updated to be clearer?
>
> But, honestly, the warning message does not help me much in terms of
> knowing if it is what I intend or not. :) Perhaps the warning should be
> improved?
>
> --
> You received this bug notification because you are subscribed to
> Duplicity.
> https://bugs.launchpad.net/bugs/1755955
>
> Title:
> best order is unclear, of exclude-if-present and exclude-device-files
>
> Status in Duplicity:
> New
>
> Bug description:
> Duplicity version 0.7.17 (and, was in 0.7.16 as well -- probably much
> earlier too).
>
> This may be a "man page only" issue, but a warning message may not
> even be needed? Or perhaps improved?
>
> If I specify "--exclude-device-files" first and then specify
> "--exclude-if-present filename" after that everything runs fine, no
> warnings...

Read more...

Revision history for this message
David Williams (david-williams-5) wrote :

Yes, runs completed as they should. As far as I know -- I did not do any detailed testing, just did not see anything grossly wrong.

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

It looks like the best ordering is that they appear in the first two arguments. Neither one needs to be first. I'll try to verify that, but that's my impression from reading the code again.

Revision history for this message
David Williams (david-williams-5) wrote :

That probably makes is harder to have a meaningful "Warning" then when exclude-device-files is not first in list [or, possible second, if exclude-if-present is first].

Even if doesn't technically matter, perhaps just change man page to say, for "exclude-if-present filename":

"This option needs to come before any other include or exclude options except for exclude-device-files which typically should come first, if used, before any other include or exclude options".

Or, something like that. :/

Changed in duplicity:
assignee: nobody → Kenneth Loafman (kenneth-loafman)
importance: Undecided → Medium
milestone: none → 0.7.18
status: New → In Progress
Changed in duplicity:
milestone: 0.7.18 → 0.7.19
Changed in duplicity:
milestone: 0.7.19 → 0.7.20
Changed in duplicity:
milestone: 0.7.20 → 0.8.12
Revision history for this message
Kenneth Loafman (kenneth-loafman) wrote :

  - Removed warning and will now allow these two to
    be in any order. If encountered outside of the
    first two slots, duplicity will silently move
    them to be in the first two slots. Within those
    two slots the order does not matter.

Changed in duplicity:
status: In Progress → Fix Committed
assignee: Kenneth Loafman (kenneth-loafman) → nobody
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.