Remove duplication in creation of temporary package sources