WelcomeWelcome | FAQFAQ | DownloadsDownloads | WikiWiki

Author Topic: tce-load -w fails if run a second time  (Read 4926 times)

Offline SvOlli

  • Full Member
  • ***
  • Posts: 193
  • Linux Developer
tce-load -w fails if run a second time
« on: September 26, 2011, 09:11:19 AM »
To me it looks like tce-load -w appends downloaded data instead of noticing that it's already there and does not need to be fetched again.

Code: [Select]
svolli@box:~$ tce-load -w sstrip ; ls -l /mnt/sda1/tce/optional/sstrip.tcz*
Downloading: sstrip.tcz
Connecting to proxy:8080 (192.168.242.1:8080)
sstrip.tcz           100% |*******************************|  4096   0:00:00 ETA
sstrip.tcz: OK
-rw-r--r--    1 svolli   staff         4096 Sep 26 15:09 /mnt/sda1/tce/optional/sstrip.tcz
-rw-r--r--    1 svolli   staff           45 Sep 26 15:09 /mnt/sda1/tce/optional/sstrip.tcz.md5.txt
svolli@box:~$ tce-load -w sstrip ; ls -l /mnt/sda1/tce/optional/sstrip.tcz*
Downloading: sstrip.tcz
Connecting to proxy:8080 (192.168.242.1:8080)
sstrip.tcz           100% |*******************************|  8192   0:00:00 ETA
sstrip.tcz: FAILED
sstrip.tcz: FAILED
md5sum: WARNING: 2 of 2 computed checksums did NOT match
Error on sstrip.tcz
-rw-r--r--    1 svolli   staff         8192 Sep 26 15:09 /mnt/sda1/tce/optional/sstrip.tcz
-rw-r--r--    1 svolli   staff           90 Sep 26 15:09 /mnt/sda1/tce/optional/sstrip.tcz.md5.txt

Offline vitex

  • Full Member
  • ***
  • Posts: 113
Re: tce-load -w fails if run a second time
« Reply #1 on: September 26, 2011, 10:48:10 AM »
See the bug report A Failure Mode for tce-load Re-download for an explanation of what is happening. 

Using wget with the -c option also causes the following error message when you re-download the same version of an extension:

Code: [Select]
tc@box:~$ version
tinycore_4.0rc1

tc@box:~$ tce-load -w e3.tcz
Downloading: e3.tcz
Connecting to distro.ibiblio.org (152.19.134.43:80)
e3.tcz               100% |*******************************| 16384   0:00:00 ETA
e3.tcz: OK

tc@box:~$ tce-load -w e3.tcz
Downloading: e3.tcz
wget: server returned error: HTTP/1.1 416 Requested Range Not Satisfiable
Connecting to distro.ibiblio.org (152.19.134.43:80)
wget: server returned error: HTTP/1.1 416 Requested Range Not Satisfiable
e3.tcz: OK

Offline roberts

  • Retired Admins
  • Hero Member
  • *****
  • Posts: 7361
  • Founder Emeritus
Re: tce-load -w fails if run a second time
« Reply #2 on: September 26, 2011, 02:21:00 PM »
Originally wget -c (continue) was not used!

Then the community wanted such and was added in v2.2,
see: http://forum.tinycorelinux.net/index.php/topic,2283.msg11939.html#msg11939

Now some want it out? A new change in wget function or some members of the community?
10+ Years Contributing to Linux Open Source Projects.

Offline SvOlli

  • Full Member
  • ***
  • Posts: 193
  • Linux Developer
Re: tce-load -w fails if run a second time
« Reply #3 on: September 26, 2011, 03:35:38 PM »
See the bug report A Failure Mode for tce-load Re-download for an explanation of what is happening.
It's not what's happening. After the first download the file has the correct size of 4096 bytes. The download gains another 4096 bytes in size every time I run tce-load -w, as the *.md5.txt file always gets appended time after time.

Originally wget -c (continue) was not used!

Then the community wanted such and was added in v2.2,
[...]
Now some want it out? A new change in wget function or some members of the community?
The -c option is good and should be left in. My rough guess without looking into any details that _maybe_ something got broken inside of busybox's wget applet. I'll dig into it deeper tomorrow, and let you know what I find.

Offline vitex

  • Full Member
  • ***
  • Posts: 113
Re: tce-load -w fails if run a second time
« Reply #4 on: September 26, 2011, 04:59:36 PM »
See the bug report A Failure Mode for tce-load Re-download for an explanation of what is happening.
It's not what's happening.
True.

