[67293] trunk/base
jmr at macports.org
jmr at macports.org
Tue May 4 17:10:08 PDT 2010
Revision: 67293
http://trac.macports.org/changeset/67293
Author: jmr at macports.org
Date: 2010-05-04 17:10:06 -0700 (Tue, 04 May 2010)
Log Message:
-----------
delete old macports1.0 directory in 'make install' if present, check that it's not a link in postflight
Modified Paths:
--------------
trunk/base/portmgr/dmg/postflight
trunk/base/src/macports1.0/Makefile
Modified: trunk/base/portmgr/dmg/postflight
===================================================================
--- trunk/base/portmgr/dmg/postflight 2010-05-04 23:47:57 UTC (rev 67292)
+++ trunk/base/portmgr/dmg/postflight 2010-05-05 00:10:06 UTC (rev 67293)
@@ -119,7 +119,7 @@
# link macports1.0 into tcl package dir if possible
function link_tcl_package {
# delete old directory if present
- if test -d "${TCL_PACKAGE_DIR}/macports1.0"; then
+ if ! test -L "${TCL_PACKAGE_DIR}/macports1.0" && test -d "${TCL_PACKAGE_DIR}/macports1.0"; then
rm -vrf "${TCL_PACKAGE_DIR}/macports1.0" || true
fi
if ! test -e "${TCL_PACKAGE_DIR}/macports1.0" && test -w "${TCL_PACKAGE_DIR}"; then
Modified: trunk/base/src/macports1.0/Makefile
===================================================================
--- trunk/base/src/macports1.0/Makefile 2010-05-04 23:47:57 UTC (rev 67292)
+++ trunk/base/src/macports1.0/Makefile 2010-05-05 00:10:06 UTC (rev 67293)
@@ -30,8 +30,13 @@
done
$(INSTALL) -o ${DSTUSR} -g ${DSTGRP} -m 444 pkgIndex.tcl ${INSTALLDIR}
-
+
echo "${TCL_PACKAGE_DIR}" > ${DESTDIR}${prefix}/var/macports/.tclpackage
- if test -z "${DESTDIR}" && ! test -e "${INSTALLPKGLINK}" && test -w "${TCL_PACKAGE_DIR}"; then \
- ln -s "${INSTALLDIR}" "${INSTALLPKGLINK}" || true; \
+ if test -z "${DESTDIR}" && test "${INSTALLPKGLINK}" != "${INSTALLDIR}" && test -w "${TCL_PACKAGE_DIR}"; then \
+ if ! test -L "${INSTALLPKGLINK}" && test -d "${INSTALLPKGLINK}"; then \
+ rm -rf "${INSTALLPKGLINK}" || true; \
+ fi; \
+ if ! test -e "${INSTALLPKGLINK}"; then \
+ ln -s "${INSTALLDIR}" "${INSTALLPKGLINK}" || true; \
+ fi; \
fi
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/macports-changes/attachments/20100504/042ebc66/attachment.html>
More information about the macports-changes
mailing list