portage-utils
portage-utils copied to clipboard
Fix paths resolving without a leading '/'
This error happens while running some commands like 'qwhich
qwhich: tree_open(): could not open repository at var/db/repos/gentoo (under root /)
Fix it by getting the real path of portroot first then decide whether rrepo has to be offsetted by the length of portroot's real path version or not.
Getting the real path of portroot first makes sure it's consistent to be matched with with the resulting path of rootovrl which is also a real path.