some logic to decide whether to install or upgrade a quark