I've been using zero-conf scripts to download the pharo vm for a while and occasionally the download fails to install the vm in the pharo-vm directory .... silently ..... with no clue as to what happened. even worse the exit status is zero so the failure isn't noticed until much later on in my install when an attempt is made to actually use the vm .... I do know that when I see these failures the pharo-vm does get created but is empty ... I got another failure today and figured that I would dig into this on my end to see if I could understand what might be going on .... The section of the zero-conf script that is suspect is the following: mkdir $VM_DIR $DOWNLOAD_TO$VM_DIR/vm.zip $VM_URL After the $VM_DIR is created (which I know happens), the $DOWNLOAD_TO script is run. Recently, I learned that a side effect of using the --silent option for curl is that error messages are also suppressed and I see that for curl, the `--silent` option is being used: if [[ `which curl 2> /dev/null` ]]; then DOWNLOAD="curl --silent --location --compressed "; DOWNLOAD_TO="$DOWNLOAD --output "; elif [[ `which wget 2> /dev/null` ]]; then DOWNLOAD_TO="wget --quiet --output-document="; DOWNLOAD="$DOWNLOAD_TO-"; else echo "Please install curl or wget on your machine"; exit 1 fi For curl if you want to turn off the progress meter (a good thing) and continue to report errors, you need to use --show-error in conjunction with --silent (as described in the man page) I think the same thing applies to wget, --quiet turns off error messages and progress .... you probably should be using --no-verbose to continue to get error messages ... Dale
If it matters, I'm downloading the pharo30 vm: get.pharo.org/vm30 On 11/23/2015 03:25 PM, Dale Henrichs wrote:
I've been using zero-conf scripts to download the pharo vm for a while and occasionally the download fails to install the vm in the pharo-vm directory .... silently ..... with no clue as to what happened. even worse the exit status is zero so the failure isn't noticed until much later on in my install when an attempt is made to actually use the vm .... I do know that when I see these failures the pharo-vm does get created but is empty ...
I got another failure today and figured that I would dig into this on my end to see if I could understand what might be going on ....
The section of the zero-conf script that is suspect is the following:
mkdir $VM_DIR $DOWNLOAD_TO$VM_DIR/vm.zip $VM_URL
After the $VM_DIR is created (which I know happens), the $DOWNLOAD_TO script is run. Recently, I learned that a side effect of using the --silent option for curl is that error messages are also suppressed and I see that for curl, the `--silent` option is being used:
if [[ `which curl 2> /dev/null` ]]; then DOWNLOAD="curl --silent --location --compressed "; DOWNLOAD_TO="$DOWNLOAD --output "; elif [[ `which wget 2> /dev/null` ]]; then DOWNLOAD_TO="wget --quiet --output-document="; DOWNLOAD="$DOWNLOAD_TO-"; else echo "Please install curl or wget on your machine"; exit 1 fi
For curl if you want to turn off the progress meter (a good thing) and continue to report errors, you need to use --show-error in conjunction with --silent (as described in the man page)
I think the same thing applies to wget, --quiet turns off error messages and progress .... you probably should be using --no-verbose to continue to get error messages ...
Dale
In case more info is needed, you can look at an example of a failure on travis[1], where an apparently successful download of the vm ends up with a non-existent pharo/pharo-vm/pharo executable on linx ... I suspect (hope?) that I'm missing some crucial error information from the download... Dale [1] https://travis-ci.org/GsDevKit/GsDevKit_home/jobs/92825487 On 11/23/2015 03:29 PM, Dale Henrichs wrote:
If it matters, I'm downloading the pharo30 vm: get.pharo.org/vm30
On 11/23/2015 03:25 PM, Dale Henrichs wrote:
I've been using zero-conf scripts to download the pharo vm for a while and occasionally the download fails to install the vm in the pharo-vm directory .... silently ..... with no clue as to what happened. even worse the exit status is zero so the failure isn't noticed until much later on in my install when an attempt is made to actually use the vm .... I do know that when I see these failures the pharo-vm does get created but is empty ...
I got another failure today and figured that I would dig into this on my end to see if I could understand what might be going on ....
The section of the zero-conf script that is suspect is the following:
mkdir $VM_DIR $DOWNLOAD_TO$VM_DIR/vm.zip $VM_URL
After the $VM_DIR is created (which I know happens), the $DOWNLOAD_TO script is run. Recently, I learned that a side effect of using the --silent option for curl is that error messages are also suppressed and I see that for curl, the `--silent` option is being used:
if [[ `which curl 2> /dev/null` ]]; then DOWNLOAD="curl --silent --location --compressed "; DOWNLOAD_TO="$DOWNLOAD --output "; elif [[ `which wget 2> /dev/null` ]]; then DOWNLOAD_TO="wget --quiet --output-document="; DOWNLOAD="$DOWNLOAD_TO-"; else echo "Please install curl or wget on your machine"; exit 1 fi
For curl if you want to turn off the progress meter (a good thing) and continue to report errors, you need to use --show-error in conjunction with --silent (as described in the man page)
I think the same thing applies to wget, --quiet turns off error messages and progress .... you probably should be using --no-verbose to continue to get error messages ...
Dale
2015-11-23 20:25 GMT-03:00 Dale Henrichs <dale.henrichs@gemtalksystems.com>:
I've been using zero-conf scripts to download the pharo vm for a while and occasionally the download fails to install the vm in the pharo-vm directory .... silently ..... with no clue as to what happened. even worse the exit status is zero so the failure isn't noticed until much later on in my install when an attempt is made to actually use the vm .... I do know that when I see these failures the pharo-vm does get created but is empty ...
+1. I've been bitten by this too. I would also like the option of seeing the progress of the download of the sources AND vm, because sometimes I want to know how the download is going on, speed, etc. Regards! -- Esteban
On 11/23/2015 03:39 PM, Esteban A. Maringolo wrote:
2015-11-23 20:25 GMT-03:00 Dale Henrichs <dale.henrichs@gemtalksystems.com>:
I've been using zero-conf scripts to download the pharo vm for a while and occasionally the download fails to install the vm in the pharo-vm directory .... silently ..... with no clue as to what happened. even worse the exit status is zero so the failure isn't noticed until much later on in my install when an attempt is made to actually use the vm .... I do know that when I see these failures the pharo-vm does get created but is empty ... +1. I've been bitten by this too.
I would also like the option of seeing the progress of the download of the sources AND vm, because sometimes I want to know how the download is going on, speed, etc.
Regards!
-- Esteban
I agree with the progress, but when running as a batch job, you end up with a ton of junk being dumped out into the log file ... getting rid of junk from a log file is how I learned about the problem with --silent:) With regards to the issue I am having --- I have hit a point in my testing (on travis) where I consistently get the:
/home/travis/build/GsDevKit/GsDevKit_home/shared/pharo/pharo: line 11: /home/travis/build/GsDevKit/GsDevKit_home/shared/pharo/pharo-vm/pharo: No such file or directory
error message yet the following appears to work:
if [ "$OS" == "win" ]; then PHARO_VM=`find $VM_DIR -name ${VM_BINARY_NAME}.exe` elif [ "$OS" == "mac" ]; then PHARO_VM=`find $VM_DIR -name ${VM_BINARY_NAME}` elif [ "$OS" == "linux" ]; then PHARO_VM=`find $VM_DIR -name ${VM_BINARY_NAME_LINUX}` fi
echo $PHARO_VM
since `pharo-vm/pharo` is properly echoed even though the file does not appear to exist? I'm digging deeper .... Dale
As I mentioned in the previous email, I sometimes have users report that they get the following error in their log file when installing pharo/GsDevKit-Home:
/home/travis/build/GsDevKit/GsDevKit_home/shared/pharo/pharo: line 11: /home/travis/build/GsDevKit/GsDevKit_home/shared/pharo
and I assumed that it was some sort of unreported error while downloading the pharo-vm (--silent used without --show-error for curl) ... fortunately I just started reliably getting this error on travis[1] and was able to track down the root cause of the bogus "file does not exist message" to the fact that the 32 bit libraries have not been installed[2]. It's true that the zero-conf script reports info that the 32-bit libraries were not installed, but the linux error message in this case is completely misleading ... it wasn't until I verified that the file did indeed exist[1] that I was able to investigate this further --- in my case I was expecting the 32-bit libraries to get installed in a later step and changes to the script structure resulted in the 32 bit library install being skipped ... At the end of the day, I think that error messages should not be suppressed by the zero-conf scripts, especially given the fact that the error message you get when a download does fail is pretty much the same as you'd get when you don't have the 32 bit libraries installed ... In my case, now that I understand that I cannot rely on a proper error error when 32-libraries have not been installed, I will have to see if I can come up with a way to provide a better error message for GsDevKit_home users .... Dale [1] https://travis-ci.org/GsDevKit/GsDevKit_home/jobs/92839591#L352 [2] http://askubuntu.com/questions/133389/no-such-file-or-directory-but-the-file... On 11/23/2015 04:05 PM, Dale Henrichs wrote:
On 11/23/2015 03:39 PM, Esteban A. Maringolo wrote:
2015-11-23 20:25 GMT-03:00 Dale Henrichs <dale.henrichs@gemtalksystems.com>:
I've been using zero-conf scripts to download the pharo vm for a while and occasionally the download fails to install the vm in the pharo-vm directory .... silently ..... with no clue as to what happened. even worse the exit status is zero so the failure isn't noticed until much later on in my install when an attempt is made to actually use the vm .... I do know that when I see these failures the pharo-vm does get created but is empty ... +1. I've been bitten by this too.
I would also like the option of seeing the progress of the download of the sources AND vm, because sometimes I want to know how the download is going on, speed, etc.
Regards!
-- Esteban
I agree with the progress, but when running as a batch job, you end up with a ton of junk being dumped out into the log file ... getting rid of junk from a log file is how I learned about the problem with --silent:)
With regards to the issue I am having --- I have hit a point in my testing (on travis) where I consistently get the:
/home/travis/build/GsDevKit/GsDevKit_home/shared/pharo/pharo: line 11: /home/travis/build/GsDevKit/GsDevKit_home/shared/pharo/pharo-vm/pharo: No such file or directory
error message yet the following appears to work:
if [ "$OS" == "win" ]; then PHARO_VM=`find $VM_DIR -name ${VM_BINARY_NAME}.exe` elif [ "$OS" == "mac" ]; then PHARO_VM=`find $VM_DIR -name ${VM_BINARY_NAME}` elif [ "$OS" == "linux" ]; then PHARO_VM=`find $VM_DIR -name ${VM_BINARY_NAME_LINUX}` fi
echo $PHARO_VM
since `pharo-vm/pharo` is properly echoed even though the file does not appear to exist? I'm digging deeper ....
Dale
On Tue, Nov 24, 2015 at 8:51 AM, Dale Henrichs <dale.henrichs@gemtalksystems.com> wrote:
As I mentioned in the previous email, I sometimes have users report that they get the following error in their log file when installing pharo/GsDevKit-Home:
/home/travis/build/GsDevKit/GsDevKit_home/shared/pharo/pharo: line 11: /home/travis/build/GsDevKit/GsDevKit_home/shared/pharo
and I assumed that it was some sort of unreported error while downloading the pharo-vm (--silent used without --show-error for curl) ... fortunately I just started reliably getting this error on travis[1] and was able to track down the root cause of the bogus "file does not exist message" to the fact that the 32 bit libraries have not been installed[2].
It's true that the zero-conf script reports info that the 32-bit libraries were not installed, but the linux error message in this case is completely misleading ... it wasn't until I verified that the file did indeed exist[1] that I was able to investigate this further --- in my case I was expecting the 32-bit libraries to get installed in a later step and changes to the script structure resulted in the 32 bit library install being skipped ...
At the end of the day, I think that error messages should not be suppressed by the zero-conf scripts, especially given the fact that the error message you get when a download does fail is pretty much the same as you'd get when you don't have the 32 bit libraries installed ...
In my case, now that I understand that I cannot rely on a proper error error when 32-libraries have not been installed, I will have to see if I can come up with a way to provide a better error message for GsDevKit_home users ....
Dale
[1] https://travis-ci.org/GsDevKit/GsDevKit_home/jobs/92839591#L352 [2] http://askubuntu.com/questions/133389/no-such-file-or-directory-but-the-file...
On 11/23/2015 04:05 PM, Dale Henrichs wrote:
On 11/23/2015 03:39 PM, Esteban A. Maringolo wrote:
2015-11-23 20:25 GMT-03:00 Dale Henrichs <dale.henrichs@gemtalksystems.com>:
I've been using zero-conf scripts to download the pharo vm for a while and occasionally the download fails to install the vm in the pharo-vm directory .... silently ..... with no clue as to what happened. even worse the exit status is zero so the failure isn't noticed until much later on in my install when an attempt is made to actually use the vm .... I do know that when I see these failures the pharo-vm does get created but is empty ...
+1. I've been bitten by this too.
I would also like the option of seeing the progress of the download of the sources AND vm, because sometimes I want to know how the download is going on, speed, etc.
Regards!
-- Esteban
I agree with the progress, but when running as a batch job, you end up with a ton of junk being dumped out into the log file ... getting rid of junk from a log file is how I learned about the problem with --silent:)
With regards to the issue I am having --- I have hit a point in my testing (on travis) where I consistently get the:
/home/travis/build/GsDevKit/GsDevKit_home/shared/pharo/pharo: line 11: /home/travis/build/GsDevKit/GsDevKit_home/shared/pharo/pharo-vm/pharo: No such file or directory
error message yet the following appears to work:
if [ "$OS" == "win" ]; then PHARO_VM=`find $VM_DIR -name ${VM_BINARY_NAME}.exe` elif [ "$OS" == "mac" ]; then PHARO_VM=`find $VM_DIR -name ${VM_BINARY_NAME}` elif [ "$OS" == "linux" ]; then PHARO_VM=`find $VM_DIR -name ${VM_BINARY_NAME_LINUX}` fi
echo $PHARO_VM
since `pharo-vm/pharo` is properly echoed even though the file does not appear to exist? I'm digging deeper ....
I don't have a linux box to check this on, but how about something like... if [ `ldd $PHARO_VM 2>/dev/null | grep -c 'not found'` -ne 0 ]; then echo "Missing library dependencies..." ldd $PHARO_VM 2>/dev/null | grep 'not found' echo "Maybe you need to..." echo " $ sudo dpkg --add-architecture i386" echo " $ sudo apt-get update" echo "and for each $MISSING_LIBRARY..." echo " $ sudo apt-get install $MISSING_LIBRARY:386" exit 1 fi cheers -ben
On 11/24/2015 04:30 AM, Ben Coman wrote:
On Tue, Nov 24, 2015 at 8:51 AM, Dale Henrichs <dale.henrichs@gemtalksystems.com> wrote:
As I mentioned in the previous email, I sometimes have users report that they get the following error in their log file when installing pharo/GsDevKit-Home:
/home/travis/build/GsDevKit/GsDevKit_home/shared/pharo/pharo: line 11: /home/travis/build/GsDevKit/GsDevKit_home/shared/pharo
and I assumed that it was some sort of unreported error while downloading the pharo-vm (--silent used without --show-error for curl) ... fortunately I just started reliably getting this error on travis[1] and was able to track down the root cause of the bogus "file does not exist message" to the fact that the 32 bit libraries have not been installed[2].
It's true that the zero-conf script reports info that the 32-bit libraries were not installed, but the linux error message in this case is completely misleading ... it wasn't until I verified that the file did indeed exist[1] that I was able to investigate this further --- in my case I was expecting the 32-bit libraries to get installed in a later step and changes to the script structure resulted in the 32 bit library install being skipped ...
At the end of the day, I think that error messages should not be suppressed by the zero-conf scripts, especially given the fact that the error message you get when a download does fail is pretty much the same as you'd get when you don't have the 32 bit libraries installed ...
In my case, now that I understand that I cannot rely on a proper error error when 32-libraries have not been installed, I will have to see if I can come up with a way to provide a better error message for GsDevKit_home users ....
Dale
[1] https://travis-ci.org/GsDevKit/GsDevKit_home/jobs/92839591#L352 [2] http://askubuntu.com/questions/133389/no-such-file-or-directory-but-the-file...
On 11/23/2015 04:05 PM, Dale Henrichs wrote:
On 11/23/2015 03:39 PM, Esteban A. Maringolo wrote:
2015-11-23 20:25 GMT-03:00 Dale Henrichs <dale.henrichs@gemtalksystems.com>:
I've been using zero-conf scripts to download the pharo vm for a while and occasionally the download fails to install the vm in the pharo-vm directory .... silently ..... with no clue as to what happened. even worse the exit status is zero so the failure isn't noticed until much later on in my install when an attempt is made to actually use the vm .... I do know that when I see these failures the pharo-vm does get created but is empty ... +1. I've been bitten by this too.
I would also like the option of seeing the progress of the download of the sources AND vm, because sometimes I want to know how the download is going on, speed, etc.
Regards!
-- Esteban
I agree with the progress, but when running as a batch job, you end up with a ton of junk being dumped out into the log file ... getting rid of junk from a log file is how I learned about the problem with --silent:)
With regards to the issue I am having --- I have hit a point in my testing (on travis) where I consistently get the:
/home/travis/build/GsDevKit/GsDevKit_home/shared/pharo/pharo: line 11: /home/travis/build/GsDevKit/GsDevKit_home/shared/pharo/pharo-vm/pharo: No such file or directory
error message yet the following appears to work:
if [ "$OS" == "win" ]; then PHARO_VM=`find $VM_DIR -name ${VM_BINARY_NAME}.exe` elif [ "$OS" == "mac" ]; then PHARO_VM=`find $VM_DIR -name ${VM_BINARY_NAME}` elif [ "$OS" == "linux" ]; then PHARO_VM=`find $VM_DIR -name ${VM_BINARY_NAME_LINUX}` fi
echo $PHARO_VM
since `pharo-vm/pharo` is properly echoed even though the file does not appear to exist? I'm digging deeper ....
I don't have a linux box to check this on, but how about something like...
if [ `ldd $PHARO_VM 2>/dev/null | grep -c 'not found'` -ne 0 ]; then echo "Missing library dependencies..." ldd $PHARO_VM 2>/dev/null | grep 'not found' echo "Maybe you need to..." echo " $ sudo dpkg --add-architecture i386" echo " $ sudo apt-get update" echo "and for each $MISSING_LIBRARY..." echo " $ sudo apt-get install $MISSING_LIBRARY:386" exit 1 fi
cheers -ben
I tend to agree with the original choice to not fail if the 32-bit libraries are not installed before downloading .... This kind of error exit _should_ be present in the pharo/poharo-ui scripts, so if one attempts to _run_ pharo without having the 32-bit libraries installed, you would get a meaningful error message .... Dale
On Tue, Nov 24, 2015 at 7:25 AM, Dale Henrichs <dale.henrichs@gemtalksystems.com> wrote:
I've been using zero-conf scripts to download the pharo vm for a while and occasionally the download fails to install the vm in the pharo-vm directory .... silently ..... with no clue as to what happened. even worse the exit status is zero so the failure isn't noticed until much later on in my install when an attempt is made to actually use the vm
So to fail early after the download we should... if [ ! -f "$VM_DIR/vm.zip" ] ; then echo "BOOM!" exit 1; fi (?) cheers -ben
.... I do know that when I see these failures the pharo-vm [directory] does get created but is empty ...
I got another failure today and figured that I would dig into this on my end to see if I could understand what might be going on ....
The section of the zero-conf script that is suspect is the following:
mkdir $VM_DIR $DOWNLOAD_TO$VM_DIR/vm.zip $VM_URL
After the $VM_DIR is created (which I know happens), the $DOWNLOAD_TO script is run. Recently, I learned that a side effect of using the --silent option for curl is that error messages are also suppressed and I see that for curl, the `--silent` option is being used:
if [[ `which curl 2> /dev/null` ]]; then DOWNLOAD="curl --silent --location --compressed "; DOWNLOAD_TO="$DOWNLOAD --output "; elif [[ `which wget 2> /dev/null` ]]; then DOWNLOAD_TO="wget --quiet --output-document="; DOWNLOAD="$DOWNLOAD_TO-"; else echo "Please install curl or wget on your machine"; exit 1 fi
For curl if you want to turn off the progress meter (a good thing) and continue to report errors, you need to use --show-error in conjunction with --silent (as described in the man page)
I think the same thing applies to wget, --quiet turns off error messages and progress .... you probably should be using --no-verbose to continue to get error messages ...
Dale
Actually, I think that you should add the --show-error (with --silent) for curl and --no-verbose for wget, so that you get a more useful error message than "BOOM" ... you also should get a script exit from the curl/wget command as well which is exactly what _should_ happen... Dale On 11/24/2015 02:39 AM, Ben Coman wrote:
On Tue, Nov 24, 2015 at 7:25 AM, Dale Henrichs <dale.henrichs@gemtalksystems.com> wrote:
I've been using zero-conf scripts to download the pharo vm for a while and occasionally the download fails to install the vm in the pharo-vm directory .... silently ..... with no clue as to what happened. even worse the exit status is zero so the failure isn't noticed until much later on in my install when an attempt is made to actually use the vm So to fail early after the download we should... if [ ! -f "$VM_DIR/vm.zip" ] ; then echo "BOOM!" exit 1; fi
(?) cheers -ben
.... I do know that when I see these failures the pharo-vm [directory] does get created but is empty ...
I got another failure today and figured that I would dig into this on my end to see if I could understand what might be going on ....
The section of the zero-conf script that is suspect is the following:
mkdir $VM_DIR $DOWNLOAD_TO$VM_DIR/vm.zip $VM_URL
After the $VM_DIR is created (which I know happens), the $DOWNLOAD_TO script is run. Recently, I learned that a side effect of using the --silent option for curl is that error messages are also suppressed and I see that for curl, the `--silent` option is being used:
if [[ `which curl 2> /dev/null` ]]; then DOWNLOAD="curl --silent --location --compressed "; DOWNLOAD_TO="$DOWNLOAD --output "; elif [[ `which wget 2> /dev/null` ]]; then DOWNLOAD_TO="wget --quiet --output-document="; DOWNLOAD="$DOWNLOAD_TO-"; else echo "Please install curl or wget on your machine"; exit 1 fi
For curl if you want to turn off the progress meter (a good thing) and continue to report errors, you need to use --show-error in conjunction with --silent (as described in the man page)
I think the same thing applies to wget, --quiet turns off error messages and progress .... you probably should be using --no-verbose to continue to get error messages ...
Dale
On Wed, Nov 25, 2015 at 1:56 AM, Dale Henrichs <dale.henrichs@gemtalksystems.com> wrote:
Actually, I think that you should add the --show-error (with --silent) for curl and --no-verbose for wget, so that you get a more useful error message than "BOOM" ... you also should get a script exit from the curl/wget command as well which is exactly what _should_ happen...
"BOOM" was just indicative. I should have said "$BOOM" ? ;) cheers -ben
On 11/24/2015 02:39 AM, Ben Coman wrote:
On Tue, Nov 24, 2015 at 7:25 AM, Dale Henrichs <dale.henrichs@gemtalksystems.com> wrote:
I've been using zero-conf scripts to download the pharo vm for a while and occasionally the download fails to install the vm in the pharo-vm directory .... silently ..... with no clue as to what happened. even worse the exit status is zero so the failure isn't noticed until much later on in my install when an attempt is made to actually use the vm
So to fail early after the download we should... if [ ! -f "$VM_DIR/vm.zip" ] ; then echo "BOOM!" exit 1; fi
(?) cheers -ben
.... I do know that when I see these failures the pharo-vm [directory] does get created but is empty ...
I got another failure today and figured that I would dig into this on my end to see if I could understand what might be going on ....
The section of the zero-conf script that is suspect is the following:
mkdir $VM_DIR $DOWNLOAD_TO$VM_DIR/vm.zip $VM_URL
After the $VM_DIR is created (which I know happens), the $DOWNLOAD_TO script is run. Recently, I learned that a side effect of using the --silent option for curl is that error messages are also suppressed and I see that for curl, the `--silent` option is being used:
if [[ `which curl 2> /dev/null` ]]; then DOWNLOAD="curl --silent --location --compressed "; DOWNLOAD_TO="$DOWNLOAD --output "; elif [[ `which wget 2> /dev/null` ]]; then DOWNLOAD_TO="wget --quiet --output-document="; DOWNLOAD="$DOWNLOAD_TO-"; else echo "Please install curl or wget on your machine"; exit 1 fi
For curl if you want to turn off the progress meter (a good thing) and continue to report errors, you need to use --show-error in conjunction with --silent (as described in the man page)
I think the same thing applies to wget, --quiet turns off error messages and progress .... you probably should be using --no-verbose to continue to get error messages ...
Dale
I'm bad with scripts :) but this is important to improve them. Can you open a bug entry so that this discussion is not lost? Le 24/11/15 00:25, Dale Henrichs a écrit :
I've been using zero-conf scripts to download the pharo vm for a while and occasionally the download fails to install the vm in the pharo-vm directory .... silently ..... with no clue as to what happened. even worse the exit status is zero so the failure isn't noticed until much later on in my install when an attempt is made to actually use the vm .... I do know that when I see these failures the pharo-vm does get created but is empty ...
I got another failure today and figured that I would dig into this on my end to see if I could understand what might be going on ....
The section of the zero-conf script that is suspect is the following:
mkdir $VM_DIR $DOWNLOAD_TO$VM_DIR/vm.zip $VM_URL
After the $VM_DIR is created (which I know happens), the $DOWNLOAD_TO script is run. Recently, I learned that a side effect of using the --silent option for curl is that error messages are also suppressed and I see that for curl, the `--silent` option is being used:
if [[ `which curl 2> /dev/null` ]]; then DOWNLOAD="curl --silent --location --compressed "; DOWNLOAD_TO="$DOWNLOAD --output "; elif [[ `which wget 2> /dev/null` ]]; then DOWNLOAD_TO="wget --quiet --output-document="; DOWNLOAD="$DOWNLOAD_TO-"; else echo "Please install curl or wget on your machine"; exit 1 fi
For curl if you want to turn off the progress meter (a good thing) and continue to report errors, you need to use --show-error in conjunction with --silent (as described in the man page)
I think the same thing applies to wget, --quiet turns off error messages and progress .... you probably should be using --no-verbose to continue to get error messages ...
Dale
https://pharo.fogbugz.com/default.asp?17099 On Tue, Nov 24, 2015 at 10:41 PM, stepharo <stepharo@free.fr> wrote:
I'm bad with scripts :) but this is important to improve them. Can you open a bug entry so that this discussion is not lost?
Le 24/11/15 00:25, Dale Henrichs a écrit :
I've been using zero-conf scripts to download the pharo vm for a while and occasionally the download fails to install the vm in the pharo-vm directory .... silently ..... with no clue as to what happened. even worse the exit status is zero so the failure isn't noticed until much later on in my install when an attempt is made to actually use the vm .... I do know that when I see these failures the pharo-vm does get created but is empty ...
I got another failure today and figured that I would dig into this on my end to see if I could understand what might be going on ....
The section of the zero-conf script that is suspect is the following:
mkdir $VM_DIR $DOWNLOAD_TO$VM_DIR/vm.zip $VM_URL
After the $VM_DIR is created (which I know happens), the $DOWNLOAD_TO script is run. Recently, I learned that a side effect of using the --silent option for curl is that error messages are also suppressed and I see that for curl, the `--silent` option is being used:
if [[ `which curl 2> /dev/null` ]]; then DOWNLOAD="curl --silent --location --compressed "; DOWNLOAD_TO="$DOWNLOAD --output "; elif [[ `which wget 2> /dev/null` ]]; then DOWNLOAD_TO="wget --quiet --output-document="; DOWNLOAD="$DOWNLOAD_TO-"; else echo "Please install curl or wget on your machine"; exit 1 fi
For curl if you want to turn off the progress meter (a good thing) and continue to report errors, you need to use --show-error in conjunction with --silent (as described in the man page)
I think the same thing applies to wget, --quiet turns off error messages and progress .... you probably should be using --no-verbose to continue to get error messages ...
Dale
participants (4)
-
Ben Coman -
Dale Henrichs -
Esteban A. Maringolo -
stepharo