FS#3289 - makepkg should check FTPAGENT return code

Attached to Project: Pacman
Opened by Daniel YC Lin (dlin) - Tuesday, 04 October 2005, 09:57 GMT
Last edited by Aaron Griffin (phrakture) - Friday, 08 December 2006, 22:57 GMT
Task Type Bug Report
Category
Status Closed
Assigned To Aaron Griffin (phrakture)
Architecture not specified
Severity High
Priority Normal
Reported Version 0.7 Wombat
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 0
Private No

Details

In makepkg, the following code is too weak.
---
$FTPAGENT $netfile 2>&1
if [ ! -f $file ]; then
error "Failed to download $file"
msg "Aborting..."
exit 1
fi
---
On most time, wget get a partial file, and makepkg assume it is full package.

I suggest there should deal with three thing.
1. Whenever FTPAGENT return code is not 0, think it is failed
2. When all files download, also touch a file 'src/download.done' that means all file have successful download. The makepkg can skip download when it found the file.
3. There should have a method to deal with partial download on /var/cache/pacman/src, I suggest that could be done by touch a file eg. /var/cachce/pacman/src/gcc-4.0.2.tar.tgz.done to do this.
This task depends upon

Closed by  Aaron Griffin (phrakture)
Monday, 18 December 2006, 17:47 GMT
Reason for closing:  Fixed
Additional comments about closing:  Fixed in CVS
Comment by Kristian Klette (klette) - Sunday, 15 October 2006, 09:49 GMT
When is this a problem? When killing wget in the middle of an download? That means, that we would have to restart the build-proccess anyhow (since it got killed).. So why not just give wget a "-c" param. so it contiunes on the messed up file.
Comment by James Rosten (yankees26) - Sunday, 15 October 2006, 19:53 GMT
klette has answered the third one, and for the second one: I believe makepkg already uses the local copy if already downloaded. So here is my patch for the return code.
Comment by Daniel YC Lin (dlin) - Monday, 16 October 2006, 01:53 GMT
Thanks, I know how to patch it, just check the $?.
But, I wish there is any developer help to check in into archlinux's makepkg.

Loading...