Autoupgrade + small refactoring

this need not to be defined here. It is used only if not registered, so you can define it there and make visual impact of distro_target variable smaller