diff options
author | Zac Medico <zmedico@gentoo.org> | 2009-10-18 03:58:14 +0000 |
---|---|---|
committer | Zac Medico <zmedico@gentoo.org> | 2009-10-18 03:58:14 +0000 |
commit | 6368f410f2bae6cfc9f2ee38b209f6cdc852d215 (patch) | |
tree | 92c7a2eaacbba5fb1c6424bd4d27e161efb74d44 /bin/ebuild-helpers/newins | |
parent | 77cbc5e38abb9ae17bb7f9d9216c1370a8cae574 (diff) | |
download | portage-6368f410f2bae6cfc9f2ee38b209f6cdc852d215.tar.gz portage-6368f410f2bae6cfc9f2ee38b209f6cdc852d215.tar.bz2 portage-6368f410f2bae6cfc9f2ee38b209f6cdc852d215.zip |
Bug #273636 - Add doins and newins support for symlink preservation in
EAPI 3. Thanks to Jonathan Callen <abcd@g.o> for the initial patch (I
added EAPI conditionals in order to share code between all EAPIs).
(trunk r14625)
svn path=/main/branches/2.1.7/; revision=14653
Diffstat (limited to 'bin/ebuild-helpers/newins')
-rwxr-xr-x | bin/ebuild-helpers/newins | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/bin/ebuild-helpers/newins b/bin/ebuild-helpers/newins index f235835a2..d15006d02 100755 --- a/bin/ebuild-helpers/newins +++ b/bin/ebuild-helpers/newins @@ -1,5 +1,5 @@ #!/bin/bash -# Copyright 1999-2006 Gentoo Foundation +# Copyright 1999-2009 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 # $Id$ @@ -14,7 +14,14 @@ if [ ! -e "$1" ] ; then fi rm -rf "${T}/${2}" || exit $? -cp -f "${1}" "${T}/${2}" || exit $? +case "$EAPI" in + 0|1|2) + cp "$1" "$T/$2" || exit $? + ;; + *) + cp -P "$1" "$T/$2" || exit $? + ;; +esac doins "${T}/${2}" ret=$? rm -rf "${T}/${2}" |