URL:
  <http://savannah.gnu.org/bugs/?33823>

                 Summary: 'wget -c -N' ignores timestamps
                 Project: GNU Wget
            Submitted by: nok
            Submitted on: Sa 23 Jul 2011 10:30:17 CEST
                Category: Program Logic
                Severity: 3 - Normal
                Priority: 5 - Normal
                  Status: None
                 Privacy: Public
             Assigned to: None
         Originator Name: 
        Originator Email: 
             Open/Closed: Open
         Discussion Lock: Any
                 Release: 1.12
        Operating System: GNU/Linux
         Reproducibility: Every Time
           Fixed Release: None
         Planned Release: None
              Regression: Yes
           Work Required: None
          Patch Included: None

    _______________________________________________________

Details:

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<--




    _______________________________________________________

Reply to this item at:

  <http://savannah.gnu.org/bugs/?33823>

_______________________________________________
  Nachricht geschickt von/durch Savannah
  http://savannah.gnu.org/




-- 
To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org

Reply via email to