This section describes the package system introduced in the Dragora 2.x series.
Dragora's package system was written from scratch making use of the features and advantages of the command language interpreter, BASH. It is simply called "pkgsystem".
It contains the command line tools to build, install, remove and upgrade software packages. The files format have the .tlz extension and they use GNU tar for the packaging and Lzip as the compression format in the package redistribution.
The main command of the package system is called `pkg'. It is nothing more than a wrapper to execute the command line tools that belong to the list of commands of pkg.
Within each package - besides the system programs - includes a description in English and Spanish that can be shown on screen at the time of installing or updating the packages.
The format of the package system's database is maintained on plain text files.
Currently, by default, Dragora's package system does not offer automatic dependency resolution, since that would need more code and, in some cases, require complex algorithms. Those are more prone to failure than to resolution.
In summary, we want to refer to the package system as something simple, well done. Something that gives the control and the power to the user. We invite you to read about its usage in the paragraphs below.
# pkg add pidgin-2.7.11-i486-1.tlz
Installing multiple packages:
# pkg add ktsuss-1.4-i486-1.tlz icewm-1.3.7-i486-1.tlz gimp-2.6.11-i486-1.tlz
Installing a package that had been previously installed:
# pkg add --force pidgin-2.7.11-i486-1.tlz
# pkg add --warn xterm-270-i487-1.ltz
# pkg remove pidgin
It is not necessary to specify the complete name or path of the package. remove can
interpret the segments of the name of the package.
Removing a package by name and version:
As you can see, with two segments it is possible to remove a package:
# pkg remove pidgin-2.7.11
Removing multiple packages:
# pkg remove pidgin ktsuss-1.4 icewm gimp
Inspecting the content that would be removed:
# pkg remove --warn xterm
Removing a package getting rid of the output messages:
By default, remove shows the output of what it is removing (files, directories and symbolic
links). It's possible to get rid of these messages using the option --quiet:
# pkg remove --quiet xterm
# pkg upgrade pidgin-2.8.1-i486-1.tlz
Upgrading many packages:
# pkg upgrade ktsuss-1.5-i486-1.tlz icewm-1.3.9-i486-1.tlz gimp-2.8.0-i486-1.tlz
# pkg upgrade -f pidgin-2.8.1-i486-1.tlz
Install a non-installed package, upgrading:
# pkg upgrade -i ironsword-6.6.6-i486-1.tlz
# pkg upgrade -v pidgin-2.8.1-i486-1.tlz
# pkg upgrade -v -f pidgin-2.8.1-i486-1.tlz
# pkg size pidgin-2.7.11-i486-1.tlz
And we get:
Package = pidgin-2.7.11-i486-1.tlz Compressed size = 7.1M Uncompressed size = 36M
# pkg erupt xterm-270-i486-1.tlz
# mkdir /tmp/erupt-xterm # pkg erupt xterm-270-i486-1.tlz /tmp/erupt-xtermA directory named "erupt-xterm" has been created in the "tmp" directory, and then erupt was called specifying the target directory (/tmp/erupt-xterm) using erupt, where the package was decompressed for debugging purposes.
The following is a description of the directory structure of the database:
| Directory: | Description: |
|---|---|
| /var/db | Default directory of the database. |
| /var/db/pkg/pre-post | Directory for the pre-post instalation files. |
| /var/db/pkg/post-install | Directory for the post-installation files. |
| /var/db/pkg/description | Directory that contains the descriptions of the packages. |
| /var/db/pkg/removed | Secondary hierarchy where the removed files and directories reside. |
| /var/db/pkg/removed/pre-post | Removed files of pre-post instalation. |
| /var/db/pkg/removed/post-install | Removed files of post-instalation. |
| /var/db/pkg/removed/description | Removed description files. |
There are two important environment variables for add, remove and upgrade. They are:
# ROOT=/mnt/hd pkg add xterm-270-x86_64-1.tlz
08 November 2011, 16:17 | pkgm.t2t - GNU Free Documentation License