[arch-projects] [mkinitcpio][PATCH 5/5] mkinitcpio: fix resolution issues with RTLD

Dave Reisner d at falconindy.com
Sun Jun 26 20:32:16 EDT 2011

The _add_dir call is all wrong. The necessary paths are created by
reversing the order of the _add_symlink and _add_file calls, as
_add_file will take care of creating parent directories.

Thanks-to: Gerardo Exequiel Pozzi <vmlinuz386 at yahoo.com.ar>
Signed-off-by: Dave Reisner <dreisner at archlinux.org>
 mkinitcpio |    5 ++---
 1 files changed, 2 insertions(+), 3 deletions(-)

diff --git a/mkinitcpio b/mkinitcpio
index 5389aca..459c828 100755
--- a/mkinitcpio
+++ b/mkinitcpio
@@ -306,9 +306,8 @@ if (( ${#LD_SO[*]} != 1 )); then # uh oh...
 resolved=$(readlink -e "$LD_SO")
-_add_dir "${resolved%/*}" 755
-_add_symlink "${LD_SO#$BASEDIR}" "${resolved#$BASEDIR}"
-_add_file "${resolved#$BASEDIR}" "${resolved#$BASEDIR}" 755
+_add_file "${resolved#$BASEDIR}" "$resolved" 755
+_add_symlink "${LD_SO#$BASEDIR}" "$resolved"
 unset resolved
 for hook in ${HOOKS}; do

More information about the arch-projects mailing list