Package: dlocate
Version: 1.02
Followup-For: Bug #563881

Some pro-multiple package name syntax observations...

Several 'dlocate' options can't handle 3 or more package names.  The
options '-ls', '-lsconf', '-du', '-md5sum', '-md5check', '-man',
'-lsman', '-lsconf', & '-L' all concatenate package names with 8
colons, (given 3 packages "foo bar baz"), and return the error:

    Package bar::::::::baz not installed or bar::::::::baz.list is empty. 

Some of the same options work correctly with 2 package names, for example:

    % dlocate -man dash bash
    1 dash
    1 sh
    1 bash
    1 bashbug
    1 clear_console
    1 rbash
    7 bash-builtins

The maintainer deprecates the syntax:

        ...that would require changing the output format (otherwise you'd have
        no way of knowing which man pages belonged to which package) ...
        ...it can be can fed it into 'xargs man', like so: 
        'dlocate -man dlocate | xargs man'

Yet 'dlocate -man dash bash | xargs man' works OK. The "which is which"
question can be solved for free by the user deliberately invoking
'dlocate' with just one package name.  

Sometimes it doesn't matter which package is which, as with this 'grep'
survey:

    # survey two packages INIT Default-Stop settings
    % dlocate -L setserial ipmasq |  grep init.d/ | xargs grep 'Default-Stop'
    /etc/init.d/setserial:# Default-Stop:0 6
    /etc/init.d/etc-setserial:# Default-Stop:         0 6
    /etc/init.d/ipmasq:# Default-Stop: 0 1 6
    /etc/init.d/ipmasq-kmod:# Default-Stop:

The '-L [packages...]' syntax saved writing a loop.

Faking it:  'parallel', found in the 'moreutils' package, makes it
easier to fake multiple arguments:

    # single (serial) task with '-j 1'
    % parallel -j 1 dlocate -L -- setserial ipmasq dbus |  grep init.d/ 
    /etc/init.d/setserial
    /etc/init.d/etc-setserial
    /etc/init.d/ipmasq
    /etc/init.d/ipmasq-kmod
    /etc/init.d/dbus

So the many packages per line functionality can be had either way.
Built-in would not be all bad tho'.

HTH...




-- System Information:
Debian Release: wheezy/sid
  APT prefers unstable
  APT policy: (500, 'unstable'), (1, 'experimental')
Architecture: i386 (i686)

Kernel: Linux 2.6.38-2-686 (SMP w/2 CPU cores)
Locale: LANG=C, LC_CTYPE=C (charmap=ANSI_X3.4-1968) (ignored: LC_ALL set to C)
Shell: /bin/sh linked to /bin/dash

Versions of packages dlocate depends on:
ii  dctrl-tools [grep-dctrl]      2.18       Command-line tools to process Debi
ii  dpkg                          1.16.0.3   Debian package management system
ii  perl                          5.10.1-20  Larry Wall's Practical Extraction 

dlocate recommends no packages.

dlocate suggests no packages.

-- no debconf information



-- 
To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org

Reply via email to