bugGNU Wget - Bugs: bug #33823, 'wget -c -N' ignores timestamps

 
 

bug #33823: 'wget -c -N' ignores timestamps

Submitted by:  Noël Köthe <nok>
Submitted on:  Sat 23 Jul 2011 08:30:17 AM UTC  
 
Category: Program LogicSeverity: 3 - Normal
Priority: 5 - NormalStatus: Fixed
Privacy: PublicAssigned to: Giuseppe Scrivano <gscrivano>
Originator Name: Open/Closed: Closed
Release: 1.12Operating System: GNU/Linux
Reproducibility: Every TimeFixed Release: None
Planned Release: NoneRegression: Yes
Work Required: NonePatch Included: None

Add a New Comment(Rich Markup)
   

You are not logged in

Please log in, so followups can be emailed to you.

 

Fri 05 Aug 2011 08:05:16 PM UTC, comment #1:

fixed in the development version.

Giuseppe Scrivano <gscrivano>
Project AdministratorIn charge of this item.
Sat 23 Jul 2011 08:30:17 AM UTC, original submission:

Hello,

http://bugs.debian.org/402001

--8<--
in my script /usr/share/mplayer/scripts/binary_codecs.sh
I would like to use 'wget' to keep some files up-to-date

Consider those commands

$ cd /tmp
$ MYSITE='http://people.debian.org/~mennucc1/mplayer'
$ touch -d '1 Dec 1970' mirrors
$ ls -l mirrors
-rw-r--r-- 1 debdev debian 0 1970-12-01 00:00 mirrors
$ wget -v -c -N $MYSITE/mirrors
--12:13:59-- http://people.debian.org/~mennucc1/mplayer/mirrors
=> `mirrors'
Resolving people.debian.org... 192.25.206.10
Connecting to people.debian.org|192.25.206.10|:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: 336 [text/plain]
Remote file is newer, retrieving.
--12:14:00-- http://people.debian.org/~mennucc1/mplayer/mirrors
=> `mirrors'
Reusing existing connection to people.debian.org:80.
HTTP request sent, awaiting response... 200 OK
Length: 336 [text/plain]

100%[====================================================>] 336 --.--K/s

12:14:00 (35.60 MB/s) - `mirrors' saved [336/336]
^^^^^^^^^^^^

So far all is fine. But now look at this:
$ touch -d '1 Dec 1970' mirrors
$ ls -l mirrors
-rw-r--r-- 1 debdev debian 336 Dec 1 1970 mirrors
$ wget -v -c -N $MYSITE/mirrors
--12:15:16-- http://people.debian.org/~mennucc1/mplayer/mirrors
=> `mirrors'
Resolving people.debian.org... 192.25.206.10
Connecting to people.debian.org|192.25.206.10|:80... connected.
HTTP request sent, awaiting response... 416 Requested Range Not Satisfiable

The file is already fully retrieved; nothing to do.
^^^^^^^^^^^

Argh! 'wget' checks the size but not the timestamp!

Instead I checked that '-N' alone works:
$ wget -v -N $MYSITE/mirrors
--12:16:24-- http://people.debian.org/~mennucc1/mplayer/mirrors
=> `mirrors'
Resolving people.debian.org... 192.25.206.10
Connecting to people.debian.org|192.25.206.10|:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: 336 [text/plain]
Remote file is newer, retrieving.
--12:16:25-- http://people.debian.org/~mennucc1/mplayer/mirrors
=> `mirrors'
Reusing existing connection to people.debian.org:80.
HTTP request sent, awaiting response... 200 OK
Length: 336 [text/plain]

100%[====================================================>] 336 --.--K/s

12:16:25 (32.04 MB/s) - `mirrors' saved [336/336]
^^^^^^^^^^^^^^

and trying again

$ wget -v -N $MYSITE/mirrors
--12:16:29-- http://people.debian.org/~mennucc1/mplayer/mirrors
=> `mirrors'
Resolving people.debian.org... 192.25.206.10
Connecting to people.debian.org|192.25.206.10|:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: 336 [text/plain]
Server file no newer than local file `mirrors' -- not retrieving.
^^^^^^^^^^^^
--8<--

and another comment from the bug (wget 1.12)

--8<--
I've run into a similar problem. I want to mirror a site where not
everything has timestamps. If I select -N then all files without
timestamps will be downloaded again and again. If I select -c then
files with timestamps that have changed will be continued leading to
broken files.

I would like to tell wget to use -c as fallback to -N.
--8<--

Noël Köthe <nok>

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach File(s):
   
   
Comment:
   

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -unavailable- added by gscrivano (Posted a comment)
  • -unavailable- added by nok (Submitted the item)
  • -unavailable- added by nok (Debian BTS)
  •  

    Please enter the title of George Orwell's famous dystopian book (it's a date):

     

     

    Follow 4 latest changes.

    Date Changed By Updated Field Previous Value => Replaced By
    Sat 06 Aug 2011 09:47:51 AM UTCgscrivanoOpen/ClosedOpen=>Closed
    Fri 05 Aug 2011 08:05:16 PM UTCgscrivanoStatusNone=>Fixed
      Assigned toNone=>gscrivano
    Sat 23 Jul 2011 08:30:17 AM UTCnokCarbon-Copy-=>Added -unavailable-

    Back to the top


    Powered by Savane 3.1-cleanup1