Adds local RPM repository support. Fixes many repository ordering issues.