Package: dpkg
Version: 1.14.19
Tags: patch
Kindly accept the following two patches to correct the terrible
misleading language on the man pages.
*** dpkg.1.orig Mon May 12 13:48:46 2008
--- dpkg.1 Sun Jun 22 02:16:53 2008
***************
*** 209,215 ****
.TP
\fB\-\-get\-selections\fP [\fIpackage-name-pattern\fP...]
Get list of package selections, and write it to stdout. Without a pattern,
! packages marked with state purge will not be shown.
.TP
.B \-\-set\-selections
Set package selections using file read from stdin. This file should be
--- 209,216 ----
.TP
\fB\-\-get\-selections\fP [\fIpackage-name-pattern\fP...]
Get list of package selections, and write it to stdout. Without a pattern,
! purged packages (status: not-installed) will not be shown.
! .\" (Not "packages marked with (desired) state 'purge'"!!)
.TP
.B \-\-set\-selections
Set package selections using file read from stdin. This file should be
*** dpkg-query.1.orig Mon May 12 13:48:46 2008
--- dpkg-query.1 Sun Jun 22 02:08:36 2008
***************
*** 15,21 ****
.BR \-l ", " \-\-list " \fIpackage-name-pattern\fP..."
List packages matching given pattern. If no \fIpackage-name-pattern\fP
is given, list all packages in \fI/var/lib/dpkg/status\fP, excluding
! the ones marked with state purge. Normal shell wildchars are allowed
in \fIpackage-name-pattern\fP. Please note you will probably have to
quote \fIpackage-name-pattern\fP to prevent the shell from performing
filename expansion. For example this will list all package names starting
--- 15,23 ----
.BR \-l ", " \-\-list " \fIpackage-name-pattern\fP..."
List packages matching given pattern. If no \fIpackage-name-pattern\fP
is given, list all packages in \fI/var/lib/dpkg/status\fP, excluding
! the ones purged from the system (status:n (not-installed)).
! .\" (Not "p:purge"!!)
! Normal shell wildchars are allowed
in \fIpackage-name-pattern\fP. Please note you will probably have to
quote \fIpackage-name-pattern\fP to prevent the shell from performing
filename expansion. For example this will list all package names starting
Otherwise you will have users scratching their heads for hours:
# grep-status -X -s Status -P emacs
Status: purge ok installed
dpkg --get-selections|perl -nwe 'print if /emacs\s/'
emacs purge
Users think: "Hey, I marked it as 'purge', why is it still showing up?"
# grep-status -s Status qpdf
Status: install ok not-installed
# dpkg --get-selections|grep qpdf|wc
0 0 0
dpkg --get-selections qpdf
qpdf install
Users think: "Hey, nothing about purge, why doesn't it show up?"
You see, the word "purge", to users is only used when talking about
DESIRED states,
$ dpkg -l
Desired=Unknown/Install/Remove/Purge/Hold
| Status=Not/Inst/Cfg-files/Unpacked/Failed-cfg/Half-inst/trig-aWait/Trig-pend
|/ Err?=(none)/Hold/Reinst-required/X=both-problems (Status,Err: uppercase=bad)
When all along you are talking about STATUS states. Hence please
install my clarifications!)
Furthermore, the word purge is only used
Status: purge ok installed
^here ^not-here
and it is the latter field which you are talking about!