Don't install packages if there are metavariables

Fixes #756
Also fixes #696 since that was due to package building not propagating
errors to the caller!