summaryrefslogtreecommitdiffstats
path: root/library
diff options
context:
space:
mode:
authorescoffon <escoffon>1998-07-02 17:54:45 (GMT)
committerescoffon <escoffon>1998-07-02 17:54:45 (GMT)
commita8de39aac1ae3b89d19f7f80db2ef8a5d9115f5c (patch)
tree9c08ea1bed3bc3740224ae2e231a906973d2f0ee /library
parent3cf78441c1c46145263d592325d158274af575a6 (diff)
downloadtcl-a8de39aac1ae3b89d19f7f80db2ef8a5d9115f5c.zip
tcl-a8de39aac1ae3b89d19f7f80db2ef8a5d9115f5c.tar.gz
tcl-a8de39aac1ae3b89d19f7f80db2ef8a5d9115f5c.tar.bz2
- merged in the pkg_MkIndex changes
Diffstat (limited to 'library')
-rw-r--r--library/init.tcl45
1 files changed, 22 insertions, 23 deletions
diff --git a/library/init.tcl b/library/init.tcl
index 397ed41..b8cbfab 100644
--- a/library/init.tcl
+++ b/library/init.tcl
@@ -3,7 +3,7 @@
# Default system startup file for Tcl-based applications. Defines
# "unknown" procedure and auto-load facilities.
#
-# SCCS: %Z% $Id: init.tcl,v 1.3 1998/07/02 17:52:32 escoffon Exp $
+# SCCS: %Z% $Id: init.tcl,v 1.4 1998/07/02 17:54:45 escoffon Exp $
#
# Copyright (c) 1991-1993 The Regents of the University of California.
# Copyright (c) 1994-1996 Sun Microsystems, Inc.
@@ -690,26 +690,26 @@ proc pkg_mkIndex {args} {
load [lindex $pkg 0] [lindex $pkg 1] $c
}
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+ # We also call package ifneeded for all packages that have been
+ # identified so far. This way, each pass will have loaded the
+ # equivalent of the pkgIndex.tcl file that we are constructing,
+ # and packages whose processing failed in previous passes may
+ # be processed successfully now
+
+ foreach pkg [array names files] {
+ $c eval "package ifneeded $pkg\
+ \[list tclPkgSetup $dir \
+ [lrange $pkg 0 0] [lrange $pkg 1 1]\
+ [list $files($pkg)]\]"
+ }
+ if {$noPkgRequire == 1} {
+ $c eval {
+ rename package __package_orig
+ proc package {what args} {
+ switch -- $what {
+ require { return ; # ignore transitive requires }
+ default { eval __package_orig {$what} $args }
+ }
}
proc __dummy args {}
package unknown __dummy
@@ -932,8 +932,7 @@ proc pkg_mkIndex {args} {
incr processed
unset toProcess($file)
}
-
- tclLog "error while loading or sourcing $file: $msg"
+ interp delete $c
}
if {$processed == 0} {