From mboxrd@z Thu Jan  1 00:00:00 1970
Return-Path: <gentoo-commits+bounces-795836-garchives=archives.gentoo.org@lists.gentoo.org>
Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80])
	by finch.gentoo.org (Postfix) with ESMTP id D3D01138CA2
	for <garchives@archives.gentoo.org>; Fri, 24 Apr 2015 16:47:06 +0000 (UTC)
Received: from pigeon.gentoo.org (localhost [127.0.0.1])
	by pigeon.gentoo.org (Postfix) with SMTP id 0C1D6E06FE;
	Fri, 24 Apr 2015 16:47:05 +0000 (UTC)
Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183])
	(using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits))
	(No client certificate requested)
	by pigeon.gentoo.org (Postfix) with ESMTPS id B0A7AE06FE
	for <gentoo-commits@lists.gentoo.org>; Fri, 24 Apr 2015 16:47:04 +0000 (UTC)
Received: from oystercatcher.gentoo.org (oystercatcher.gentoo.org [148.251.78.52])
	(using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits))
	(No client certificate requested)
	by smtp.gentoo.org (Postfix) with ESMTPS id 96927340A78
	for <gentoo-commits@lists.gentoo.org>; Fri, 24 Apr 2015 16:47:03 +0000 (UTC)
Received: from localhost.localdomain (localhost [127.0.0.1])
	by oystercatcher.gentoo.org (Postfix) with ESMTP id 1FE7B16A5A
	for <gentoo-commits@lists.gentoo.org>; Fri, 24 Apr 2015 16:46:58 +0000 (UTC)
From: "Ulrich Müller" <ulm@gentoo.org>
To: gentoo-commits@lists.gentoo.org
Content-Transfer-Encoding: 8bit
Content-type: text/plain; charset=UTF-8
Reply-To: gentoo-dev@lists.gentoo.org, "Ulrich Müller" <ulm@gentoo.org>
Message-ID: <1429893989.621e45af7ca5d45225c14392c53915fcdd011927.ulm@gentoo>
Subject: [gentoo-commits] proj/qa-scripts:master commit in: /
X-VCS-Repository: proj/qa-scripts
X-VCS-Files: check_eclasses_eapis.sh
X-VCS-Directories: /
X-VCS-Committer: ulm
X-VCS-Committer-Name: Ulrich Müller
X-VCS-Revision: 621e45af7ca5d45225c14392c53915fcdd011927
X-VCS-Branch: master
Date: Fri, 24 Apr 2015 16:46:58 +0000 (UTC)
Precedence: bulk
List-Post: <mailto:gentoo-commits@lists.gentoo.org>
List-Help: <mailto:gentoo-commits+help@lists.gentoo.org>
List-Unsubscribe: <mailto:gentoo-commits+unsubscribe@lists.gentoo.org>
List-Subscribe: <mailto:gentoo-commits+subscribe@lists.gentoo.org>
List-Id: Gentoo Linux mail <gentoo-commits.gentoo.org>
X-BeenThere: gentoo-commits@lists.gentoo.org
X-Archives-Salt: 1c71cfc7-5d6e-4a15-8707-e04556f95b90
X-Archives-Hash: f69a1d3609faddec6b451cc61bee1843

commit:     621e45af7ca5d45225c14392c53915fcdd011927
Author:     Ulrich Müller <ulm <AT> gentoo <DOT> org>
AuthorDate: Fri Apr 24 16:46:29 2015 +0000
Commit:     Ulrich Müller <ulm <AT> gentoo <DOT> org>
CommitDate: Fri Apr 24 16:46:29 2015 +0000
URL:        https://gitweb.gentoo.org/proj/qa-scripts.git/commit/?id=621e45af

check_eclasses_eapis.sh: Don't hardcode known EAPIs.

 check_eclasses_eapis.sh | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/check_eclasses_eapis.sh b/check_eclasses_eapis.sh
index 97230f0..218f01a 100755
--- a/check_eclasses_eapis.sh
+++ b/check_eclasses_eapis.sh
@@ -11,7 +11,6 @@ fi
 
 #[[ $(type pquery 2> /dev/null) ]] || exit 1
 
-KNOWN_EAPIS="0 1 2 3 4 5"
 TMPEAPIS="/tmp/$(basename $0).global.$$.tmp"
 TMPECLASS="/tmp/$(basename $0).eclass.$$.tmp"
 REPO_PATH=$(portageq get_repo_path / gentoo)
@@ -39,6 +38,11 @@ find "${REPO_PATH}/metadata/md5-cache" -type f -exec awk -F= '
 	}
 	' '{}' \+ > "${TMPEAPIS}"
 
+KNOWN_EAPIS=$(awk '
+	{ e = gensub(/eapi="(.*)"/, "\\1", "", $2); eapi[e] = e }
+	END { PROCINFO["sorted_in"]="@ind_num_asc"; for (e in eapi) print e }
+	' "${TMPEAPIS}")
+
 pushd ${DIR} > /dev/null
 rm -rf *.eclass
 for x in ${ECLASSES}; do