Select correct device

When a repository for common hardware is selected, override the selection and select a device that is dependant of that repository.

This fixes Cid failures for common hardware repositories that offer device-specific apps ('Advanced settings').

I am not really skilled in scripting, so you might need to take a very close look at this one...