From 9690c9b2f2e532c1a374a8cac4db914f215aae6f Mon Sep 17 00:00:00 2001 From: Zac Medico Date: Sat, 27 Dec 2008 18:27:52 +0000 Subject: [PATCH] =?utf8?q?Bail=20out=20earlier=20if=20the=20file=20name=20?= =?utf8?q?argument=20doesn't=20end=20with=20'.ebuild'.=20Thanks=20to=20Die?= =?utf8?q?go=20'Flameeyes'=20Petten=C3=B2=20for=20reporting.=20(trunk=20r1?= =?utf8?q?2350)?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit svn path=/main/branches/2.1.6/; revision=12355 --- bin/ebuild | 6 ++++++ 1 file changed, 6 insertions(+) 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 -- 2.26.2