Merged from trunk 5885:5891
Fix "UnboundLocalError: local variable 'portage' referenced before
assignment" caused by a local import hiding a global import
(undid changeset 5884:5885 for this)
For bug #165349, use the portage_versions regex (via pkgsplit) instead
of the incompatible ones that repoman currently uses.
Document --config-root for bug #165334.
For bug #165382, don't raise a ValueError in cpv_expand() if there are
only two matches and one of them is a virtual. Prefer the non-virtual
instead.
Ensure that the code for bug #165342 only affects name collisions with
virtuals.
svn path=/main/branches/prefix/; revision=5892