summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorZac Medico <zmedico@gentoo.org>2009-03-22 06:33:49 +0000
committerZac Medico <zmedico@gentoo.org>2009-03-22 06:33:49 +0000
commitfb13990521433c3215e44836d709728bafa4cf5d (patch)
tree830d5624ca330a75f545bc90ea164cb973ef1388
parent95423d8a20c53608538a2e26f9be541d7c7cb210 (diff)
downloadportage-fb13990521433c3215e44836d709728bafa4cf5d.tar.gz
portage-fb13990521433c3215e44836d709728bafa4cf5d.tar.bz2
portage-fb13990521433c3215e44836d709728bafa4cf5d.zip
Fix argument validation to allow file paths. Thanks to Arfrever for reporting.
svn path=/main/trunk/; revision=13140
-rw-r--r--pym/_emerge/__init__.py7
1 files changed, 7 insertions, 0 deletions
diff --git a/pym/_emerge/__init__.py b/pym/_emerge/__init__.py
index 992ba9008..bee4dc5a0 100644
--- a/pym/_emerge/__init__.py
+++ b/pym/_emerge/__init__.py
@@ -15669,6 +15669,13 @@ def emerge_main():
if x.startswith(SETPREFIX) or \
is_valid_package_atom(x):
continue
+ if x[:1] == os.sep:
+ continue
+ try:
+ os.lstat(x)
+ continue
+ except OSError:
+ pass
msg = []
msg.append("'%s' is not a valid package atom." % (x,))
msg.append("Please check ebuild(5) for full details.")