Added basic (and still broken) support for package upgrades