On Thu, May 17, 2007 at 01:19:12PM +0200, Adeodato Sim?? wrote:
> As it happens, the behavior you describe is properly described in the
> documentation for wget:
>
> 5 Time-Stamping
> ***************
>
> [...]
>
> If the local file does not exist, or the sizes of the files do not
> match, Wget will download the remote file no matter what the time-stamps
> say.
>
> > Bug leads to overwriting of local newer files; that's "data loss", hence the
> > 'grave' tag.
>
> The thing is that -N is intended for mirroring purposes, so checking for
> the size is reasonable. For this, I'm lowering the severity of this bug.
I disagree, bug is still grave - yes I've read that blurb *after* having
lost more-recent files - the point is that the whole stuff wrt -m -N is
so messy/badly implemented/documented that it does lead to *data loss*.
Look at wget --help:
-N, --timestamping don't re-retrieve files unless newer than local.
^^^^^^^^^^^^^^^^^^^^^^^
-r, --recursive specify recursive download.
-m, --mirror shortcut for -N -r -l inf --no-remove-listing.
^^^^^^^^^^^^^^^^^^
I don't get, from above, an hint that -N has subtle meanings.
Now man wget:
...
When running Wget with -N, with or without -r, the decision as to
whether or not to download a newer copy of a file depends on the
local and remote timestamp and size of the file.
^^^^^^^^^^^^^^^^^^
...
-N
--timestamping
Turn on time-stamping.
...
-m
--mirror
...
keeps FTP directory listings. It is currently equivalent to -r -N
^^^^^^^^^^^^^^^^^^^^
-l inf --no-remove-listing.
...
nowhere there's a clue that -N won't do what's said it should do, that
size mismatch would eventually override timestamping (newer-than, ie how
the option/feature is named).
The 'mirror' argument is not valid imo, wget doesn't have a true 'mirror'
function (like eg lftp): it's said that -m is just a shortcut for
-N (only-if-newer-than) -r -l inf.
Mirroring is just another story (see eg mirrordir(1)).
Oh, wait you mean: check also 'info man' right? ok, there in the wget weird
idea of what 'newer-than' means is documented, indeed.
Well, I think that not pointing out clearly such weirdness in --help is a
grave bug, like having docs around that don't match each other.
Note I really mean --help, not just man(1): it's really misleading,
user should be warned that wget's 'newer' doesn't mean 'newer-than', just
'different-than'.
I disagree with that implementation, but regardless, if they like that way
it should be better and clearly documented.
thanks
--
paolo
--
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]