[PATCH] mkinitrd install symlink target from target dir not symlink dir (#502221)

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



When installing symlink targets we were telling cp to read the target
from the dir where the symlink lives, instead of from the dir where the
target actually lives. This becomes a problem when those dirs are not the
same.

This was triggered by having parted-devel installed, which after
having run ldconfig once results in a /usr/lib[64]/libparted-1.8.so.8
symlink, where as parted lives under /lib[64], in combination with
having /usr/lib[64] in /etc/ld.so.conf .
---
 functions |    7 +------
 1 files changed, 1 insertions(+), 6 deletions(-)

diff --git a/functions b/functions
index 5228a3f..2fe61da 100644
--- a/functions
+++ b/functions
@@ -162,11 +162,6 @@ function inst() {
             ln -sf "$target" "$root$dest"
             #inst "$target" "$root"
             local BASE=`basename "$target"`
-            local LIBDIR=`echo "$file" | sed -e 's,\(\(.*\)/\)[^/]\+$,\1,'`
-            if [ "$LIBDIR" = "$BASE" ]; then
-                local LIBDIR=`echo "/$dest" | sed -e 's,\(\(.*\)/\)[^/]\+$,\1,'`
-            fi
-
             local TLIBDIR=`echo "$target" | sed -e 's,\(^/lib[^/]*\)/.*$,\1/,' \
                                                 -e 's,\(\(.*\)/\)[^/]\+$,\1,'`
             if [ "$TLIBDIR" = "$BASE" ]; then
@@ -175,7 +170,7 @@ function inst() {
                                                 -e 's,\(\(.*\)/\)[^/]\+$,\1,'`
             fi
 
-            inst "$LIBDIR/$BASE" "$root" "$TLIBDIR/$BASE"
+            inst "$TLIBDIR/$BASE" "$root" "$TLIBDIR/$BASE"
             RET=$?
             IF_indent_chars=${old_indent_chars}
             return $RET
-- 
1.6.2.2

_______________________________________________
Anaconda-devel-list mailing list
Anaconda-devel-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/anaconda-devel-list

[Index of Archives]     [Kickstart]     [Fedora Users]     [Fedora Legacy List]     [Fedora Maintainers]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [Yosemite Photos]     [KDE Users]     [Fedora Tools]
  Powered by Linux