[51377] trunk/base

raimue at macports.org raimue at macports.org
Sat May 23 11:44:09 PDT 2009


Revision: 51377
          http://trac.macports.org/changeset/51377
Author:   raimue at macports.org
Date:     2009-05-23 11:44:07 -0700 (Sat, 23 May 2009)
Log Message:
-----------
base:
Replace pkg_mkindex.tcl with a shell script which greps for errors. The Tcl
builtin proc pkg_mkIndex does not offer any way to detect them.

Such errors occur on syntax errors in Tcl files. Therefore these files would
not be added to the index. Later execution would fail with error messages which
do not necessarily indicate the problem.

Modified Paths:
--------------
    trunk/base/Mk/macports.tea.mk
    trunk/base/configure
    trunk/base/configure.ac
    trunk/base/src/macports1.0/Makefile
    trunk/base/src/package1.0/Makefile
    trunk/base/src/port1.0/Makefile
    trunk/base/src/registry1.0/Makefile
    trunk/base/src/registry2.0/Makefile

Added Paths:
-----------
    trunk/base/src/pkg_mkindex.sh.in

Removed Paths:
-------------
    trunk/base/src/pkg_mkindex.tcl

Modified: trunk/base/Mk/macports.tea.mk
===================================================================
--- trunk/base/Mk/macports.tea.mk	2009-05-23 16:53:19 UTC (rev 51376)
+++ trunk/base/Mk/macports.tea.mk	2009-05-23 18:44:07 UTC (rev 51377)
@@ -21,4 +21,4 @@
 install:: all
 	$(INSTALL) -d -o ${DSTUSR} -g ${DSTGRP} -m ${DSTMODE} ${INSTALLDIR}
 	$(INSTALL) -o ${DSTUSR} -g ${DSTGRP} -m 444 ${SHLIB_NAME} ${INSTALLDIR}
-	$(SILENT) $(TCLSH) ../pkg_mkindex.tcl ${INSTALLDIR}
+	$(SILENT) ../pkg_mkindex.sh ${INSTALLDIR}

Modified: trunk/base/configure
===================================================================
--- trunk/base/configure	2009-05-23 16:53:19 UTC (rev 51376)
+++ trunk/base/configure	2009-05-23 18:44:07 UTC (rev 51377)
@@ -10529,7 +10529,7 @@
 
 
 # Output
-ac_config_files="$ac_config_files Doxyfile Makefile Mk/macports.autoconf.mk doc/prefix.mtree doc/macosx.mtree doc/macports.conf portmgr/freebsd/Makefile portmgr/fedora/macports.spec src/Makefile src/macports1.0/macports_autoconf.tcl src/port1.0/port_autoconf.tcl src/registry1.0/registry_autoconf.tcl src/programs/Makefile src/macports1.0/macports_fastload.tcl setupenv.bash"
+ac_config_files="$ac_config_files Doxyfile Makefile Mk/macports.autoconf.mk doc/prefix.mtree doc/macosx.mtree doc/macports.conf portmgr/freebsd/Makefile portmgr/fedora/macports.spec src/Makefile src/macports1.0/macports_autoconf.tcl src/port1.0/port_autoconf.tcl src/registry1.0/registry_autoconf.tcl src/programs/Makefile src/macports1.0/macports_fastload.tcl src/pkg_mkindex.sh setupenv.bash"
 
 
 cat >confcache <<\_ACEOF
@@ -11142,6 +11142,7 @@
     "src/registry1.0/registry_autoconf.tcl") CONFIG_FILES="$CONFIG_FILES src/registry1.0/registry_autoconf.tcl" ;;
     "src/programs/Makefile") CONFIG_FILES="$CONFIG_FILES src/programs/Makefile" ;;
     "src/macports1.0/macports_fastload.tcl") CONFIG_FILES="$CONFIG_FILES src/macports1.0/macports_fastload.tcl" ;;
+    "src/pkg_mkindex.sh") CONFIG_FILES="$CONFIG_FILES src/pkg_mkindex.sh" ;;
     "setupenv.bash") CONFIG_FILES="$CONFIG_FILES setupenv.bash" ;;
 
   *) { { $as_echo "$as_me:$LINENO: error: invalid argument: $ac_config_target" >&5

Modified: trunk/base/configure.ac
===================================================================
--- trunk/base/configure.ac	2009-05-23 16:53:19 UTC (rev 51376)
+++ trunk/base/configure.ac	2009-05-23 18:44:07 UTC (rev 51377)
@@ -377,6 +377,7 @@
 	src/registry1.0/registry_autoconf.tcl
 	src/programs/Makefile
 	src/macports1.0/macports_fastload.tcl
+	src/pkg_mkindex.sh
 	setupenv.bash
 ])
 

Modified: trunk/base/src/macports1.0/Makefile
===================================================================
--- trunk/base/src/macports1.0/Makefile	2009-05-23 16:53:19 UTC (rev 51376)
+++ trunk/base/src/macports1.0/Makefile	2009-05-23 18:44:07 UTC (rev 51377)
@@ -24,4 +24,4 @@
 
 	echo "${TCL_PACKAGE_DIR}" > ${DESTDIR}${prefix}/var/macports/.tclpackage
 
-	$(SILENT) $(TCLSH) ../pkg_mkindex.tcl ${INSTALLDIR}
+	$(SILENT) ../pkg_mkindex.sh ${INSTALLDIR}

Modified: trunk/base/src/package1.0/Makefile
===================================================================
--- trunk/base/src/package1.0/Makefile	2009-05-23 16:53:19 UTC (rev 51376)
+++ trunk/base/src/package1.0/Makefile	2009-05-23 18:44:07 UTC (rev 51377)
@@ -18,4 +18,4 @@
 	$(SILENT)set -x; for file in ${SRCS}; do \
 		$(INSTALL) -o ${DSTUSR} -g ${DSTGRP} -m 444 $$file ${INSTALLDIR}; \
 	done
-	$(SILENT) $(TCLSH) ../pkg_mkindex.tcl ${INSTALLDIR}
+	$(SILENT) ../pkg_mkindex.sh ${INSTALLDIR}

Added: trunk/base/src/pkg_mkindex.sh.in
===================================================================
--- trunk/base/src/pkg_mkindex.sh.in	                        (rev 0)
+++ trunk/base/src/pkg_mkindex.sh.in	2009-05-23 18:44:07 UTC (rev 51377)
@@ -0,0 +1,44 @@
+#!/bin/bash
+# pkg_mkindex.sh
+#
+# Copyright (c) 2009 The MacPorts Project
+# All rights reserved.
+#
+# Redistribution and use in source and binary forms, with or without
+# modification, are permitted provided that the following conditions
+# are met:
+# 1. Redistributions of source code must retain the above copyright
+#    notice, this list of conditions and the following disclaimer.
+# 2. Redistributions in binary form must reproduce the above copyright
+#    notice, this list of conditions and the following disclaimer in the
+#    documentation and/or other materials provided with the distribution.
+# 3. Neither the name of Apple Computer, Inc. nor the names of its contributors
+#    may be used to endorse or promote products derived from this software
+#    without specific prior written permission.
+# 
+# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+# ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
+# LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+# CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+# SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+# INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+# CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+# ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+# POSSIBILITY OF SUCH DAMAGE.
+
+TCLSH=@TCLSH@
+GREP=@GREP@
+
+if [ $# = 0 ]; then
+    echo "Usage: $0 <directory list>"
+    exit 1
+fi
+
+for dir in $@; do
+    echo "pkg_mkIndex -verbose -- $dir *.tcl *.dylib *.so" | $TCLSH 2>&1 \
+        | $GREP "^warning: " && exit 1
+done
+
+exit 0

Deleted: trunk/base/src/pkg_mkindex.tcl
===================================================================
--- trunk/base/src/pkg_mkindex.tcl	2009-05-23 16:53:19 UTC (rev 51376)
+++ trunk/base/src/pkg_mkindex.tcl	2009-05-23 18:44:07 UTC (rev 51377)
@@ -1,37 +0,0 @@
-#!/usr/bin/env tclsh
-# pkg_mkindex.tcl
-#
-# Copyright (c) 2002 Apple Computer, Inc.
-# All rights reserved.
-#
-# Redistribution and use in source and binary forms, with or without
-# modification, are permitted provided that the following conditions
-# are met:
-# 1. Redistributions of source code must retain the above copyright
-#    notice, this list of conditions and the following disclaimer.
-# 2. Redistributions in binary form must reproduce the above copyright
-#    notice, this list of conditions and the following disclaimer in the
-#    documentation and/or other materials provided with the distribution.
-# 3. Neither the name of Apple Computer, Inc. nor the names of its contributors
-#    may be used to endorse or promote products derived from this software
-#    without specific prior written permission.
-# 
-# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
-# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
-# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
-# ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
-# LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
-# CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
-# SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
-# INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
-# CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
-# ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
-# POSSIBILITY OF SUCH DAMAGE.
-
-if {$argc < 1} {
-	puts "Usage: $argv0 <directory list>"
-	exit
-}
-foreach dir $argv {
-	pkg_mkIndex -verbose -- $dir *.tcl *.dylib *.so
-}

Modified: trunk/base/src/port1.0/Makefile
===================================================================
--- trunk/base/src/port1.0/Makefile	2009-05-23 16:53:19 UTC (rev 51376)
+++ trunk/base/src/port1.0/Makefile	2009-05-23 18:44:07 UTC (rev 51377)
@@ -25,7 +25,7 @@
 	$(SILENT)set -x; for file in ${SRCS}; do \
 		$(INSTALL) -o ${DSTUSR} -g ${DSTGRP} -m 444 $$file ${INSTALLDIR}; \
 	done
-	$(SILENT) $(TCLSH) ../pkg_mkindex.tcl ${INSTALLDIR}
+	$(SILENT) ../pkg_mkindex.sh ${INSTALLDIR}
 
 test::
 	${TCLSH} tests/portutil.tcl

Modified: trunk/base/src/registry1.0/Makefile
===================================================================
--- trunk/base/src/registry1.0/Makefile	2009-05-23 16:53:19 UTC (rev 51376)
+++ trunk/base/src/registry1.0/Makefile	2009-05-23 18:44:07 UTC (rev 51377)
@@ -16,6 +16,6 @@
 	$(SILENT)set -x; for file in ${SRCS}; do \
 		$(INSTALL) -o ${DSTUSR} -g ${DSTGRP} -m 444 $$file ${INSTALLDIR}; \
 	done
-	$(SILENT) $(TCLSH) ../pkg_mkindex.tcl ${INSTALLDIR}
+	$(SILENT) ../pkg_mkindex.sh ${INSTALLDIR}
 
 test::

Modified: trunk/base/src/registry2.0/Makefile
===================================================================
--- trunk/base/src/registry2.0/Makefile	2009-05-23 16:53:19 UTC (rev 51376)
+++ trunk/base/src/registry2.0/Makefile	2009-05-23 18:44:07 UTC (rev 51377)
@@ -25,4 +25,4 @@
 	$(SILENT) set -x; for file in ${SRCS}; do \
 		$(INSTALL) -o ${DSTUSR} -g ${DSTGRP} -m 444 $$file ${INSTALLDIR}/$$file; \
 	done
-	$(SILENT) $(TCLSH) ../pkg_mkindex.tcl ${INSTALLDIR}
+	$(SILENT) ../pkg_mkindex.sh ${INSTALLDIR}
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/macports-changes/attachments/20090523/acc9a0d1/attachment-0001.html>


More information about the macports-changes mailing list