summaryrefslogtreecommitdiffstats
path: root/bin/ebuild
diff options
context:
space:
mode:
authorArfrever Frehtes Taifersar Arahesis <Arfrever@Apache.Org>2012-05-12 05:58:38 +0200
committerArfrever Frehtes Taifersar Arahesis <Arfrever@Apache.Org>2012-05-12 05:58:38 +0200
commiteb2056631021a04b62c228206e44376f5c7a81ba (patch)
tree55ff4b6768d1b3acafa564ca213324cfdcfed751 /bin/ebuild
parent5b6f367ee9c163c46810012c43f9b12b6794496c (diff)
downloadportage-eb2056631021a04b62c228206e44376f5c7a81ba.tar.gz
portage-eb2056631021a04b62c228206e44376f5c7a81ba.tar.bz2
portage-eb2056631021a04b62c228206e44376f5c7a81ba.zip
Allow dots in package names in EAPI="4-python".
Diffstat (limited to 'bin/ebuild')
-rwxr-xr-xbin/ebuild10
1 files changed, 8 insertions, 2 deletions
diff --git a/bin/ebuild b/bin/ebuild
index 82f0ff990..35cdc1453 100755
--- a/bin/ebuild
+++ b/bin/ebuild
@@ -1,5 +1,5 @@
#!/usr/bin/python -O
-# Copyright 1999-2011 Gentoo Foundation
+# Copyright 1999-2012 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
from __future__ import print_function
@@ -29,6 +29,7 @@ def debug_signal(signum, frame):
signal.signal(signal.SIGUSR1, debug_signal)
import imp
+import io
import optparse
import os
@@ -165,7 +166,12 @@ if not os.path.exists(ebuild):
ebuild_split = ebuild.split("/")
cpv = "%s/%s" % (ebuild_split[-3], pf)
-if not portage.catpkgsplit(cpv):
+with io.open(_unicode_encode(ebuild, encoding=_encodings['fs'], errors='strict'),
+ mode='r', encoding=_encodings['repo.content'], errors='replace') as f:
+ eapi = portage._parse_eapi_ebuild_head(f)[0]
+if eapi is None:
+ eapi = "0"
+if not portage.catpkgsplit(cpv, eapi=eapi):
print("!!! %s does not follow correct package syntax." % (cpv))
sys.exit(1)