Quote
After the first download the file has the correct size of 4096 bytes. The download gains another 4096 bytes in size every time I run tce-load -w, as the *.md5.txt file always gets appended time after time.
I do not observe that behavior when I repeat your downloads using the Microcore 4.0 release CD:

Code: [Select]
tc@box:~$ version

microcore_4.0

tc@box:~$ tce-load -w sstrip ; ls -l /tmp/tce/optional

Downloading: sstrip.tcz
Connecting to distro.ibiblio.org (152.19.134.43:80)
sstrip.tcz           100% |*******************************|  4096   0:00:00 ETA
sstrip.tcz: OK

total 8
-rw-r--r--    1 tc       staff         4096 Sep 26 20:18 msstrip.tcz
-rw-r--r--    1 tc       staff           45 Sep 26 20:18 msstrip.tcz.md5.txt

tc@box:~$ tce-load -w sstrip ; ls -l /tmp/tce/optional

Downloading: sstrip.tcz
wget: server returned error: HTTP/1.1 416 Requested Range Not Satisfiable
Connecting to distro.ibiblio.org (152.19.134.43:80)
wget: server returned error: HTTP/1.1 416 Requested Range Not Satisfiable
sstrip.tcz: OK

total 8
-rw-r--r--    1 tc       staff         4096 Sep 26 20:18 sstrip.tcz
-rw-r--r--    1 tc       staff           45 Sep 26 20:18 msstrip.tcz.md5.txt


I see from your output that you are using a http proxy.  That proxy might not be responding properly to the particular http commands that wget uses to implement the -c request.

Offline SvOlli

  • Full Member
  • ***
  • Posts: 193
  • Linux Developer
Re: tce-load -w fails if run a second time
« Reply #5 on: September 26, 2011, 05:19:41 PM »
That thing with the http proxy is a good observation. It works without one, but 3.8.4 also works using the same proxy:
Code: [Select]
svolli@box:~$ version
tinycore_3.8.4
svolli@box:~$ tce-load -w sstrip ; ls -l /mnt/hda1/tce/optional/sstrip.tcz*
Downloading: sstrip.tcz
wget: server returned error: HTTP/1.0 416 Unknown
Connecting to proxy:8080 (192.168.242.1:8080)
wget: server returned error: HTTP/1.0 416 Unknown
sstrip.tcz: OK
-rw-rw-r--    1 svolli   staff         4096 Jun 14  2010 /mnt/hda1/tce/optional/sstrip.tcz
-rw-rw-r--    1 svolli   staff           45 Sep 12 22:01 /mnt/hda1/tce/optional/sstrip.tcz.md5.txt
svolli@box:~$ tce-load -w sstrip ; ls -l /mnt/hda1/tce/optional/sstrip.tcz*
Downloading: sstrip.tcz
wget: server returned error: HTTP/1.0 416 Unknown
Connecting to proxy:8080 (192.168.242.1:8080)
wget: server returned error: HTTP/1.0 416 Unknown
sstrip.tcz: OK
-rw-rw-r--    1 svolli   staff         4096 Jun 14  2010 /mnt/hda1/tce/optional/sstrip.tcz
-rw-rw-r--    1 svolli   staff           45 Sep 12 22:01 /mnt/hda1/tce/optional/sstrip.tcz.md5.txt

So now know, what we need to look for: it's a bug in the busybox wget, when using the -c option over a proxy server:
Code: [Select]
svolli@box:~$ wget -c http://distro.ibiblio.org/tinycorelinux/4.x/x86/tcz/sstrip
.tcz.md5.txt
Connecting to proxy:8080 (192.168.242.1:8080)
sstrip.tcz.md5.txt   100% |*******************************|    45   0:00:00 ETA
svolli@box:~$ wget -c http://distro.ibiblio.org/tinycorelinux/4.x/x86/tcz/sstrip
.tcz.md5.txt
Connecting to proxy:8080 (192.168.242.1:8080)
sstrip.tcz.md5.txt   100% |*******************************|    90   0:00:00 ETA
svolli@box:~$ wget -c http://distro.ibiblio.org/tinycorelinux/4.x/x86/tcz/sstrip
.tcz.md5.txt
Connecting to proxy:8080 (192.168.242.1:8080)
sstrip.tcz.md5.txt   100% |*******************************|   135   0:00:00 ETA

If nobody has done it 'til then, I'll file in a bug report tomorrow. For now, it's bedtime.