summaryrefslogtreecommitdiffstats
path: root/library
diff options
context:
space:
mode:
authorandreas_kupries <akupries@shaw.ca>2007-03-09 20:04:38 (GMT)
committerandreas_kupries <akupries@shaw.ca>2007-03-09 20:04:38 (GMT)
commite0efa747c2cefb29ffa4c46bf1c0d8b3923bd600 (patch)
tree8f4b18e9fe3189a76157d97b433e7b2c55eac90c /library
parent5810f3ae6446903fadc9860d8ba2c24515a448b3 (diff)
downloadtcl-e0efa747c2cefb29ffa4c46bf1c0d8b3923bd600.zip
tcl-e0efa747c2cefb29ffa4c46bf1c0d8b3923bd600.tar.gz
tcl-e0efa747c2cefb29ffa4c46bf1c0d8b3923bd600.tar.bz2
* library/platform/shell.tcl: Made more robust if an older platform
* library/platform/pkgIndex.tcl: package is present in the inspected * unix/Makefile.in: shell. Package forget it to prevent errors. Bumped * win/Makefile.in: package version to 1.1.3, and updated the makefiles installing it as Tcl Module.
Diffstat (limited to 'library')
-rw-r--r--library/platform/pkgIndex.tcl2
-rw-r--r--library/platform/shell.tcl14
2 files changed, 14 insertions, 2 deletions
diff --git a/library/platform/pkgIndex.tcl b/library/platform/pkgIndex.tcl
index e38e770..d141612 100644
--- a/library/platform/pkgIndex.tcl
+++ b/library/platform/pkgIndex.tcl
@@ -1,3 +1,3 @@
package ifneeded platform 1.0.2 [list source [file join $dir platform.tcl]]
-package ifneeded platform::shell 1.1.2 [list source [file join $dir shell.tcl]]
+package ifneeded platform::shell 1.1.3 [list source [file join $dir shell.tcl]]
diff --git a/library/platform/shell.tcl b/library/platform/shell.tcl
index 6c1be5d..b007666 100644
--- a/library/platform/shell.tcl
+++ b/library/platform/shell.tcl
@@ -26,8 +26,14 @@ proc ::platform::shell::generic {shell} {
LOCATE base out
set code {}
+ # Forget any pre-existing platform package, it might be in
+ # conflict with this one.
+ lappend code {package forget platform}
+ # Inject our platform package
lappend code [list source $base]
+ # Query and print the architecture
lappend code {puts [platform::generic]}
+ # And done
lappend code {exit 0}
set arch [RUN $shell [join $code \n]]
@@ -45,8 +51,14 @@ proc ::platform::shell::identify {shell} {
LOCATE base out
set code {}
+ # Forget any pre-existing platform package, it might be in
+ # conflict with this one.
+ lappend code {package forget platform}
+ # Inject our platform package
lappend code [list source $base]
+ # Query and print the architecture
lappend code {puts [platform::identify]}
+ # And done
lappend code {exit 0}
set arch [RUN $shell [join $code \n]]
@@ -221,4 +233,4 @@ proc ::platform::shell::DIR {} {
# ### ### ### ######### ######### #########
## Ready
-package provide platform::shell 1.1.2
+package provide platform::shell 1.1.3