5.8 Package Management

Package management is handled by shell script /usr/bin/pacman; since the directory /usr/bin is in the PATH, pacman is invoked from the shell command line by typing its name, pacman. Its options are somewhat similar to Red Hat's package manager RPM. Use pacman to install and remove packages, and to query the database of installed packages and files.

The binary packages used by ttylinux are tar archives compressed with the bzip2 algorithm. All the packages that normally come with the ttylinux distribution are available on the download page at the ttylinux web site; this is for reinstalling any packages that may have been removed from a ttylinux system.

To install the package bash-3.2-i486.tbz, you would use the following command:

	pacman -i pkg-bash-3.2.tbz

pacman can install a package from standard input. This is useful for forming a pipe with the wget program, which allows installing a package from the network without having to store it. For example, use the following to download and install the bash package from a ttylinux web site ttylinux.net:

	wget http://ttylinux.net/Download/bash-3.2-i486.tbz -O - | pacman -i -

Three different options are available for querying the database of installed packages and files. To get a list of all installed packages, run

	pacman -qa

To find out which package the file /bin/login belongs to, use

	pacman -qf /bin/login

To list all files from the e2fsprogs-1.41.3 package, run

	pacman -ql e2fsprogs-1.41.3

If you want to remove a package, you can do so by use of the -e option. To remove the isdn4k-utils.v3.2p1 package, you would use the following command:

	pacman -e isdn4k-utils.v3.2p1

You can also use the -v option to get verbose output during installation and removal of packages. pacman will then list all the files it has installed or removed.

pacman Database
The pacman script uses directory /usr/share/ttylinux which has one file per installed package, each file containing a listing of all the files that belong to the installed package.