From b4f20819f9d8a38ba14edcecdf3663a33f106cef Mon Sep 17 00:00:00 2001 From: Davide Madrisan Date: Fri, 19 Jul 2013 18:37:44 +0200 Subject: [PATCH] t01_pkgquality: modify regexp to catch OCaml library files when testing for bad BuildArch tags Signed-off-by: Davide Madrisan --- ChangeLog | 3 +++ tests/test01_pkgquality.in | 8 +++++--- 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/ChangeLog b/ChangeLog index fd68502..f925f6b 100644 --- a/ChangeLog +++ b/ChangeLog @@ -5,6 +5,9 @@ Sat Jul 13 2013 Madrisan * lib/libtest.lib - Davide Madrisan: Replace 'notify --error' by 'notify.error'. + * tests/test01_pkgquality - Davide Madrisan: + Test fo bad BuildArch tags: modify regexp to catch OCaml library files. + ------------------------------------------------------------------------------- Changes in version 1.16.3 diff --git a/tests/test01_pkgquality.in b/tests/test01_pkgquality.in index 481bc72..4f8d497 100644 --- a/tests/test01_pkgquality.in +++ b/tests/test01_pkgquality.in @@ -423,9 +423,11 @@ $"checking for packages with bad BuildArch tag""${NORM}..." let "i = 0" for pck in ${rpmpkg_name[@]}; do pushd $tmpextractdir/$i >/dev/null - for f in $(find -mindepth 2 -perm +111 -type f \ - -exec file {} \; | grep -E "( ELF | library )"); do - notify.debug "found a ELF file: \`${NOTE}${f/./}${NORM}'" + for f in $(LC_ALL=C find -mindepth 2 -type f \ + -exec file {} \; 2>/dev/null | grep -E "(\ + ELF | OCaml library | ar archive |\ + dynamically linked | statically linked )"); do + notify.debug "found binary or library file: \`${NOTE}${f/./}${NORM}'" let "warning = 1" break done