From mboxrd@z Thu Jan  1 00:00:00 1970
Return-Path: <gentoo-commits+bounces-1173426-garchives=archives.gentoo.org@lists.gentoo.org>
Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80])
	(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
	(No client certificate requested)
	by finch.gentoo.org (Postfix) with ESMTPS id 3AD611382C5
	for <garchives@archives.gentoo.org>; Thu, 21 May 2020 20:25:38 +0000 (UTC)
Received: from pigeon.gentoo.org (localhost [127.0.0.1])
	by pigeon.gentoo.org (Postfix) with SMTP id 093BAE0954;
	Thu, 21 May 2020 20:25:36 +0000 (UTC)
Received: from smtp.gentoo.org (dev.gentoo.org [IPv6:2001:470:ea4a:1:5054:ff:fec7:86e4])
	(using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits))
	(No client certificate requested)
	by pigeon.gentoo.org (Postfix) with ESMTPS id D64C1E0954
	for <gentoo-commits@lists.gentoo.org>; Thu, 21 May 2020 20:25:35 +0000 (UTC)
Received: from oystercatcher.gentoo.org (oystercatcher.gentoo.org [148.251.78.52])
	(using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits))
	(No client certificate requested)
	by smtp.gentoo.org (Postfix) with ESMTPS id CFBD434F286
	for <gentoo-commits@lists.gentoo.org>; Thu, 21 May 2020 20:25:34 +0000 (UTC)
Received: from localhost.localdomain (localhost [IPv6:::1])
	by oystercatcher.gentoo.org (Postfix) with ESMTP id 7A7B3230
	for <gentoo-commits@lists.gentoo.org>; Thu, 21 May 2020 20:25:33 +0000 (UTC)
From: "Matt Turner" <mattst88@gentoo.org>
To: gentoo-commits@lists.gentoo.org
Content-Transfer-Encoding: 8bit
Content-type: text/plain; charset=UTF-8
Reply-To: gentoo-dev@lists.gentoo.org, "Matt Turner" <mattst88@gentoo.org>
Message-ID: <1589939370.5a8322accecab68d7b00637f288487354e7a01d3.mattst88@gentoo>
Subject: [gentoo-commits] proj/catalyst:master commit in: targets/support/
X-VCS-Repository: proj/catalyst
X-VCS-Files: targets/support/chroot-functions.sh
X-VCS-Directories: targets/support/
X-VCS-Committer: mattst88
X-VCS-Committer-Name: Matt Turner
X-VCS-Revision: 5a8322accecab68d7b00637f288487354e7a01d3
X-VCS-Branch: master
Date: Thu, 21 May 2020 20:25:33 +0000 (UTC)
Precedence: bulk
List-Post: <mailto:gentoo-commits@lists.gentoo.org>
List-Help: <mailto:gentoo-commits+help@lists.gentoo.org>
List-Unsubscribe: <mailto:gentoo-commits+unsubscribe@lists.gentoo.org>
List-Subscribe: <mailto:gentoo-commits+subscribe@lists.gentoo.org>
List-Id: Gentoo Linux mail <gentoo-commits.gentoo.org>
X-BeenThere: gentoo-commits@lists.gentoo.org
X-Auto-Response-Suppress: DR, RN, NRN, OOF, AutoReply
X-Archives-Salt: c0462093-2f95-45ff-a114-4c3d566b4e3b
X-Archives-Hash: 1977526dc4239b45b368f75cb7c33cd1
Message-ID: <20200521202533.JtgMX_WyEaBuXOJwlysVBp7bFXOVX0qtwSZLBoEpnpE@z>

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]