Section: Package Management (1)
Updated: Jun 11 1998


epkg - encap package manager  


epkg [-Vvqfaexl] [-t target_dir] [-s source_dir] -c|-b|-u

epkg [-Vvqfaexl] [-t target_dir] [-s source_dir] -U|-i|-r pkgname ...  


This man page documents version 0.4beta of epkg.  


epkg is a package manager which is based upon the encap software management system, but provides many useful extentions. In the encap system, each package is kept in its own package directory (usually /usr/local/encap/pkgname), rooted under the encap source directory (usually /usr/local/encap). Symbolic links to these files are maintained in the encap target directory (usually /usr/local), so that the packaging system is completely transparent to the users.

For example, when installing tcsh, you would install the following files:


epkg would create the following symbolic links:

  /usr/local/bin/tcsh -> ../../encap/tcsh-6.07.02/bin/tcsh
  /usr/local/man/man1/tcsh.1 -> ../../encap/tcsh-6.07.02/man/man1/tcsh.1

Thus, the user would be able to run /usr/local/bin/tcsh transparently.  


epkg has several operating modes, but only one may be used at once. If more than one of these options are passed, epkg will print out its usage and exit.
Clean package mode. This will recursively go through the target encap directory and remove any dangling symbolic links which point under the encap source directory. This is automaticly done in batch package mode (see below), but it can also be done by itself.
Batch package mode. epkg will invoke clean mode on the encap target directory and then install every package in the encap source directory.
Update package mode. epkg will scan all of the packages in the encap source directory to determine the latest version of each package. Then, any old versions of each package will be removed and the latest version will be installed.
Remove package mode. epkg will remove the package(s) listed on the commandline.
Individual package mode. epkg will install the package(s) listed on the commandline.
Update specific package mode. This is a hybrid of individual mode and update mode. It scans for all versions of each package listed on the commandline, and for each package it removes the older versions and installs the latest version. If no package mode is specified when packages are listed on the commandline, specific-update mode is assumed.


Print version information.
Be verbose. This provides slightly more output than the default.
Quiet mode. epkg will not produce any output except for error messages.
Force conflict resolution mode. If a file already exists when epkg attempts to create a link, it will be removed so that the link can be created.
Use absolute symlinks. The default is to use relative links.
Don't execute package scripts. See ENCAP EXTENTIONS below.
Ignore all encap.exclude files.
Disable transaction logging. When this is not specified, epkg will log an entry to the file epkg.log in the encap source directory for each transaction indicating the date, target directory, package, install or remove as appropriate, and the status. The status is success if completely successful, failed if there was a fatal error, forced if invoked in force mode (see above), or partial if the operation was partially successful (for example, most of the links were created, but some could not be created because of a link by the same name into a previously-installed package).
-t target_dir
Tells epkg to use target_dir as the encap target directory. If this is not specified, epkg will check the contents of the ENCAP_TARGET environment variable. If that is not set, it will use the default set at compile-time (usually /usr/local).
-s source_dir
Tells epkg to use source_dir as the encap source directory. If this is not specified, epkg will check the contents of the ENCAP_SOURCE environment variable. If that is not set, it will use the default set at compile-time (usually /usr/local/encap).


epkg does not retain full compatibility with other encap package managers, but it does support a combination of options which perform a very similar function. If invoked as encap, epkg will assume the flags -vbeal. If invoked as encapper, it will assume -qieal.

Like encap, but unlike encapper, epkg will not link in any normal files in the package directory itself. This allows for the placement of READMEs or package documentation which does not need to be linked to the target directory itself.

epkg will, by default, use relative symbolic links instead of absolute links. Thus, if the source and target directories are on the same filesystem, changing the mount point for that filesystem will not invalidate the target links.

In clean mode, epkg will recursively go through every subdirectory of the target directory, not just the ones on a preset list. It does, however, take care not to enter the source directory, which often lies under the target directory.

In terms of output, epkg will by default provide something similar to encapper's verbose mode: it lists package names, actions (creating or removing links or directories), conflict warnings, and error messages. In quiet mode, it will output only error messages. In verbose mode, it will output a larger amount of information, similar to encap.  


The most notable extention to the classic encap package format is the addition of four optional package scripts which live in the package directory. The ENCAP_SOURCE and ENCAP_TARGET environment variables are set and inheritted by these scriopts so that they know where the package they are from has been installed.
This is executed before the package is linked in (for example, to check for prerequisites).
This is executed after the package is linked in (for example, to make the system aware of a newly installed shared library or to create an ssh host key).
This is executed before the package is removed (for example, to make sure no other packages depend on the package being removed).
This is executed after the package is removed (for example, to make the system aware that a shared library has been removed).



To make epkg behave like the perl encap program:

        epkg -vbeal

To make epkg behave like the C encapper program:

        epkg -qieal pkgname ... (to add)

        epkg -qreal pkgname ... (to remove)


Probably quite a few. Reports are welcome.  


The encap system evolved from a much older variant called the acsl system. The first encap scripts were written in ksh, but these were quickly abandoned when the first perl versions were created.

At the time of this writing, there are two commonly-used encap managers: Jason Wessel's perl version (ftp://uiarchive.uiuc.edu/pub/encap/encap.html) and Brian Swetland's C version (http://www.frotz.net/~swetland/code/encapper.c). The goal of epkg is to create the best of both worlds by taking the useful features from each of these implementations and adding on a number of new extentions.  












Mark D. Roth (roth@uiuc.edu)



This document was created by man2html, using the manual pages.
Time: 02:59:05 GMT, July 22, 1998