| LPMtool - LPMtool is a Package Management tool | ||
|---|---|---|
| <<< Previous | Chapter 13. LPMtool Objects | Next >>> |
A "resource" represents any of the following objects:
A specific file, or a directory
A library
Or any other logical module/entity
A packages contains several different classes of resources:
These are files, libraries, and all other modules that are included in the package.
These resources must be installed already, before this package can be installed.
These resources cannot be installed together with this package. These resources, if they are provided by some other package, are considered incompatible, in some way.
Installing this package "obsoletes" these resources. All currently installed packages which provide the obsoleted resource are identified, and automatically uninstalled as part of installing this package.
These resources are very similar to obsoleted resources, but apply to the upgrade mode only. A package can be installed either in "install" or "upgrade" mode. The "install" mode allows concurrent installation of different versions of the same package; the "upgrade" mode removes any older versions of the package, upon installation.
This functionality is implemented using "superceded" resources. Normally, each package includes a resource setting which specifies that older versions of the package are superceded, as well as any version of the package for a different release of the base system distribution, so that the package is selected for upgrading when when upgrading to a newer version of the base system distribution.
These resources indicate which resources are updated by this package. In most cases, a package is presumed to update any package, of the same name, with an older version/release. Sometimes, however, a large software application that consists of multiple packages is reorganized, and certain resources are moved into different packages. For example, some library is moved into a different package. The different package would then specify that it updates the library resource. When checking for available updates, LPMtool would then correctly determine that a new package needs to be installed in order to update an existing package with a different name.
| NOTE: | File-based resources cannot be specified as updated resources, only non-file resources, like package names or library names. This is a temporary limitation that will be removed in the future. |
A resource specification consists of the resource name, plus an optional constraints that specify a particular resource version. A package that installs a file /usr/bin/prog, for example, will specify two resources:
LPMtool automatically computes a checksum of every installed file. The same file, with the same checksum, can be installed by more than one package. The conflicting resource will stop an attempt to install a different version of the file.
LPMtool automatically adds two required resources to all packages that contain files owned by a non-root user and group: "/etc/passwd" and "/etc/group". When installing files owned by someone other than "root", lpm needs to look up the userid and groupid in /etc/passwd (and /etc/shadow), in order to set the ownership of the file installed by the package.
Therefore, these packages will get the required resources "/etc/passwd" and "/etc/group". Presumably, when LPMtool gets used to build a set of packages for an entire system, one of the packages will install a stock password and group file:
The required resources will assure that the package with the stock /etc/passwd and /etc/group will get installed first, before all other packages that install non root-owned files.
Resources whose names do not begin with the "/" character refer to a generic resource, such as a shared library or a module, and may have the following constraints:
name = version-release
name != version-release
name < version-release
name > version-release
name <= version-release
name >= version-release
Generic resources use the same "version-release" concept as LPMtool packages; a resource is often named after a package (but it doesn't have to be). The release is optional: "foo=1.0" matches all resources called "foo" with version of "1.0", and any release.
| <<< Previous | Home | Next >>> |
| LPMtool Objects | Up | Special logic for file-based resources |