upe.pkgmgmt — Install, remove and update packages

This module contains the functions to install, update and remove packages.

exception upe.pkgmgmt.DependencyError
  • Raised by install() when a dependency isn’t met.
  • Raised by remove() when trying to uninstall a package required for other one.
exception upe.pkgmgmt.NotCompatible

Raised by linstall() when trying to install a package built for another operating system and/or processor.

upe.pkgmgmt.linstall(package)

Deprecated since version 0.2: Use install() instead.

This function is deprecated and currently links to install(), but it’ll be eventually removed.

upe.pkgmgmt.install(package)

New in version 0.3: Replacing linstall().

Install a package from a local file archive file. package must be the file name (foo.pkg.tar.bz2, if the package is foo):

Exceptions:

  • FileNotFoundError (raised by shutil): Raised when the package file is not found.
  • DependencyError: Raised when the dependencies are not met (checked with upe.query.pkgin()).
  • NotCompatible: Raised when trying to install a package built for another operating system and/or processor.
upe.pkgmgmt.remove(package[, ignore=[]])

Uninstall an installed package. Will remove all the files copyied during the install and its entry in the package database. Will raise DependencyError when you are removing a package required for another one (if this package isn’t in ignore).

Previous topic

Build Script — Compiling and installing the source

Next topic

upe.query — Get info about the installed packages