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 63F5C13877A for ; Sun, 24 Aug 2014 10:48:03 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id DD3D4E08D3; Sun, 24 Aug 2014 10:48:02 +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 933F2E08D3 for ; Sun, 24 Aug 2014 10:48:02 +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 8B7BF33FB4C for ; Sun, 24 Aug 2014 10:48:01 +0000 (UTC) Received: from localhost.localdomain (localhost [127.0.0.1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id 32E4B3CAC for ; Sun, 24 Aug 2014 10:48:00 +0000 (UTC) From: "Ulrich Müller" 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" Message-ID: <1408877115.aa858c1185dfffe26c94eea780d3ccb716723d5f.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: aa858c1185dfffe26c94eea780d3ccb716723d5f X-VCS-Branch: master Date: Sun, 24 Aug 2014 10:48:00 +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: d1fa6427-3458-4220-97fe-b9678af50ca7 X-Archives-Hash: dc618883e8216a1a327c42af50ff5253 commit: aa858c1185dfffe26c94eea780d3ccb716723d5f Author: Ulrich Müller gentoo org> AuthorDate: Sun Aug 24 10:45:15 2014 +0000 Commit: Ulrich Müller gentoo org> CommitDate: Sun Aug 24 10:45:15 2014 +0000 URL: http://sources.gentoo.org/gitweb/?p=proj/qa-scripts.git;a=commit;h=aa858c11 check_eclasses_eapis.sh: Replace pquery call by find/awk command. Signed-off-by: Ulrich Müller gentoo.org> --- check_eclasses_eapis.sh | 26 +++++++++++++++++++++++--- 1 file changed, 23 insertions(+), 3 deletions(-) diff --git a/check_eclasses_eapis.sh b/check_eclasses_eapis.sh index 86aa083..03349e2 100755 --- a/check_eclasses_eapis.sh +++ b/check_eclasses_eapis.sh @@ -9,15 +9,35 @@ else DIR=$(pwd) fi -[[ $(type pquery 2> /dev/null) ]] || exit 1 +#[[ $(type pquery 2> /dev/null) ]] || exit 1 KNOWN_EAPIS="unsupported 0 1 2 3 4 5" TMPEAPIS="/tmp/$(basename $0).global.$$.tmp" TMPECLASS="/tmp/$(basename $0).eclass.$$.tmp" -pushd "$(portageq get_repo_path / gentoo)/eclass" > /dev/null +REPO_PATH=$(portageq get_repo_path / gentoo) +pushd "${REPO_PATH}/eclass" > /dev/null ECLASSES=$(echo *.eclass) popd > /dev/null -pquery --attr eapi --attr inherited --raw --all --repo portdir > "${TMPEAPIS}" + +#pquery --attr eapi --attr inherited --raw --all --repo portdir > "${TMPEAPIS}" +find "${REPO_PATH}/metadata/md5-cache" -type f -exec awk -F= ' + BEGINFILE { + n = split(FILENAME, f, "/") + file = f[n-1] "/" f[n] + eapi = "0" + n_eclasses = 0 + } + $1 == "EAPI" { eapi = $2 } + $1 == "_eclasses_" { n_eclasses = split($2, eclasses, "\t") } + ENDFILE { + printf "%s eapi=\"%s\" inherited=\"", file, eapi + for (i = 1; i <= n_eclasses; i += 2) { + if (i != 1) printf " " + printf "%s", eclasses[i] + } + printf "\"\n" + } + ' '{}' \+ > "${TMPEAPIS}" pushd ${DIR} > /dev/null rm -rf *.eclass