Your message dated Wed, 9 Jul 2014 14:08:32 +0200
with message-id <[email protected]>
and subject line Re: util-linux: 'whereis' package diversion output inconsistent
has caused the Debian Bug report #671134,
regarding util-linux: 'whereis' package diversion output inconsistent
to be marked as done.

This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
Bug report if necessary, and/or fix the problem forthwith.

(NB: If you are a system administrator and have no idea what this
message is talking about, this may indicate a serious mail system
misconfiguration somewhere. Please contact [email protected]
immediately.)


-- 
671134: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=671134
Debian Bug Tracking System
Contact [email protected] with problems
--- Begin Message ---
Package: util-linux
Version: 2.20.1-4
Severity: normal

Dear Maintainer,

The 'moreutils' package has a 'parallel' command, and so does the
'parallel' package.  If the 'parallel' package is installed over a
pre-existing installation of 'moreutils', two diversions are created
(one for the 'parallel' util, and another for its man page):

    % dlocate parallel | grep diversion
    diversion by parallel from: /usr/share/man/man1/parallel.1.gz
    diversion by parallel to: /usr/share/man/man1/parallel.moreutils.1.gz
    diversion by parallel from: /usr/bin/parallel
    diversion by parallel to: /usr/bin/parallel.moreutils

The resultant 'whereis' output is inconsistent:

    % whereis parallel
    parallel: /usr/bin/parallel.moreutils /usr/bin/parallel /etc/parallel 
/usr/bin/X11/parallel.moreutils /usr/bin/X11/parallel 
/usr/share/man/man1/parallel.1.gz

    % whereis parallel.moreutils
    parallel: /usr/bin/parallel.moreutils /usr/bin/parallel /etc/parallel 
/usr/bin/X11/parallel.moreutils /usr/bin/X11/parallel 
/usr/share/man/man1/parallel.1.gz

For clarity, let's spread out that 'whereis' output, and use line 
numbers:

    % whereis parallel | tr ' ' '\n' | nl -s " "
     1 parallel:
     2 /usr/bin/parallel.moreutils
     3 /usr/bin/parallel
     4 /etc/parallel
     5 /usr/bin/X11/parallel.moreutils
     6 /usr/bin/X11/parallel
     7 /usr/share/man/man1/parallel.1.gz

Lines #2 & #5 probably don't belong.

    % whereis parallel.moreutils | tr ' ' '\n' | nl -s " "
     1 parallel:
     2 /usr/bin/parallel.moreutils
     3 /usr/bin/parallel
     4 /etc/parallel
     5 /usr/bin/X11/parallel.moreutils
     6 /usr/bin/X11/parallel
     7 /usr/share/man/man1/parallel.1.gz

Lines #1, #3, #6, & #7 probably don't belong. The package name (#1) 
is incorrect.  The man page name (#7) is incorrect. 

HTH...


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

Kernel: Linux 3.2.0-2-686-pae (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 util-linux depends on:
ii  debconf [debconf-2.0]  1.5.42
ii  dpkg                   1.16.3
ii  initscripts            2.88dsf-22.1
ii  install-info           4.13a.dfsg.1-10
ii  libblkid1              2.20.1-4
ii  libc6                  2.13-31
ii  libncurses5            5.9-7
ii  libselinux1            2.1.9-4
ii  libslang2              2.2.4-10
ii  libtinfo5              5.9-7
ii  libuuid1               2.20.1-4
ii  lsb-base               4.1+Debian2
ii  tzdata                 2012b-1
ii  zlib1g                 1:1.2.6.dfsg-2

util-linux recommends no packages.

Versions of packages util-linux suggests:
pn  dosfstools          3.0.12-1
pn  kbd                 1.15.3-9
pn  util-linux-locales  <none>

-- debconf information:
  util-linux/noauto-with-nonzero-passnum:



--- End Message ---
--- Begin Message ---
Package: util-linux

Hello A. Costa.

I'm following up on (old) util-linux bug reports and came across
yours at:
https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=671134

I must say I've spent quite some time staring at the screen here
and you've had me a bit confused...

Your subject line talked about inconsistencies so I've looked
a long time at the result you presented to try to spot where
the difference in them was.... until I finally understood that
it's not that they are inconsistent, it's you who expect them
to be! Right?

On Tue, May 01, 2012 at 11:44:39PM -0400, A. Costa wrote:
[...]
> The resultant 'whereis' output is inconsistent:
> 
>     % whereis parallel
>     parallel: /usr/bin/parallel.moreutils /usr/bin/parallel /etc/parallel 
> /usr/bin/X11/parallel.moreutils /usr/bin/X11/parallel 
> /usr/share/man/man1/parallel.1.gz
> 
>     % whereis parallel.moreutils
>     parallel: /usr/bin/parallel.moreutils /usr/bin/parallel /etc/parallel 
> /usr/bin/X11/parallel.moreutils /usr/bin/X11/parallel 
> /usr/share/man/man1/parallel.1.gz


Please note that you have the exact same search-pattern in both cases!
(The search pattern is the part before the :)

Another example for the exact same search pattern would be:

whereis /foo/bar/parallell.foobar

This would also give the same "parallell" search pattern as both of
your examples.

(Note that you can abuse whereis, to only search for parallell.moreutils
by using "whereis parallell.moreutils.foobar".)

This is all by design and if you would want to change this design
you'd just remove code block under
/* canonicalize pattern -- remove path suffix etc. */
and replace it with:
        strncpy(patbuf, pattern, PATH_MAX);
        patbuf[PATH_MAX - 1] = '\0';
in misc-utils/whereis.c lookup-function.

See:
http://git.kernel.org/cgit/utils/util-linux/util-linux.git/tree/misc-utils/whereis.c#n405

The whereis is designed to give many results, if you are looking
for a tool with more exact search you should check out "which".

If you want the semantics changed, please feel free to argue it on
the upstream mailing list. Changing it only in Debian would be
a very bad idea in my opinion and I also have no problem with the
current behaviour.

I'll close this bug as I don't see anything in particular that I
can point to as a bug. Please feel free to reopen if you see things
differently or if I've misinterpretted your intentions with the
bug report and provide some additional information pointing to
what you feel remains for this bug report to be done.

HTH

Regards,
Andreas Henriksson

--- End Message ---

Reply via email to