What is the difference?
Hello list,
I wondered what is the difference between a) dpkg --get-selections "*" > mylist.txt and b) dpkg --get-selections > mylist.txt 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. Am I correct? Cheers Hans -- To UNSUBSCRIBE, email to debian-user-REQUEST@lists.debian.org with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org Archive: 201103091959.31983.hans.ullrich@loop.de">http://lists.debian.org/201103091959.31983.hans.ullrich@loop.de |
What is the difference?
On Wed, 09 Mar 2011 19:59:30 +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 > > 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. > > Am I correct? sm01@stt008:~$ dpkg --get-selections "*" > mylist.txt sm01@stt008:~$ dpkg --get-selections > mylist2.txt sm01@stt008:~$ diff mylist.txt mylist2.txt 791d790 < popularity-contest purge man dpkg: --get-selections [package-name-pattern...] Get list of package selections, and write it to stdout. Without a pattern, packages marked with state purge will not be shown. So, in b) as you did not provide a pattern (*) you don't get the "purged" ones :-? Greetings, -- Camaleón -- To UNSUBSCRIBE, email to debian-user-REQUEST@lists.debian.org with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org Archive: pan.2011.03.09.19.10.02@gmail.com">http://lists.debian.org/pan.2011.03.09.19.10.02@gmail.com |
What is the difference?
Am Mittwoch, 9. März 2011 schrieb Camaleón:
> On Wed, 09 Mar 2011 19:59:30 +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 > > > > 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. > > > > Am I correct? > > sm01@stt008:~$ dpkg --get-selections "*" > mylist.txt > sm01@stt008:~$ dpkg --get-selections > mylist2.txt > sm01@stt008:~$ diff mylist.txt mylist2.txt > 791d790 > < popularity-contest purge > > man dpkg: > > --get-selections [package-name-pattern...] > Get list of package selections, and write it to stdout. Without a > pattern, packages marked with state purge will not be shown. > > So, in b) as you did not provide a pattern (*) you don't get the "purged" > ones :-? > > Greetings, Hmm, not quite. There are also packages in a), which are marked as installed, but which are NOT installed and NOT purged. So I guess, the asterix must have a special meaning. Hans -- To UNSUBSCRIBE, email to debian-user-REQUEST@lists.debian.org with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org Archive: 201103092017.32900.hans.ullrich@loop.de">http://lists.debian.org/201103092017.32900.hans.ullrich@loop.de |
What is the difference?
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. > 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?). Sven -- To UNSUBSCRIBE, email to debian-user-REQUEST@lists.debian.org with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org Archive: 87lj0ogkqd.fsf@turtle.gmx.de">http://lists.debian.org/87lj0ogkqd.fsf@turtle.gmx.de |
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 -- To UNSUBSCRIBE, email to debian-user-REQUEST@lists.debian.org with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org Archive: 87d3m0gk47.fsf@turtle.gmx.de">http://lists.debian.org/87d3m0gk47.fsf@turtle.gmx.de |
What is the difference?
> |
> | 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. > Yes, of course I read this. But I thoughtm, the asterisk would mark ANY pattern, and no asterisk means the same. So IMO both results should be the same. > ---- > 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?). > > Sven It is not a great problem, but I wondered, why non-installed packages appeared as to be installed. When I googled, most sites are pointing to version a) and some to b). The correct version is b) --> dpkg --get-selections > mylist.txt, (if you want, like me, ONLY installed packages). Maybe the manual should be improved, to make it clear? Have fun! Hans -- To UNSUBSCRIBE, email to debian-user-REQUEST@lists.debian.org with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org Archive: 201103092040.23503.hans.ullrich@loop.de">http://lists.debian.org/201103092040.23503.hans.ullrich@loop.de |
| All times are GMT. The time now is 04:51 PM. |
VBulletin, Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.