Chapter 29. Managing the Package Repository

Table of Contents
Package Installation
Package Structure

A source distribution of eCos consists of a number of packages, such as the kernel, the C library, and the µITRON subsystems. These are individually versioned in the tree structure of the source code, to support distribution on a per-package basis and to support third party packages whose versioning systems might be different. The eCos Package Administration Tool is used to manage the installation and removal of packages from a variety of sources with potentially multiple versions.

The presence of the version information in the source tree structure might be a hindrance to the use of a separate source control system such as CVS or SourceSafe. To work in this way, you can rename all the version components to some common name (such as “current”) thus unifying the structure of source trees from distinct eCos releases.

The eCos build system will treat any such name as just another version of the package(s), and support building in exactly the same way. However, performing this rename invalidates any existing build trees that referred to the versioned source tree, so do the rename first, before any other work, and do a complete rebuild afterwards.

Package Installation

Package installation and removal is performed using the eCos Package Administration Tool. This tool is a Tcl script named ecosadmin.tcl which allows the user to add new eCos packages and new versions of existing packages to an eCos repository. Such packages must be distributed as a single file in the eCos package distribution format. Unwanted packages may also be removed from the repository using this tool. A graphical version of the tool is provided as part of the eCos Configuration Tool.

Using the Administration Tool

The graphical version of the eCos Package Administration Tool, provided as part of the eCos Configuration Tool, provides functions equivalent to the command-line version for those who prefer a Windows-based interface.

It may be invoked in one of two ways:

  • from the start menu (by default Start->Programs-> eCos->Package Administration Tool)

  • from the eCos Configuration Tool via the Tools->Administration menu item

The main window of the tool displays the packages which are currently installed in the form of a tree. The installed versions of each package may be examined by expanding the tree.

Packages may be added to the eCos repository by clicking on the Add button. The eCos package distribution file to be added is then selected via a File Open dialog box.

Packages may be removed by selecting a package in the tree and then clicking on the Remove button. If a package node is selected, all versions of the selected package will be removed. If a package version node is selected, only the selected version of the package will be removed.

Using the command line

The ecosadmin.tcl script is located in the base of the eCos repository. Use a command of the following form under versions of UNIX:

$ tclsh ecosadmin.tcl <command>

Under Windows, a command of the following form may be used at the Cygwin command line prompt:

$ cygtclsh80 ecosadmin.tcl <command>

The following commands are available:

add <file>

Adds the packages contained with the specified package distribution file to the eCos repository and updates the package database accordingly. By convention, eCos package distribution files are given the .epk suffix.

remove <package> [ --version=<version> ]

Removes the specified package from the eCos repository and updates the package database accordingly. Where the optional version qualifier is used, only the specified version of the package is removed.

list

Produces a list of the packages which are currently installed and their versions. The available templates and hardware targets are also listed.

Note that is is possible to remove critical packages such as the common HAL package using this tool. Users should take care to avoid such errors since core eCos packages may only be re-installed in the context of a complete re-installation of eCos.