Overview
| Artifact ID: | cd32b519a7bf6eb4c6f684164c9999c52bf84131 |
|---|---|
| Ticket: | 3592042fffffffffffffffffffffffffffffffff
pkg_mkIndex fails on package present |
| User & Date: | heinrichmartin on 2012-12-04 17:04:22 |
Changes
- icomment:
Hi Don, [package require] returns the empty string inside [pkg_mkIndex]. I think this is the way to go for [package present]. (No assurance that this is what everybody would expect...) The discontinued support for pkg_mkIndex is a valuable information: I use it in the Makefile of a project with several packages. The purpose is to detect simple syntax errors like mismatched delimiters. (Yes, otherwise I could create them manually.) Maybe, my error is something completely different, that's why I want to clarify with a minimal example: ` cd /tmp mkdir foo cat > foo/init.tcl <<EOF package provide foo 4.2 package require bar namespace eval foo { proc foo1 args { return [info level 0] } } EOF expect -c "pkg_mkIndex -verbose foo" mkdir bar cat > bar/init.tcl <<EOF package provide bar 2.8 namespace eval bar { proc bar1 args { return [info level 0] } } EOF expect -c "pkg_mkIndex -verbose bar" mkdir test cat > test/init.tcl <<EOF puts ">>>[package require foo]<<<" puts ">>>[package present bar]<<<" package provide test 0.1 EOF # sourcing test/init.tcl works fine export TCLLIBPATH="." && expect -c "source test/init.tcl" # but pkg_mkIndex does not export TCLLIBPATH="." && expect -c "pkg_mkIndex -verbose test" ` Thanks for your reply! BR, Martin - login: "heinrichmartin"
- mimetype: "text/plain"
- username: "heinrichmartin"