added hard dependency checks when upgrading

Fixes #2854

cc @karlitschek @danimo @dragotin @bartv2 @blizzz