From c8f6effd1884b24de27c24d92883b0e270bcc3ba Mon Sep 17 00:00:00 2001 From: Dave Reisner Date: Fri, 1 Jun 2012 23:24:09 -0400 Subject: catch errors in ldd ELF dep resolution ldd reporting a library to be 'not found' is dangerous, and should be reported. Consider this a build error, which will hopefully prompt the user to reconsider before rebooting. Signed-off-by: Dave Reisner --- functions | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/functions b/functions index 80286e0..81927d0 100644 --- a/functions +++ b/functions @@ -513,7 +513,13 @@ add_binary() { # resolve sodeps regex='(/.+) \(0x[a-fA-F0-9]+\)' while read line; do - [[ $line =~ $regex ]] && sodep=${BASH_REMATCH[1]} || continue + if [[ $line =~ $regex ]]; then + sodep=${BASH_REMATCH[1]} + elif [[ $line = *'not found' ]]; then + error "binary dependency \`%s' not found for \`%s'" "${line%% *}" "$1" + (( ++builderrors )) + continue + fi if [[ -f $sodep && ! -e $BUILDROOT$sodep ]]; then if [[ ! -L $sodep ]]; then -- cgit v1.2.3-24-g4f1b