Patchwork [1/8] test-dependencies, insane.bbclass: improve the message

login
register
mail settings
Submitter Martin Jansa
Date Aug. 9, 2014, 4:07 p.m.
Message ID <1407600483-31215-1-git-send-email-Martin.Jansa@gmail.com>
Download mbox | patch
Permalink /patch/77663/
State Accepted
Commit a1fa222d480fc824abcb894399856626cf83c926
Headers show

Comments

Martin Jansa - Aug. 9, 2014, 4:07 p.m.
Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
---
 meta/classes/insane.bbclass  | 2 +-
 scripts/test-dependencies.sh | 8 +++++---
 2 files changed, 6 insertions(+), 4 deletions(-)

Patch

diff --git a/meta/classes/insane.bbclass b/meta/classes/insane.bbclass
index 55bfaf2..3dd2e7f 100644
--- a/meta/classes/insane.bbclass
+++ b/meta/classes/insane.bbclass
@@ -794,7 +794,7 @@  def package_qa_check_rdepends(pkg, pkgdest, skip, taskdeps, packages, d):
                             break
                 if rdep_data and 'PN' in rdep_data and rdep_data['PN'] in taskdeps:
                     continue
-                error_msg = "%s rdepends on %s but its not a build dependency?" % (pkg, rdepend)
+                error_msg = "%s rdepends on %s, but it isn't a build dependency?" % (pkg, rdepend)
                 sane = package_qa_handle_error("build-deps", error_msg, d)
 
     return sane
diff --git a/scripts/test-dependencies.sh b/scripts/test-dependencies.sh
index ecbb710..2bcc2ca 100755
--- a/scripts/test-dependencies.sh
+++ b/scripts/test-dependencies.sh
@@ -244,9 +244,11 @@  compare_deps() {
     else
       missing_deps=
       for dep in ${max_deps}; do
-        echo "${min_deps}" | grep -q " ${dep} " || missing_deps="${missing_deps} ${dep}"
-        echo # to get rid of dots on last line
-        echo "WARN: ${recipe}: ${package} rdepends on ${dep} but its not a build dependency?" | tee -a ${OUTPUT_FILE}
+        if ! echo "${min_deps}" | grep -q " ${dep} " ; then
+          missing_deps="${missing_deps} ${dep}"
+          echo # to get rid of dots on last line
+          echo "WARN: ${recipe}: ${package} rdepends on ${dep}, but it isn't a build dependency?" | tee -a ${OUTPUT_FILE}
+        fi
       done
       if [ -n "${missing_deps}" ] ; then
         echo ${recipe} >> ${OUTPUTC}/failed-recipes.log