Package: dctrl-tools
Version: 2.24-3+b1
Severity: normal
X-Debbugs-Cc: rpcodelear...@use.startmail.com

Dear Maintainer,
It seems like grep-available, grep-aptavail (and possibly the other tools) 
search only the first line of the Description field.
The manual claims the search is as per 'apt-cache', which would be more 
powerful and it sounds to me as the desired behavior.

Quoting manpage grep-dctrl(1):
    % grep-available -F Package -F Description foo
    This kind of search is the exactly same that apt-cache does.
Actual behaviour:
    $ grep-available -F Package -F Description foo | wc     # manpage-verbatim, 
except for 'wc'
        0   0   0
but apt-cache finds results even for "foo"
    $  apt-cache search foo | wc
        440    3702   27827
    $ apt-cache search --names-only foo | wc  # just a double-check I tried
        25     210    1657

As another example, the string 'grep-aptavail' occurs deep in the Description 
of dctrl-tools, so we get:
    $ apt-cache search grep-available
       dctrl-tools - Command-line tools to process Debian package information
    $ grep-aptavail -F Package -F Description grep-aptavail
       -> (it finds nothing)
    $ grep-available -F Package -F Description grep-available
       -> (it finds nothing)

It seems to me that searching only the 1st line reduces the power of the 
tool(s), but if the above behavior is correct, I would suggest updating the 
manpage.

Thank you for your attention.
R.P.

-- System Information:
Debian Release: 12.6
  APT prefers stable-updates
  APT policy: (500, 'stable-updates'), (500, 'stable-security'), (500, 'stable')
Architecture: amd64 (x86_64)

Kernel: Linux 6.1.0-23-amd64 (SMP w/8 CPU threads; PREEMPT)
Locale: LANG=C.UTF-8, LC_CTYPE=C.UTF-8 (charmap=UTF-8), LANGUAGE not set
Shell: /bin/sh linked to /usr/bin/dash
Init: systemd (via /run/systemd/system)
LSM: AppArmor: enabled

Versions of packages dctrl-tools depends on:
ii  libc6  2.36-9+deb12u7

dctrl-tools recommends no packages.

Versions of packages dctrl-tools suggests:
ii  apt      2.6.1
ii  debtags  2.1.5

-- no debconf information

Reply via email to