Version 4 of Using Teacup for the first time

Updated 2006-12-08 12:25:56 by lwv

Notes on using the Tcl Extension Archive client - TEAcup

You've installed ActiveTcl, ensured that the executables are in the search path of your shell, and you're looking at a command prompt. I'm using Windows XP, but you could be using MacOS X or any of the different flavours of Unix.

 C:\Documents and Settings\Alastair Davies>tclsh
 % set auto_path
 C:/Tcl/lib/tcl8.5 C:/Tcl/lib C:/Tcl/lib/tcllib1.7 C:/Tcl/lib/tklib0.2 
 {C:/Documents and Settings/Alastair Davies/Teapot/repository/package/win32-ix86/lib} 
 {C:/Documents and Settings/Alastair Davies/Teapot/repository/package/tcl/lib} 
 % exit

The last two elements of this list are new. The Teapot folder in my home directory has been created during the installation of the latest release of ActiveTcl. (I am using release 8.5.0.0.272633.) Teapot contains a repository folder, which contains an INDEX and a config file, but there is no package folder yet.

You'll use the TEAcup client to manage the extensions, packages or modules in that folder.

 C:\Documents and Settings\Alastair Davies>teacup help

    teacup.exe
    is a tool to access package repositories

        teacup.exe help commands        List of commands provided by teacup
        teacup.exe help help            How to use help
        teacup.exe help options         Describes the standard options
        teacup.exe help queries         Describe the syntax of complex queries

 C:\Documents and Settings\Alastair Davies>teacup archive list
    http://teapot.activestate.com

Out-of-the-box, TEAcup is set to access the ActiveState repository. Maybe you want to grab a copy of the dict extension, in order to be able to use your 8.5 scripts in an 8.4 installation.

 C:\Documents and Settings\Alastair Davies>teacup install dict
 Resolving dict -is package ... [package dict 8.5.3 win32-ix86 @ http://teapot.activestate.com]
 Resolving Tcl -require 8.4 -is package ... [package Tcl 8.5 _ ... Already installed, probing dependencies]

 Retrieving package dict    8.5.3 win32-ix86 ...@ http://teapot.activestate.com ... Ok

 Installing into C:/Documents and Settings/Alastair Davies/Teapot/repository

 Installing package dict 8.5.3 win32-ix86

And, sure enough, there is now a new cascade of folders within my repository.

 Directory of C:\Documents and Settings\Alastair Davies\Teapot\repository\package\win32-ix86\lib\dict-8.5.3

 08/12/2006  10:12    <DIR>          .
 08/12/2006  10:12    <DIR>          ..
 08/12/2006  10:12            32,768 dict853.dll
 08/12/2006  10:12               268 pkgIndex.tcl
 08/12/2006  10:12               306 teapot.txt
               3 File(s)         33,342 bytes

So far, so very good. No doubt there will be some problems, but I've only stumbled on one so far. Consistently, the TEAcup client is unable to update itself.

 C:\Documents and Settings\Alastair Davies>teacup update-self
 Updating C:/Tcl/bin/teacup.exe ...
 Found newer version 8.4.14.1.273125 (win32-ix86) @ http://teapot.activestate.com

 Retrieving application teacup      8.4.14.1.273125 win32-ix86      ...@ http://teapot.activestate.com ... Error: timeout
 Bad retrieval.

One other niggle struck me when I updated a buggy extension installed in C:\Tcl\lib to a newer version retrieved using TEAcup. Because of the order of the directories in the auto_path list, it was necessary to delete the former version in order to be able to use the latter. Perhaps with correct use of version numbers this would not be a problem, but this particular bug in the vfs::starkit package concerned the incorrect use of version numbers!

Anyway, these are minor problems, in an excellent development. Many thanks to ActiveState and others who have contributed. I hope this helps get more people started using the TEAcup client and that similar guidance for package authors to use the TEApot server will become available.

Alastair Davies 8 December 2006


Category Example Category Repository