Ray Rashif wrote: > 2009/10/22 Xavier <[email protected]> > >> On Wed, Oct 21, 2009 at 7:38 PM, Cedric Staniewski <[email protected]> wrote: >>> - eval $dlcmd || return $? >>> + eval $dlcmd >>> + local ret=$? >>> + if [ $ret -gt 0 ]; then >>> + [ ! -s "$dlfile" ] && rm -f -- "$dlfile" >>> + return $ret >>> + fi >>> >> I don't understand, I cannot get it to work. >> It looks like when "eval $dlcmd" fails, nothing else is run in that >> function. >> >> I added a echo statement, but I still only see that message at the end : >> ==> ERROR: An unknown error has occurred. Exiting... >> > > looks like there is no return to handle (fail but no reason given), so > makepkg traps that.
That's odd. I patched makepkg from pacman 3.3.2 to test the patch, so I did not notice this. But this bug (or is it intended?) already exists in master. You can remove the "|| return $?" part from the eval line, add echos and it fails just before the second echo. - eval $dlcmd || return $? + echo asdf + eval $dlcmd + echo dfgh $ sh makepkg -g ==> Retrieving Sources... -> Found baralga in build dir -> Downloading Baralga-Portable-1.4.4-SNAPSHOT.zip... asdf --2009-10-21 21:59:51-- http://download.origo.ethz.ch/baralga/147/Baralga-Portable-1.4.4-SNAPSHOT.zip Resolving download.origo.ethz.ch... 129.132.103.135, 2001:620:8:1000::15 Connecting to download.origo.ethz.ch|129.132.103.135|:80... connected. HTTP request sent, awaiting response... 404 Not Found 2009-10-21 21:59:51 ERROR 404: Not Found. ==> ERROR: An unknown error has occurred. Exiting...
