summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorZac Medico <zmedico@gentoo.org>2010-10-08 18:14:53 -0700
committerZac Medico <zmedico@gentoo.org>2010-10-11 18:39:53 -0700
commitd5dadfcffdcc337b1c0f4a7d642fee4f530b0093 (patch)
tree6ed9c672228137f7479919b18f7bfd93ff4cf74c
parent9454ba04f9ba06bfba2bf2fca6f5a2cf1b1b9d20 (diff)
downloadportage-d5dadfcffdcc337b1c0f4a7d642fee4f530b0093.tar.gz
portage-d5dadfcffdcc337b1c0f4a7d642fee4f530b0093.tar.bz2
portage-d5dadfcffdcc337b1c0f4a7d642fee4f530b0093.zip
Use EAPI to validate best/has_version atoms.
-rwxr-xr-xbin/portageq7
1 files changed, 5 insertions, 2 deletions
diff --git a/bin/portageq b/bin/portageq
index 4c9b9c13e..b450c7a18 100755
--- a/bin/portageq
+++ b/bin/portageq
@@ -80,7 +80,7 @@ def has_version(argv):
print("ERROR: insufficient parameters!")
sys.exit(2)
try:
- atom = portage.dep.Atom(argv[1])
+ atom = portage.dep.Atom(argv[1], eapi=eapi)
except portage.exception.InvalidAtom:
if atom_validate_strict:
portage.writemsg("ERROR: Invalid atom: '%s'\n" % argv[1],
@@ -114,7 +114,7 @@ def best_version(argv):
print("ERROR: insufficient parameters!")
sys.exit(2)
try:
- atom = portage.dep.Atom(argv[1])
+ atom = portage.dep.Atom(argv[1], eapi=eapi)
except portage.exception.InvalidAtom:
if atom_validate_strict:
portage.writemsg("ERROR: Invalid atom: '%s'\n" % argv[1],
@@ -617,6 +617,9 @@ def usage(argv):
print("\nRun portageq with --help for info")
atom_validate_strict = "EBUILD_PHASE" in os.environ
+eapi = None
+if atom_validate_strict:
+ eapi = os.environ.get('EAPI')
def main():
if "-h" in sys.argv or "--help" in sys.argv: