Make doins clean up it's own temp files. This solves an odd issue in
authorZac Medico <zmedico@gentoo.org>
Sun, 30 Mar 2008 09:18:34 +0000 (09:18 -0000)
committerZac Medico <zmedico@gentoo.org>
Sun, 30 Mar 2008 09:18:34 +0000 (09:18 -0000)
dyn_package() when portage 2.1.x is installing portage-2.2 and temp
python module files from doins are imported instead of the expected
ones. (trunk r9628)

svn path=/main/branches/2.1.2/; revision=9629

bin/doins

index a4f5ee22f8eba85eb50d6d9ec82cf671619ce41d..945938c8b73b14835ac5443dcfed570ddd760c2b 100755 (executable)
--- a/bin/doins
+++ b/bin/doins
@@ -28,14 +28,16 @@ fi
 [[ ! -d ${D}${INSDESTTREE} ]] && dodir "${INSDESTTREE}"
 
 _doins() {
-       local mysrc="$1" mydir="$2"
+       local mysrc="$1" mydir="$2" cleanup=""
 
        if [ -L "$mysrc" ] ; then
                cp "$mysrc" "${T}"
                mysrc="${T}/${mysrc##*/}"
+               cleanup=${mysrc}
        fi
 
        install ${INSOPTIONS} "${mysrc}" "${D}${INSDESTTREE}/${mydir}"
+       [[ -n ${cleanup} ]] && rm -f "${cleanup}"
 }
 
 _xdoins() {