diff options
author | Zac Medico <zmedico@gentoo.org> | 2008-12-27 18:27:52 +0000 |
---|---|---|
committer | Zac Medico <zmedico@gentoo.org> | 2008-12-27 18:27:52 +0000 |
commit | 9690c9b2f2e532c1a374a8cac4db914f215aae6f (patch) | |
tree | cc0f32b3b66358cb8c907d1ebb0f3049e2839330 | |
parent | 2e568bbebd56a22fc2d09fa2e5f84343cd401c6a (diff) | |
download | portage-9690c9b2f2e532c1a374a8cac4db914f215aae6f.tar.gz portage-9690c9b2f2e532c1a374a8cac4db914f215aae6f.tar.bz2 portage-9690c9b2f2e532c1a374a8cac4db914f215aae6f.zip |
Bail out earlier if the file name argument doesn't end with '.ebuild'. Thanks
to Diego 'Flameeyes' Pettenò for reporting. (trunk r12350)
svn path=/main/branches/2.1.6/; revision=12355
-rwxr-xr-x | bin/ebuild | 6 |
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 |