portageq eclass_path always searches in the host repo, even when the eroot parameter is provided. In this case, it is not as simple as overriding the configroot for the eclass_path command. Although that then does map to the correct repo, portage fails to find the eclass within that repo unless the repo path provided in the eroot is relative to the host's root. Reproducible: Always Steps to Reproduce: The following script demonstrates the problem: #!/bin/bash mkdir -p /tmp/portageq/etc/portage cat > /tmp/portageq/etc/portage/repos.conf <<EOF [gentoo] location = /var/blah/gentoo EOF mkdir -p /tmp/portageq/var/blah/gentoo/eclass touch /tmp/portageq/var/blah/gentoo/eclass/user.eclass portageq --version portageq eclass_path /tmp/portageq gentoo user A more comprehensive test script will be attached Actual Results: Portage 2.3.49 /usr/portage/eclass/user.eclass It always locates an eclass within the host's repos. However, when portageq is modified with @uses_configroot for eclass_path, the output is blank. Expected Results: Should always be able to find the eclass within the eroot repo. I expect the example above should output: /var/blah/gentoo/eclass/user.eclass
Created attachment 554322 [details] demonstrates a number of test case To use the system installed portageq, run the test as: ./test-portageq-eclass_path.sh To run with a modified portageq, define a portageq variable pointing to that instance; eg: portageq=./portageq ./test-portageq-eclass_path.sh