[40142] trunk/base

jmr at macports.org jmr at macports.org
Mon Sep 22 03:43:48 PDT 2008


Revision: 40142
          http://trac.macports.org/changeset/40142
Author:   jmr at macports.org
Date:     2008-09-22 03:43:46 -0700 (Mon, 22 Sep 2008)
Log Message:
-----------
Run a script in 'make install' and .dmg postflight qhich removes any duplicate entrues from the dep_map (#8763)

Modified Paths:
--------------
    trunk/base/Mk/macports.upgrade.mk
    trunk/base/portmgr/dmg/postflight

Added Paths:
-----------
    trunk/base/src/dep_map_clean.tcl

Modified: trunk/base/Mk/macports.upgrade.mk
===================================================================
--- trunk/base/Mk/macports.upgrade.mk	2008-09-22 08:51:44 UTC (rev 40141)
+++ trunk/base/Mk/macports.upgrade.mk	2008-09-22 10:43:46 UTC (rev 40142)
@@ -110,6 +110,9 @@
 			mv -v "$${HOME}/.macports/macports.conf.tmp" "$${HOME}/.macports/macports.conf"; \
 	}
 
+# Remove duplicate entries from the dependency map (could occur with 1.6 and earlier):
+	$(TCLSH) src/dep_map_clean.tcl ${TCL_PACKAGE_DIR}
+
 # Upgrade success announcement (meaning we're done ;):
 	@[ -f ${UPGRADECHECK} ] || { echo ""; echo "MacPorts installation successfully upgraded from the old DarwinPorts namespace!"; echo ""; \
 		echo "MacPorts rename update done!" > ${UPGRADECHECK} ; }

Modified: trunk/base/portmgr/dmg/postflight
===================================================================
--- trunk/base/portmgr/dmg/postflight	2008-09-22 08:51:44 UTC (rev 40141)
+++ trunk/base/portmgr/dmg/postflight	2008-09-22 10:43:46 UTC (rev 40142)
@@ -42,6 +42,8 @@
 BINPATH=${PREFIX}/bin
 SBINPATH=${PREFIX}/sbin
 MANPAGES=${PREFIX}/share/man
+TCLSH=/usr/bin/tclsh
+TCL_PACKAGE_DIR=/Library/Tcl
 TIMESTAMP=$(date +"%Y-%m-%d_at_%H:%M:%S")
 BACKUP_SUFFIX=macports-saved_${TIMESTAMP}
 OUR_STRING="MacPorts Installer addition on ${TIMESTAMP}"
@@ -56,6 +58,9 @@
     else
         echo "Successful!"
     fi
+    
+    # Remove any duplicates from the dep map (could occur with 1.6 and earlier)
+    ${TCLSH} dep_map_clean.tcl ${TCL_PACKAGE_DIR}
 }
 
 # Through this command we write an environment variable to an appropriate shell configuration file,

Added: trunk/base/src/dep_map_clean.tcl
===================================================================
--- trunk/base/src/dep_map_clean.tcl	                        (rev 0)
+++ trunk/base/src/dep_map_clean.tcl	2008-09-22 10:43:46 UTC (rev 40142)
@@ -0,0 +1,18 @@
+#!/usr/bin/env tclsh
+# -*- coding: utf-8; mode: tcl; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- vim:fenc=utf-8:filetype=tcl:et:sw=4:ts=4:sts=4
+# $Id$
+
+# Removes any duplicate entries from the MacPorts registry's dependency map.
+# Takes one argument, which should be TCL_PACKAGE_DIR.
+
+source [file join [lindex $argv 0] macports1.0 macports_fastload.tcl]
+package require macports 1.0
+package require registry 1.0
+
+mportinit
+
+registry::open_dep_map
+registry::clean_dep_map
+registry::write_dep_map
+
+exit 0


Property changes on: trunk/base/src/dep_map_clean.tcl
___________________________________________________________________
Added: svn:executable
   + *
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.macosforge.org/pipermail/macports-changes/attachments/20080922/c48ccb30/attachment.html 


More information about the macports-changes mailing list