Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 670558 - portageq eclass_path fails with eroot parameter
Summary: portageq eclass_path fails with eroot parameter
Status: CONFIRMED
Alias: None
Product: Portage Development
Classification: Unclassified
Component: Core (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Portage team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2018-11-06 20:48 UTC by Bruce Schultz
Modified: 2018-11-07 00:39 UTC (History)
0 users

See Also:
Package list:
Runtime testing required: ---


Attachments
demonstrates a number of test case (test-portageq-eclass_path.sh,4.26 KB, application/x-shellscript)
2018-11-06 20:51 UTC, Bruce Schultz
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Bruce Schultz 2018-11-06 20:48:09 UTC
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
Comment 1 Bruce Schultz 2018-11-06 20:51:54 UTC
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