User Tools

Site Tools


etc:20-lpm-gui

This is an old revision of the document!


Creating an lpm gui/frontend

The main lpm frontend is a command-line program called “lpm”. It allows installation, updates and removal of packages to the local package repository, either from locally available package files or from a configured package catalogue.

There is not a lot of detailed documentation available, so this document first tries to explain:

  • the basic rules of lpm
  • how the local package repository looks
  • how lpm accesses package catalogues
  • how an lpk package looks

1. LPM rules

Like other package management systems, the purpose of lpm is the controlled installation, update and removal of software, or documentation. In order to achieve this, lpm enforces a set of rules that must be met.

  • Any software destined to be installed must be contained in an lpk package.
  • An lpk package is basically defined by a name, a version and a variant, and also all files with full path-names that the package wants to install.
  • Any package name can only be installed once locally.
  • A variant defines an alternative imlementation of one named package, only one variant can be installed per package.
  • No package can overwrite a file already installed by another package
  • Only one package can be installed at the same time
  • A package installation either succeeds or fails, there most be no half-installed packages

There are some other features of lpm, but these rules build the core of how lpm tries to ensure the integrity of locally installed software.

2. Internal structure of the local package repository

The local package repository of lpm has a very simple structure.

Per default, the repository resides in the directory /var/lib/lpm. Below are a set of directories holding any information about the currently installed pacakges and other stuff:

installed : This directory contains one subdirectory for every installed package, with the package name serving as the directory name.

fileindex : This directory contains one file for every installed package, with the package name serving as the filename

scriptdir : This directory contains a busybox environment used as the root for any installation scripts of a package

stagearea : This directory is used to download and extract any package

certstore : This directory holds all cerficates of registered package creators

lpc-http-cache : If the lpc-http catalogue is used, this directory holds the downloaded package indexes

All information about installed packages is stored in world readable text files below installed and fileindex.

The fileindex file for any package is a simple list of filenames, one line per file. The filenames are fully qualified, with path names.

The package directory for any package contains a set of files containing other information about the package:

  • desc.txt: contains the basic info of the currently installed package version
  • inst.txt: contains information about when and why (per explicit request or as a dependency) the package was installed or updated.
git clone http://git.decentral.ch/lpm.git
cd lpm/src
git clone http://git.decentral.ch/libstuff.git stuff
etc/20-lpm-gui.1652472095.txt.gz · Last modified: by wikiadmin