From a4828ac20dc2a71a60e8918c88afdea1845f7779 Mon Sep 17 00:00:00 2001 From: Zac Medico Date: Tue, 24 Mar 2009 02:48:27 +0000 Subject: Add support for FEATURES=parse-eapi-glep-55. This feature is only intended for experimental purposes and should not be enabled under normal circumstances. svn path=/main/trunk/; revision=13175 --- bin/ebuild | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) (limited to 'bin') diff --git a/bin/ebuild b/bin/ebuild index 55736dd3a..8e1d4432f 100755 --- a/bin/ebuild +++ b/bin/ebuild @@ -83,7 +83,14 @@ if portage.settings["NOCOLOR"] in ("yes","true") or not sys.stdout.isatty(): ebuild = pargs.pop(0) -if not ebuild.endswith(".ebuild"): +pf = None +if 'parse-eapi-glep-55' in portage.settings.features: + pf, eapi = portage._split_ebuild_name_glep55( + os.path.basename(ebuild)) +elif ebuild.endswith(".ebuild"): + pf = os.path.basename(ebuild)[:-7] + +if pf is None: portage.writemsg("'%s' does not end with '.ebuild'.\n" % \ (ebuild,), noiselevel=-1) sys.exit(1) @@ -120,8 +127,7 @@ if not os.path.exists(ebuild): sys.exit(1) ebuild_split = ebuild.split("/") -del ebuild_split[-2] -cpv = "/".join(ebuild_split[-2:])[:-7] +cpv = "%s/%s" % (ebuild_split[-3], pf) if not portage.catpkgsplit(cpv): print "!!! %s does not follow correct package syntax." % (cpv) @@ -158,8 +164,6 @@ def discard_digests(myebuild, mysettings, mydbapi): portage._doebuild_manifest_exempt_depend += 1 pkgdir = os.path.dirname(myebuild) fetchlist_dict = portage.FetchlistDict(pkgdir, mysettings, mydbapi) - cat, pkg = pkgdir.split(os.sep)[-2:] - cpv = cat + "/" + os.path.basename(myebuild)[:-7] from portage.manifest import Manifest mf = Manifest(pkgdir, mysettings["DISTDIR"], fetchlist_dict=fetchlist_dict, manifest1_compat=False) -- cgit v1.2.3-1-g7c22