From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) by finch.gentoo.org (Postfix) with ESMTP id C478A138010 for ; Fri, 21 Sep 2012 04:31:31 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id F31F5E03E4; Fri, 21 Sep 2012 04:31:20 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) by pigeon.gentoo.org (Postfix) with ESMTP id BD1E5E03E4 for ; Fri, 21 Sep 2012 04:31:20 +0000 (UTC) Received: from hornbill.gentoo.org (hornbill.gentoo.org [94.100.119.163]) (using TLSv1 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id 9C42F33D149 for ; Fri, 21 Sep 2012 04:31:19 +0000 (UTC) Received: from localhost.localdomain (localhost [127.0.0.1]) by hornbill.gentoo.org (Postfix) with ESMTP id 47938E5445 for ; Fri, 21 Sep 2012 04:31:16 +0000 (UTC) From: "Arfrever Frehtes Taifersar Arahesis" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Arfrever Frehtes Taifersar Arahesis" Message-ID: <1348201812.257a7faf60ab5670b4b2cfb3507d1a2835caaff3.arfrever@gentoo> Subject: [gentoo-commits] proj/portage:master commit in: pym/portage/package/ebuild/_config/ X-VCS-Repository: proj/portage X-VCS-Files: pym/portage/package/ebuild/_config/LocationsManager.py X-VCS-Directories: pym/portage/package/ebuild/_config/ X-VCS-Committer: arfrever X-VCS-Committer-Name: Arfrever Frehtes Taifersar Arahesis X-VCS-Revision: 257a7faf60ab5670b4b2cfb3507d1a2835caaff3 X-VCS-Branch: master Date: Fri, 21 Sep 2012 04:31:16 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org X-Archives-Salt: 34b56410-9216-450b-a667-1caf21b676e2 X-Archives-Hash: 44ba6e385164a39134d3bbafc3786a63 commit: 257a7faf60ab5670b4b2cfb3507d1a2835caaff3 Author: Arfrever Frehtes Taifersar Arahesis Apache Org> AuthorDate: Fri Sep 21 04:30:12 2012 +0000 Commit: Arfrever Frehtes Taifersar Arahesis gmail com> CommitDate: Fri Sep 21 04:30:12 2012 +0000 URL: http://git.overlays.gentoo.org/gitweb/?p=proj/portage.git;a=commit;h=257a7faf Read profile EAPI earlier. --- .../package/ebuild/_config/LocationsManager.py | 38 ++++++++++--------- 1 files changed, 20 insertions(+), 18 deletions(-) diff --git a/pym/portage/package/ebuild/_config/LocationsManager.py b/pym/portage/package/ebuild/_config/LocationsManager.py index 365d507..2200be6 100644 --- a/pym/portage/package/ebuild/_config/LocationsManager.py +++ b/pym/portage/package/ebuild/_config/LocationsManager.py @@ -130,6 +130,26 @@ class LocationsManager(object): allow_parent_colon = True repo_loc = None compat_mode = False + + eapi_file = os.path.join(currentPath, "eapi") + f = None + try: + f = io.open(_unicode_encode(eapi_file, + encoding=_encodings['fs'], errors='strict'), + mode='r', encoding=_encodings['content'], errors='replace') + eapi = f.readline().strip() + except IOError: + pass + else: + if not eapi_is_supported(eapi): + raise ParseError(_( + "Profile contains unsupported " + "EAPI '%s': '%s'") % \ + (eapi, os.path.realpath(eapi_file),)) + finally: + if f is not None: + f.close() + intersecting_repos = [x for x in known_repos if current_abs_path.startswith(x[0])] if intersecting_repos: # protect against nested repositories. Insane configuration, but the longest @@ -156,24 +176,6 @@ class LocationsManager(object): files=', '.join(offenders))) parentsFile = os.path.join(currentPath, "parent") - eapi_file = os.path.join(currentPath, "eapi") - f = None - try: - f = io.open(_unicode_encode(eapi_file, - encoding=_encodings['fs'], errors='strict'), - mode='r', encoding=_encodings['content'], errors='replace') - eapi = f.readline().strip() - except IOError: - pass - else: - if not eapi_is_supported(eapi): - raise ParseError(_( - "Profile contains unsupported " - "EAPI '%s': '%s'") % \ - (eapi, os.path.realpath(eapi_file),)) - finally: - if f is not None: - f.close() if os.path.exists(parentsFile): parents = grabfile(parentsFile) if not parents: