pkg-download: handle interrupted wget downloads
authorArnout Vandecappelle <arnout@mind.be>
Sat, 30 Jun 2012 11:43:03 +0000 (11:43 +0000)
committerPeter Korsgaard <jacmet@sunsite.dk>
Sat, 30 Jun 2012 22:26:37 +0000 (00:26 +0200)
commit96885ca7eb4a05e65986334d6138e1fe6afa46fc
tree6cde8b9ced1d92c64716bfd5df250dfb3a39cd81
parent9910eba33adb2b783b0df5d90a857816e82fbd55
pkg-download: handle interrupted wget downloads

When a wget download is interrupted, the downloaded file is still created.
It will therefore not be re-downloaded in the next build, and the
extraction will fail.

To avoid this, download to a temporary file first and rename when the
download is successful.

The existing mechanism doesn't work for interrupted downloads because the
whole sub-shell is interrupted, so the rm-part never gets executed.

Signed-off-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be>
Signed-off-by: Peter Korsgaard <jacmet@sunsite.dk>
package/pkg-download.mk