From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) by finch.gentoo.org (Postfix) with ESMTP id 496C21381F3 for ; Mon, 9 Sep 2013 17:44:15 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id BCF87E0B8D; Mon, 9 Sep 2013 17:44:11 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) (using TLSv1 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id 4E377E0B8D for ; Mon, 9 Sep 2013 17:44:11 +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 26BB933E874 for ; Mon, 9 Sep 2013 17:44:10 +0000 (UTC) Received: from localhost.localdomain (localhost [127.0.0.1]) by hornbill.gentoo.org (Postfix) with ESMTP id C5A6AE468F for ; Mon, 9 Sep 2013 17:44:08 +0000 (UTC) From: "Zac Medico" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Zac Medico" Message-ID: <1378748574.00b56f2ddc85542a277e83513bc9b09f63fca551.zmedico@gentoo> Subject: [gentoo-commits] proj/portage:master commit in: bin/ebuild-helpers/ X-VCS-Repository: proj/portage X-VCS-Files: bin/ebuild-helpers/doexe bin/ebuild-helpers/newins X-VCS-Directories: bin/ebuild-helpers/ X-VCS-Committer: zmedico X-VCS-Committer-Name: Zac Medico X-VCS-Revision: 00b56f2ddc85542a277e83513bc9b09f63fca551 X-VCS-Branch: master Date: Mon, 9 Sep 2013 17:44:08 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org X-Archives-Salt: d8e1dfce-2700-4d1b-90a3-42f510dec71c X-Archives-Hash: a4dfe1184a1895e978798becba128acf commit: 00b56f2ddc85542a277e83513bc9b09f63fca551 Author: Zac Medico gentoo org> AuthorDate: Mon Sep 9 17:42:54 2013 +0000 Commit: Zac Medico gentoo org> CommitDate: Mon Sep 9 17:42:54 2013 +0000 URL: http://git.overlays.gentoo.org/gitweb/?p=proj/portage.git;a=commit;h=00b56f2d doexe/newins: mktemp for bug #484332 --- bin/ebuild-helpers/doexe | 3 +-- bin/ebuild-helpers/newins | 10 +++++----- 2 files changed, 6 insertions(+), 7 deletions(-) diff --git a/bin/ebuild-helpers/doexe b/bin/ebuild-helpers/doexe index aa050e9..c34fcae 100755 --- a/bin/ebuild-helpers/doexe +++ b/bin/ebuild-helpers/doexe @@ -17,8 +17,7 @@ if [[ ! -d ${ED}${_E_EXEDESTTREE_} ]] ; then install -d "${ED}${_E_EXEDESTTREE_}" fi -TMP=$T/.doexe_tmp -mkdir "$TMP" +TMP=$(mktemp -d "${T}/.doexe_tmp_XXXXXX") ret=0 diff --git a/bin/ebuild-helpers/newins b/bin/ebuild-helpers/newins index 3538f70..0335985 100755 --- a/bin/ebuild-helpers/newins +++ b/bin/ebuild-helpers/newins @@ -19,14 +19,15 @@ if ___eapi_newins_supports_reading_from_standard_input && [[ $1 == "-" ]]; then stdin=yes fi -rm -rf "${T}/$2" +TMP=$(mktemp -d "${T}/.newins_tmp_XXXXXX") +trap 'rm -rf "${TMP}"' EXIT if [[ ${stdin} ]] ; then if [[ -t 0 ]] ; then __helpers_die "!!! ${helper}: Input is from a terminal" exit 1 fi - cat > "${T}/$2" + cat > "${TMP}/$2" ret=$? else if [[ ! -e $1 ]] ; then @@ -41,7 +42,7 @@ else fi fi - cp ${cp_args} "$1" "${T}/$2" + cp ${cp_args} "$1" "${TMP}/$2" ret=$? fi @@ -50,8 +51,7 @@ if [[ ${ret} -ne 0 ]] ; then exit ${ret} fi -do${helper#new} "${T}/$2" +do${helper#new} "${TMP}/$2" ret=$? -rm -rf "${T}/${2}" [[ $ret -ne 0 ]] && __helpers_die "${helper} failed" exit $ret