commit:     5a8322accecab68d7b00637f288487354e7a01d3
Author:     Matt Turner <mattst88 <AT> gentoo <DOT> org>
AuthorDate: Wed May 20 01:20:02 2020 +0000
Commit:     Matt Turner <mattst88 <AT> gentoo <DOT> org>
CommitDate: Wed May 20 01:49:30 2020 +0000
URL:        https://gitweb.gentoo.org/proj/catalyst.git/commit/?id=5a8322ac

targets: Remove copy_{file,symlink,lib} functions

Unused since the removal of the original netboot target.

I'm honestly kind of impressed with the strategy of running ldd and
recursively copying libraries to the netboot image. Unfortunately for
this strategy, dlopen() exists so this cannot work.

Fixes: 89f57e145f82 (targets: Delete the netboot target)
Signed-off-by: Matt Turner <mattst88 <AT> gentoo.org>

 targets/support/chroot-functions.sh | 75 -------------------------------------
 1 file changed, 75 deletions(-)

diff --git a/targets/support/chroot-functions.sh 
b/targets/support/chroot-functions.sh
index d40279ae..d63e4918 100755
--- a/targets/support/chroot-functions.sh
+++ b/targets/support/chroot-functions.sh
@@ -335,81 +335,6 @@ run_default_funcs() {
        fi
 }
 
-# Functions
-# Copy libs of a executable in the chroot
-function copy_libs() {
-       # Check if it's a dynamix exec
-       ldd ${1} > /dev/null 2>&1 || return
-
-       for lib in `ldd ${1} | awk '{ print $3 }'`
-       do
-               echo ${lib}
-               if [ -e ${lib} ]
-               then
-                       if [ ! -e ${clst_root_path}/${lib} ]
-                       then
-                               copy_file ${lib}
-                               [ -e "${clst_root_path}/${lib}" ] && \
-                               strip -R .comment -R .note 
${clst_root_path}/${lib} \
-                               || echo "WARNING : Cannot strip lib 
${clst_root_path}/${lib} !"
-                       fi
-               else
-                       echo "WARNING : Some library was not found for ${lib} !"
-               fi
-       done
-}
-
-function copy_symlink() {
-       STACK=${2}
-       [ "${STACK}" = "" ] && STACK=16 || STACK=$((${STACK} - 1 ))
-
-       if [ ${STACK} -le 0 ]
-       then
-               echo "WARNING : ${TARGET} : too many levels of symbolic links !"
-               return
-       fi
-
-       [ ! -e ${clst_root_path}/`dirname ${1}` ] && \
-               mkdir -p ${clst_root_path}/`dirname ${1}`
-       [ ! -e ${clst_root_path}/${1} ] && \
-               cp -vfdp ${1} ${clst_root_path}/${1}
-
-       if [[ -n $(type -p realpath) ]]; then
-               TARGET=`realpath ${1}`
-       else
-               TARGET=`readlink -f ${1}`
-       fi
-       if [ -h ${TARGET} ]
-       then
-               copy_symlink ${TARGET} ${STACK}
-       else
-               copy_file ${TARGET}
-       fi
-}
-
-function copy_file() {
-       f="${1}"
-
-       if [ ! -e "${f}" ]
-       then
-               echo "WARNING : File not found : ${f}"
-               continue
-       fi
-
-       [ ! -e ${clst_root_path}/`dirname ${f}` ] && \
-               mkdir -p ${clst_root_path}/`dirname ${f}`
-       [ ! -e ${clst_root_path}/${f} ] && \
-               cp -vfdp ${f} ${clst_root_path}/${f}
-       if [ -x ${f} -a ! -h ${f} ]
-       then
-               copy_libs ${f}
-               strip -R .comment -R .note ${clst_root_path}/${f} > /dev/null 
2>&1
-       elif [ -h ${f} ]
-       then
-               copy_symlink ${f}
-       fi
-}
-
 create_handbook_icon() {
        # This function creates a local icon to the Gentoo Handbook
        echo "[Desktop Entry]

Reply via email to