Re: What is the difference?
On 2011-03-09 20:24 +0100, Sven Joachim wrote:
> On 2011-03-09 19:59 +0100, Hans-J. Ullrich wrote:
>
>> I wondered what is the difference between
>>
>> a) dpkg --get-selections "*" > mylist.txt
>> and
>> b) dpkg --get-selections > mylist.txt
>
> This is mentioned in the dpkg manpage:
>
> ,----
> | --get-selections [package-name-pattern...]
> | Get list of package selections, and write it to stdout. Without a
> | pattern, non-installed packages (i.e. those which have been
> | previously purged) will not be shown.
> `----
>
>> I get different results, but the asterix is a joker, and the results should be
>> the same. The manual did not mention the asterix, and I suppose (as many sites
>> told using the asterix), option a) is orphaned.
>
> No, it's not. But since dpkg (as of version 1.15.4) no longer records
> purged packages that are not marked for installation in the status file,
> a) and b) will usually give the same results, AIUI.
That is, unless you _have_ marked currently purged packages for
installation, e.g. by selecting them in dselect or with
"dpkg --set-selections".
>> Am I correct?
>
> I also get a difference. Version a) lists several additional packages
> as "to be installed", some of which no longer exist. I wonder why
> (maybe I have used inadvertently used dselect(1) as root?).
After marking these packages for purge with "dpkg --set-selections",
there is no difference between a) and b) for me.
Sven
Reply to: