Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 433475 - portageq: clarify meaning of uses_root
Summary: portageq: clarify meaning of uses_root
Status: RESOLVED FIXED
Alias: None
Product: Portage Development
Classification: Unclassified
Component: Core (show other bugs)
Hardware: All All
: Normal minor (vote)
Assignee: Portage team
URL:
Whiteboard:
Keywords: InVCS
Depends on:
Blocks: 431026
  Show dependency tree
 
Reported: 2012-08-31 01:05 UTC by Greg Turner
Modified: 2012-10-17 05:10 UTC (History)
0 users

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


Attachments
Sanity check "<eroot>" arguments. (portageq_eroot_sanity.patch,6.02 KB, patch)
2012-08-31 01:06 UTC, Greg Turner
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Greg Turner 2012-08-31 01:05:23 UTC
s/uses_root/uses_eroot/g -- This name was chosen before its meaning was changed; update it to reflect its purporse.

Fix a left-over "<root>" arg-doc that never got updated to "<eroot>"

If a provided eroot argument was shorter than the ${EPREFIX}, portageq was truncating it down to nothing and activating relative root, which means this became equivalent to an explicit argument of "${PWD}/${EPREFIX}/".  This is obviously wrong; and a simple case of failing to sanity-check inputs from an interface that changed in a backward-incompatible way.

There's no provision in portageq to query EROOT's that don't end in ${EPREFIX}; so if the user makes such a request, instead of doing something pathological, dump a helpful error message and bail with a nonzero exit code.


Reproducible: Always

Steps to Reproduce:
from a prefix:

$ portageq has_version / app-shells/bash && yes || no
Actual Results:  
no

(unless ${PWD} happens to be a valid ROOT for this prefix -- in which case you'll get results from ${PWD}/${EPREFIX}

Expected Results:  
undefined -- invalid input
Comment 1 Greg Turner 2012-08-31 01:06:17 UTC
Created attachment 322605 [details, diff]
Sanity check "<eroot>" arguments.
Comment 3 Zac Medico gentoo-dev 2012-10-17 05:10:04 UTC
This is fixed in 2.1.11.13 and 2.2.0_alpha124.