summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorZac Medico <zmedico@gentoo.org>2008-12-26 21:14:35 +0000
committerZac Medico <zmedico@gentoo.org>2008-12-26 21:14:35 +0000
commit1a421c3e6b57a4964aedb1677ed070a14968dde1 (patch)
tree0e30da221a1e86b3133a577d9e54335da5f54d44
parentf903769489e1d0f1c54acf62f13e4d72e1fc0473 (diff)
downloadportage-1a421c3e6b57a4964aedb1677ed070a14968dde1.tar.gz
portage-1a421c3e6b57a4964aedb1677ed070a14968dde1.tar.bz2
portage-1a421c3e6b57a4964aedb1677ed070a14968dde1.zip
Bail out earlier if the file name argument doesn't end with '.ebuild'. Thanks
to Diego 'Flameeyes' Pettenò for reporting. svn path=/main/trunk/; revision=12350
-rwxr-xr-xbin/ebuild6
1 files changed, 6 insertions, 0 deletions
diff --git a/bin/ebuild b/bin/ebuild
index 90c599e26..ebb96f0bb 100755
--- a/bin/ebuild
+++ b/bin/ebuild
@@ -82,6 +82,12 @@ if portage.settings["NOCOLOR"] in ("yes","true") or not sys.stdout.isatty():
portage.output.nocolor()
ebuild = pargs.pop(0)
+
+if not ebuild.endswith(".ebuild"):
+ portage.writemsg("'%s' does not end with '.ebuild'.\n" % \
+ (ebuild,), noiselevel=-1)
+ sys.exit(1)
+
if not os.path.isabs(ebuild):
mycwd = os.getcwd()
# Try to get the non-canonical path from the PWD evironment variable, since