Package: dpkg
Version: 1.13.11.0.1
Severity: normal

dpkg -l ignores --root:
$ dpkg --root=. -l  dbus-1|tail -1
ii  dbus-1         0.23.4-8       simple interprocess messaging system
$ find . -type f -amin -1
$ dpkg --root=. --get-selections  dbus-1
dbus-1                                          purge
$  find . -type f -amin -1
./var/lib/dpkg/status
So "ii" should be "pi" if -l obeyed --root!
True, the fine print on dpkg(1) mentions dpkg-query(1).
$ dpkg-query --admindir=var/lib/dpkg -l  dbus-1|tail -1
pi  dbus-1         0.23.4-8        [<-Finally. Trailing blanks though.]
$ dpkg --admindir=var/lib/dpkg -l  dbus-1|tail -1
ii  dbus-1         0.23.4-8       simple interprocess messaging system
$ dpkg-query --root=. -l  dbus-1|tail -1
dpkg-query: unknown option --root=.
$ dpkg --root=. --admindir=var/lib/dpkg -l  dbus-1|tail -1
ii  dbus-1         0.23.4-8       simple interprocess messaging system
$ dpkg --root=. --admindir=./var/lib/dpkg -l  dbus-1|tail -1
ii  dbus-1         0.23.4-8       simple interprocess messaging system
$ dpkg --root=. --admindir=$PWD/var/lib/dpkg -l  dbus-1|tail -1
ii  dbus-1         0.23.4-8       simple interprocess messaging system
Anyway, we prove that one can forget about changing where dpkg -l
looks via any switches.  The dpkg man page doesn't warn about it too.

By the way, on the man page
       -O | --selected-only
              Only process the packages that are selected for installa-
              tion. The actual marking is done with dselect or by dpkg,
              when it handles packages.  For example, when a package is
              removed, it will be marked selected for deinstallation.
Maybe this means:
              removed, it will be marked selected for deinstallation
              without this option.
But it's not clear.


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]

Reply via email to