Do nothing gracefully

3 posts / 0 new
Last post
#1 Wed, 01/20/2016 - 04:57
joe443

Do nothing gracefully

From an ancient (1974) book called "The Elements of Programming Style": "Make sure your code does 'nothing' gracefully."

Fast-forward to 2016.

After several tries, the Virtualmin GPL install.sh script finally ran without errors.

Then, absent-mindedly, I ran it yet again.

INFO - Download of http://software.virtualmin.com/gpl/rhel/7.2.1511/x86_64/virtualmin-release-latest.noarch.rpm Succeeded.
package virtualmin-release-1.0-5.gpl.rhel.noarch is already installed

FATAL - Fatal Error Occurred: Installation of virtualmin-release failed: 1
FATAL - Cannot continue installation.
FATAL - Attempting to remove virtualmin repository configuration, so the installation can be
FATAL - re-attempted after any problems have been resolved.
Wed, 01/20/2016 - 09:28
andreychek

Howdy,

That message itself is harmless, it's just saying that one package is already installed.

If you're suggesting the error could be improved -- yeah improved error detection and reporting throughout the install script isn't a bad idea at all. There's a few areas that just don't show good errors if something goes awry.

Joe recently began revamping the installer a bit, and adding to that improved error detection and reporting would be a good feature! I'll get with him on that.

-Eric

Wed, 01/20/2016 - 17:43 (Reply to #2)
joe443

Not harmless -- see where it says: "Attempting to remove virtualmin repository configuration".

But really, my point was not the error itself, but rather, the humor and irony that 42 years later, and bright people are still struggling with how to do 'nothing'. The concept is trivial: If there's nothing to do, then do nothing, instead of deleting something, aborting the program, etc.

Topic locked