Fix bug with logic of temprepository
Add multi-distro support (first step)