Reputation: 2526
I'm learning Debian's package management system and have read Chapter 2. Debian package management. But I have difficulty in understanding the concept of "selection", or maybe "package selection". More specifically:
For example, whenever I want to find whether I have a package installed on my system, I usually run dpkg --get-selections 'PACKAGE-NAME'
. Frankly speaking, I don't know exactly why the option is called get-selections
and why I should use it. I turned to dpkg
manpage, but it doesn't explain further. The chapter above doesn't seem to explain, either.
While I'm reading the Debian reference, I see another tool called dselect
which also helps manage the packages. I'm also curious why it is called "select", and this may be a hint to understanding the concept of "selection".
According to my current research, I have some guesses of what it is about:
vi
, vim
, and nvi
on my system, and the "selection" specifies which one is the actively used one. However, the understandings above don't look right because that seems to be solved by using the symbolic links.
Hope someone would explain it to me. Thanks for the help!
Upvotes: 0
Views: 136
Reputation: 9533
If you write dpkg --get-selections
(this command is often included in crontab so that we backup the actual package installed on a machine), you get the list of all packages, installed, and deinstalled (but not purged).
So the selection is one of the status of the package:
As far I know, you can tell dpkg also to install, hold, deinstall or purge (--set-selections
)
This is a sort of selection, so the name. There are other statuses (successfull installed, error on postinst, error on untar, ...).
Note: Debian Reference Manual is a very old manual, grown "organically". Feel free to fill a bug (minor or wish), so that volunteers can improve it.
Upvotes: 2