X-Selection (wpkg-status)

The --set-selection command is used to create and change the X-Selection parameter. By default the selection is viewed as set to either manual or automatic. Manual is used when a package is installed explicitly. Automatic is used when a package gets installed implicit to satisfy a dependency. This allows wpkg to automatically remove packages when not needed anymore.

The selection can also be set to the Hold value. This special value prevents the packager from automatically be upgraded, updated (installed with the same version,) downgraded, and removed. This is particularly useful when a package of a specific version must be retained for some purpose.

The --list command shows packages on hold with the letter h. The --status or --field commands can be used to check the control file of an installed package. One of the fields is X-Selection and it contains the current value. You can actually specify the name of the field with the --field command line:

wpkg --field foo X-Selection

The --force-hold option can be used to ignore the Hold value.

Finally, the selection can be set to Reject. This value can actually only be used on packages that are either not installed or that were removed or purged (i.e. with a status of not-installed or conf-files.) This special value prevents anyone from installing a package with that name. This is the best way to prevent someone from installing a package. Note that there is no other way than changing the selection to something else than Reject to allow the installation of that package again.