Dragora GNU/Linux-Libre

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.


Installing packages

To install one or more packages we will use the command `pkg' followed by action we want to perform, in this case add. For instance:

# 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

Inspecting the content of a package

# pkg add --warn xterm-270-i487-1.ltz

Removing packages

Removing one or more installed packages is fairly easy. To do it, we combine `pkg' with remove.

Removing a package by name

# 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

Upgrading packages

# 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

Upgrading a previously upgraded package

# 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

Upgrading with details

# pkg upgrade -v pidgin-2.8.1-i486-1.tlz

Combining options

# pkg upgrade -v -f pidgin-2.8.1-i486-1.tlz

Checking the size

To see the size of the packages we use size. For instance, we type:

# 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


The debugging is done through erupt, which decompresses and unpackages the package file, resetting its permissions.

Uncompressing with erupt for debugging purposes:

# pkg erupt xterm-270-i486-1.tlz

A directory named "erupt-xterm" has been created in t "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.

Environment variables

There are two important environment variables for add, remove and upgrade. They are:


Indicates the directory where the parts of the database reside, by default: /var/db.


Root variable that can be used to install, remove or upgrade one or more packages in a previously mounted partition. For instance:

# ROOT=/mnt/hd pkg add xterm-270-x86_64-1.tlz