[Starkit] can't source sdx.kit

Uwe Koloska koloska at voiceinterconnect.de
Mon May 8 19:07:32 CEST 2006


Am Montag, 8. Mai 2006 17:36 schrieb Brian Theado:
> On 5/8/06, Uwe Koloska <koloska at voiceinterconnect.de> wrote:
> [...]
>
> > % source sdx.kit
> > Specify one of the following commands:
> >  addtoc    eval      fetch     ftpd      httpd     httpdist  ls       
> > lsk md5sum    mkinfo    mkpack    mkshow    mksplit   qwrap     ratarx   
> > rexecd starsync  sync      tgz2kit   treetime  unwrap    update   
> > version   wrap For more information, type:  tclkit help ?command?
> > % sdx::sdx help
> > invalid command name "sdx::sdx"
>
> [...]
>
> Try "package require sdx" after sourcing the kit.

uups, stupid me ...
I was irritated by the output. 

so here is a quick patch for sdx to avoid unnecessary output if sourcing:
------------------------------------------------------------------------------
--- sdx.vfs/main.tcl~   2006-03-01 11:18:41.000000000 +0100
+++ sdx.vfs/main.tcl    2006-05-08 18:03:19.000000000 +0200
@@ -2,7 +2,8 @@

 # old tclkits have broken "sourced" symlink detection (in their "starkit" 
pkg)
 # let SDX work in older ones but don't allow sourcing, which is a new feature
-if {[starkit::startup] eq "sourced" &&
+set __startup [starkit::startup]
+if {$__startup eq "sourced" &&
     [package vcompare [package require Tcl] 8.4.9] >= 0} return

 package require app-sdx
------------------------------------------------------------------------------

------------------------------------------------------------------------------
--- sdx.vfs/lib/app-sdx/sdx.tcl~        2006-03-01 21:16:16.000000000 +0100
+++ sdx.vfs/lib/app-sdx/sdx.tcl 2006-05-08 18:05:06.000000000 +0200
@@ -56,4 +56,5 @@
     uplevel #0 [list source [file join $b $a.tcl]]
 }

-run_sdx
+if {$__startup ne "sourced"} run_sdx
+unset __startup
------------------------------------------------------------------------------


But some experiments before this I tried the same with a tclkit-8.4.11 and got
  invalid command name "name:S,size:I,date:I,contents:B"
after the help output.  But nevertheless it worked.

Thank you!
Uwe


More information about the Starkit mailing list