Description: |
I am not sure whether the category is correct, but I encountered the following problem with the safe interpreter - the test safe-14.1 fails if run by the installed interpreter. It fails because the paths of safe and normal interpreter are different.
The problem is that the safe interpreter recursively descends into directories which may add paths that are not in the 'tm::path'. I.e. I am getting the following:
---- Result was:
/usr/lib/tcl8/site-tcl /usr/lib/tcl8/8.0 /usr/lib/tcl8/8.1 /usr/lib/tcl8/8.2 /usr/lib/tcl8/8.3 /usr/lib/tcl8/8.4 /usr/lib/tcl8/8.5 /usr/share/tcl8/site-tcl /usr/share/tcl8/8.0 /usr/share/tcl8/8.1 /usr/share/tcl8/8.2 /usr/share/tcl8/8.3 /usr/share/tcl8/8.4 /usr/share/tcl8/8.5 /usr/share/tcl8/8.4/platform
---- Result should have been (exact matching):
/usr/lib/tcl8/site-tcl /usr/lib/tcl8/8.0 /usr/lib/tcl8/8.1 /usr/lib/tcl8/8.2 /usr/lib/tcl8/8.3 /usr/lib/tcl8/8.4 /usr/lib/tcl8/8.5 /usr/share/tcl8/site-tcl /usr/share/tcl8/8.0 /usr/share/tcl8/8.1 /usr/share/tcl8/8.2 /usr/share/tcl8/8.3 /usr/share/tcl8/8.4 /usr/share/tcl8/8.5
The /usr/share/tcl8/8.4/platform is extra directory added to safe interpreter by descending deeper into /usr/share/tcl8/8.4. It is added by the following snip of safe.tcl:
# [Bug 2854929]
# Recursively find deeper paths which may contain
# modules. Required to handle modules with names like
# 'platform::shell', which translate into
# 'platform/shell-X.tm', i.e arbitrarily deep
# subdirectories.
lappend morepaths {*}[glob -nocomplain -directory $dir -type d *]
Is it the correct fix? Are safe intepreter paths allowed to be different?
|