From 3ea0cd4dc3209bafbe9d4927e9df25d3ba69f96f Mon Sep 17 00:00:00 2001 From: Michael Tremer Date: Wed, 21 Dec 2011 22:34:40 +0100 Subject: [PATCH] QA: Add check for illegal libraries in /usr/lib on x86_64. --- tools/quality-agent.d/050-libs-x86_64 | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) create mode 100755 tools/quality-agent.d/050-libs-x86_64 diff --git a/tools/quality-agent.d/050-libs-x86_64 b/tools/quality-agent.d/050-libs-x86_64 new file mode 100755 index 000000000..292f4dced --- /dev/null +++ b/tools/quality-agent.d/050-libs-x86_64 @@ -0,0 +1,22 @@ +#!/bin/bash + +. $(dirname ${0})/qa-include + +DESC="Shared libs in /lib or /usr/lib are not allowed." + +check() { + local failed=0 + + # Do nothing on other platforms. + [ "$(uname -m)" = "x86_64" ] || return ${failed} + + local file + for file in $(find ${BUILDROOT}/lib ${BUILDROOT}/usr/lib -name "*.so*" 2>/dev/null); do + log_error " Unallowed location for library: ${file}" + failed=1 + done + + return ${failed} +} + +run -- 2.39.5