Bug 3740 - --delete with -a failes with warning (though -a is supposed to imply -r)
--delete with -a failes with warning (though -a is supposed to imply -r)
Status: CLOSED INVALID
Product: rsync
Classification: Unclassified
Component: core
2.6.8
x86 Linux
: P3 major
: ---
Assigned To: Wayne Davison
Rsync QA Contact
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2006-04-28 14:58 UTC by Ian Morgan
Modified: 2006-04-28 15:42 UTC (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Ian Morgan 2006-04-28 14:58:18 UTC
After upgrade to 2.6.8:

> rsync: --delete does not work without -r or -d.
> rsync error: syntax or usage error (code 1) at main.c(1231) [client=2.6.8]

Actual command line us using --delete and -a. -a is supposed to mean -rlptgoD. Many existing scripts broken by this, all needing a fix, but not clear what best fix is. Should I be adding -r to the command line, even though -a already implies it!?

I think that --delete with -a should _not_ be causing this failure.
Comment 1 Wayne Davison 2006-04-28 15:06:21 UTC
Please specify more information for how you saw this problem.
Comment 2 Ian Morgan 2006-04-28 15:11:00 UTC
One sample command from script is:

rsync --size-only -a -z --partial -L --delete \
    --exclude-from=excludefile \
    $srcHostDir \
    $destDir

The emailed output from the cron job contains only:

> rsync: --delete does not work without -r or -d.
> rsync error: syntax or usage error (code 1) at main.c(1231) [client=2.6.8]

Comment 3 Wayne Davison 2006-04-28 15:22:29 UTC
I can't duplicate the problem, nor can I see in the code how this could happen.  Do you have any popt aliases defined?  Are you using a tweaked version (e.g. one packaged by an OS distributor)?
Comment 4 Wayne Davison 2006-04-28 15:24:06 UTC
I can't duplicate the problem, nor can I see in the code how this could happen.  Do you have any popt aliases defined?  Are you using a tweaked version (e.g. one packaged by an OS distributor)?
Comment 5 Ian Morgan 2006-04-28 15:42:41 UTC
Silly me. Found the problem. Out of the 20+ instances of rsync in the script, only 1 didn't have -a, but still had --delete. So it's our fault (kind of).