From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: <gentoo-commits+bounces-734073-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 E3D5613838B for <garchives@archives.gentoo.org>; Tue, 23 Sep 2014 17:37:08 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id F40DAE093B; Tue, 23 Sep 2014 17:37:06 +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 A1C96E093B for <gentoo-commits@lists.gentoo.org>; Tue, 23 Sep 2014 17:37:06 +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 B66F0335DE5 for <gentoo-commits@lists.gentoo.org>; Tue, 23 Sep 2014 17:37:05 +0000 (UTC) Received: from localhost.localdomain (localhost [127.0.0.1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id 6C42860EB for <gentoo-commits@lists.gentoo.org>; Tue, 23 Sep 2014 17:37:04 +0000 (UTC) From: "Richard Farina" <zerochaos@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, "Richard Farina" <zerochaos@gentoo.org> Message-ID: <1411493854.dc6fbcd2f651e66195a5fe2ae7092bb53b06c5bc.zerochaos@gentoo> Subject: [gentoo-commits] proj/qa-scripts:master commit in: / X-VCS-Repository: proj/qa-scripts X-VCS-Files: depcheck X-VCS-Directories: / X-VCS-Committer: zerochaos X-VCS-Committer-Name: Richard Farina X-VCS-Revision: dc6fbcd2f651e66195a5fe2ae7092bb53b06c5bc X-VCS-Branch: master Date: Tue, 23 Sep 2014 17:37:04 +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: 517cc7e2-2685-48ab-b31e-23a75b2d4f4f X-Archives-Hash: e2c7b4e64c958434245d22ce2d705353 commit: dc6fbcd2f651e66195a5fe2ae7092bb53b06c5bc Author: Rick Farina (Zero_Chaos) <zerochaos <AT> gentoo <DOT> org> AuthorDate: Tue Sep 23 17:37:34 2014 +0000 Commit: Richard Farina <zerochaos <AT> gentoo <DOT> org> CommitDate: Tue Sep 23 17:37:34 2014 +0000 URL: http://sources.gentoo.org/gitweb/?p=proj/qa-scripts.git;a=commit;h=dc6fbcd2 add explicit dep check previously we were checking only rdeps, but this was confusing since sometimes rdeps are missing, sometimes deps are missing, and sometimes both are missing. Explicit is best, so let's call things what they are. If the user wants less output, they could always fix their ebuilds. --- depcheck | 50 ++++++++++++++++++++++++++++++-------------------- 1 file changed, 30 insertions(+), 20 deletions(-) diff --git a/depcheck b/depcheck index e521c66..dae0cd9 100755 --- a/depcheck +++ b/depcheck @@ -53,6 +53,28 @@ remove_atom_version() { echo $atom } +virtualcheck() { + debug Checking if ${libowner_pn} is provided by a virtual + for virtual in $(qdepends --nocolor --name-only --${1} --query ${libowner_pn} | grep ^virtual/) + do + debug Checking if ${virtual} is in dependencies + local isvirtualdep=$(qdepends --${1} ${atom} | grep ${virtual}) + + if [ $? -eq 0 ]; then + used_virtuals+=( ${virtual} ) + continue 2 + fi + done + + if [ "${1}" = "depend" ]; then + eerror "${obj} links to ${link}" + fi + eindent + eerror Missing ${1^^} on $(bold ${libowner_pn}) + eoutdent + errors=1 +} + check_atom() { local errors=0 @@ -143,30 +165,18 @@ check_atom() { fi done - debug "Checking if ${libowner_pn} is in the RDEPEND list of ${atom}" + debug "Checking if ${libowner_pn} is in the [R]DEPEND list of ${atom}" local isdep - isdep=`qdepends -r ${atom} | grep ${libowner_pn}` - + isdep=`qdepends -d ${atom} | grep ${libowner_pn}` if [ $? -ne 0 ]; then + virtualcheck depend + fi - debug Checking if ${libowner_pn} is provided by a virtual - for virtual in $(qdepends --nocolor --name-only --rdepend --query ${libowner_pn} | grep ^virtual/) - do - debug Checking if ${virtual} is in dependencies - local isvirtualdep=$(qdepends -r ${atom} | grep ${virtual}) - - if [ $? -eq 0 ]; then - used_virtuals+=( ${virtual} ) - continue 2 - fi - done - - eerror "${obj} links to ${link}" - eindent - eerror Missing RDEPEND on $(bold ${libowner_pn}) - eoutdent - errors=1 + local isrdep + isrdep=`qdepends -r ${atom} | grep ${libowner_pn}` + if [ $? -ne 0 ]; then + virtualcheck rdepend fi