portage-utils icon indicating copy to clipboard operation
portage-utils copied to clipboard

Fix paths resolving without a leading '/'

Open konsolebox opened this issue 1 year ago • 0 comments

This error happens while running some commands like 'qwhich ' or 'qlist -t '. It outputs error lines like the following:

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.

konsolebox avatar Sep 13 '24 11:09 konsolebox