Relocatable packages

From SlackWiki
Jump to navigation Jump to search

Relocatable packages are created such that the user can choose to install the package in a different installation location than the default (usually /).

All Slackware packages are technically relocatable, since pkgtools can install packages in a different installation root directory if the ROOT environment variable is set to another directory, regardless of whether the package was specifically designed to be relocatable.

In practice, however, few packages are built with relocatability in mind, and installing them in any other installation root directory other than / will probably cause path related problems.

Why Relocate?

Installing into a different installation location other than / is useful in such cases as:

  • Installing multiple versions of a program
  • Installation by a normal (non-root) user in a user, non-system directory
  • Trying out new software
    • Installing a new version of a package without removing (or overwriting) the older version of the package at any time
    • Testing the new package
      • Possible approach: install as a normal user, test, and then install as root into system-wide areas.

Relocatable packages allow for more flexibility, and depending on the program to be packaged, may only require minimal additional effort to create.