From mboxrd@z Thu Jan  1 00:00:00 1970
Return-Path: <gentoo-commits+bounces-519671-garchives=archives.gentoo.org@lists.gentoo.org>
Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80])
	by finch.gentoo.org (Postfix) with ESMTP id 95C36138010
	for <garchives@archives.gentoo.org>; Fri,  2 Nov 2012 00:07:48 +0000 (UTC)
Received: from pigeon.gentoo.org (localhost [127.0.0.1])
	by pigeon.gentoo.org (Postfix) with SMTP id B207A21C085;
	Fri,  2 Nov 2012 00:07:18 +0000 (UTC)
Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183])
	by pigeon.gentoo.org (Postfix) with ESMTP id C97CB21C085
	for <gentoo-commits@lists.gentoo.org>; Fri,  2 Nov 2012 00:07:17 +0000 (UTC)
Received: from hornbill.gentoo.org (hornbill.gentoo.org [94.100.119.163])
	(using TLSv1 with cipher AECDH-AES256-SHA (256/256 bits))
	(No client certificate requested)
	by smtp.gentoo.org (Postfix) with ESMTPS id 167FE33D851
	for <gentoo-commits@lists.gentoo.org>; Fri,  2 Nov 2012 00:07:17 +0000 (UTC)
Received: from localhost.localdomain (localhost [127.0.0.1])
	by hornbill.gentoo.org (Postfix) with ESMTP id 8FD7CE5449
	for <gentoo-commits@lists.gentoo.org>; Fri,  2 Nov 2012 00:07:15 +0000 (UTC)
From: "Richard Farina" <zerochaos@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, "Richard Farina" <zerochaos@gentoo.org>
Message-ID: <1351814409.3757d1f33bb04e5eabcfb0de714680b23ba64214.zerochaos@gentoo>
Subject: [gentoo-commits] proj/catalyst:master commit in: targets/support/
X-VCS-Repository: proj/catalyst
X-VCS-Files: targets/support/functions.sh
X-VCS-Directories: targets/support/
X-VCS-Committer: zerochaos
X-VCS-Committer-Name: Richard Farina
X-VCS-Revision: 3757d1f33bb04e5eabcfb0de714680b23ba64214
X-VCS-Branch: master
Date: Fri,  2 Nov 2012 00:07:15 +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-Archives-Salt: da379a2b-c8f0-480a-b1d5-77a1416b5330
X-Archives-Hash: 02d698d4fa140086e9768d28763dd1b5

commit:     3757d1f33bb04e5eabcfb0de714680b23ba64214
Author:     Rick Farina (Zero_Chaos) <zerochaos <AT> gentoo <DOT> org>
AuthorDate: Fri Nov  2 00:00:09 2012 +0000
Commit:     Richard Farina <zerochaos <AT> gentoo <DOT> org>
CommitDate: Fri Nov  2 00:00:09 2012 +0000
URL:        http://git.overlays.gentoo.org/gitweb/?p=proj/catalyst.git;a=commit;h=3757d1f3

Revert "Apply Mike's suggested patch to fix the setting of +x on copy_to_chroot - bug 434252."

This reverts commit c57b514c2295df27eafe57dfb1452b486e9c547b.

---
 targets/support/functions.sh |   21 ++++++++++++++++-----
 1 files changed, 16 insertions(+), 5 deletions(-)

diff --git a/targets/support/functions.sh b/targets/support/functions.sh
index a0eaae2..cb70bdd 100644
--- a/targets/support/functions.sh
+++ b/targets/support/functions.sh
@@ -1,8 +1,19 @@
-copy_to_chroot() {
-	local src_file=$1
-	local dest_dir=${clst_chroot_path}${2:-/tmp}
-	echo "copying ${src_file##*/} to ${dest_dir}"
-	cp -pPR "${src_file}" "${dest_dir}"/
+copy_to_chroot(){
+	local file_name=$(basename ${1})
+	local dest_dir=${clst_chroot_path}${2}
+	if [ "${2}" != "" ]
+	then
+		echo "copying ${file_name} to ${dest_dir}"
+		mkdir -p ${dest_dir}
+		cp -pPR ${1} ${dest_dir}
+		[ "${file_name}" != "make.profile" ] && \
+			chmod 755 ${dest_dir}/${file_name}
+	else
+		echo "copying ${file_name} to ${clst_chroot_path}/tmp"
+		mkdir -p ${chroot_path}/tmp
+		cp -pPR ${1} ${clst_chroot_path}/tmp
+		chmod 755 ${clst_chroot_path}/tmp/${file_name}
+	fi
 }
 
 delete_from_chroot(){