On 10/28/13 20:13, Dagobert Michelsen wrote: > Hi Peter, > > Am 28.10.2013 um 19:45 schrieb Peter Bonivart <[email protected]>: >> On Mon, Oct 28, 2013 at 6:30 PM, Maciej (Matchek) BliziĆski >> <[email protected]> wrote: >>> >>> 2013/10/28 Peter Bonivart <[email protected]>: >>>> Option -O is used all over unfortunately. >>> >>> Is it more "-O happens to be used" or "-O must be used by design"? >> >> From taking a quick look at the code section where catalogs are >> fetched it seems to be a case of "download to catalog.tmp, check if >> ok, if so rename to catalog, otherwise we still have the old catalog". >> >> I guess one could do it the other way around, rename current catalog >> first, download without -O, check and rename back if not successful. >> >> It's also used to download to another location than current work dir, >> so -O sets an absolute path like "/var/opt/csw/pkgutil/catalog....". >> That could be worked around by changing current work dir. > > Yes, but the dates must be preserved during copying. Maybe --force > should ignore the timestamping on -U ?
Timestamping when using -O can be achieved by generating custom "If-Modified-Since" header and passing it via --header parameter to wget. -- Juraj Lutter <[email protected]>
