Move SLES repository handling to single function

Preparation for adding local repository support.