Revert "reposetup: code cleanup"

This reverts commit dcc881c64a85ac0f9c065c0c8fb471dda4bf9984.