diff options
author | Dave Reisner <dreisner@archlinux.org> | 2012-06-02 05:24:09 +0200 |
---|---|---|
committer | Dave Reisner <dreisner@archlinux.org> | 2012-06-02 05:50:53 +0200 |
commit | c8f6effd1884b24de27c24d92883b0e270bcc3ba (patch) | |
tree | 5bdc6801fb7ce93d7616d21bbdc28eee1da5fc37 | |
parent | b44e4e7cfd88fc5e2bd95fa9d0dbc36b1bd64483 (diff) | |
download | mkinitcpio-c8f6effd1884b24de27c24d92883b0e270bcc3ba.tar.gz mkinitcpio-c8f6effd1884b24de27c24d92883b0e270bcc3ba.tar.xz |
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 <dreisner@archlinux.org>
-rw-r--r-- | functions | 8 |
1 files changed, 7 insertions, 1 deletions
@@ -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 |