Red Hat Bugzilla – Bug 449369
curl --remote-time (-R) does not work
Last modified: 2013-07-02 19:29:28 EDT
Description of problem:
curl -R does not work
Version-Release number of selected component (if applicable):
Steps to Reproduce:
1. touch stamp-file
2. curl -R an-URL-to-a-small-file
3. observe that a-small-file is newer than stamp-file
curl has a "feature" where an option is switched on iff it has been given odd
times and off if it has been given even times.
Obviously, it is then very important that the default does not change.
The version of curl quoted above has -R switched on by default. Then each
script which tries to get timestamps right actually switches timestamping off.
An example of such a script is common/Makefile.common from cvs.fedoraproject.org
Sorry, it was my fault, I had -R in .curlrc.
Obviously, whith the "switch the option" kind of interpretation of options, one
should never have .curlrc, as it breaks all the scripts.
It would make sense to put a warning ".curlrc should not touch the default
option, it breaks scripts" to curl, but that would probably annoy other people.
I'll just refrain from using the misdesigned command line interface (rpm -e curl).
Actually, upstream reacted really nicely to the complaint (it wasn't the first
one of this type):
So the problem may actually get solved in a future release of curl.