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
Created attachment 322605 [details, diff] Sanity check "<eroot>" arguments.
Thanks, your patch is in git: http://git.overlays.gentoo.org/gitweb/?p=proj/portage.git;a=commit;h=821fe40222e75ba08e5456577321fa5d1f12e69a
This is fixed in 2.1.11.13 and 2.2.0_alpha124.