summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDave Reisner <dreisner@archlinux.org>2012-06-02 05:24:09 +0200
committerDave Reisner <dreisner@archlinux.org>2012-06-02 05:50:53 +0200
commitc8f6effd1884b24de27c24d92883b0e270bcc3ba (patch)
tree5bdc6801fb7ce93d7616d21bbdc28eee1da5fc37
parentb44e4e7cfd88fc5e2bd95fa9d0dbc36b1bd64483 (diff)
downloadmkinitcpio-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--functions8
1 files changed, 7 insertions, 1 deletions
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