[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#691453: marked as done (apt: 'apt cache search': multiple patterns return fewer matches than if done seperately.)



Your message dated Thu, 25 Oct 2012 22:38:45 +0200
with message-id <CAAZ6_fCdsT4zrSB1x843rZvk-x1=PsP5bJ7b5TOiiJfzvbot8g@mail.gmail.com>
and subject line Re: Bug#691453: apt: 'apt cache search': multiple patterns return fewer matches than if done seperately.
has caused the Debian Bug report #691453,
regarding apt: 'apt cache search': multiple patterns return fewer matches than if done seperately.
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 owner@bugs.debian.org
immediately.)


-- 
691453: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=691453
Debian Bug Tracking System
Contact owner@bugs.debian.org with problems
--- Begin Message ---
Package: apt
Version: 0.9.7.6
Severity: normal

Dear Maintainer,

In lines #146 & #147 below, the docs explain that 'search' supports 'AND':

% man  apt-cache | grep -B 1 -A 10 -n "search performs"
136-       search regex...
137:           search performs a full text search on all available package lists
138-           for the POSIX regex pattern given, see regex(7). It searches the
139-           package names and the descriptions for an occurrence of the regular
140-           expression and prints out the package name and the short
141-           description, including virtual package names. If --full is given
142-           then output identical to show is produced for each matched package,
143-           and if --names-only is given then the long description is not
144-           searched, only the package name is.
145-
146-           Separate arguments can be used to specify multiple search patterns
147-           that are and'ed together.

However, that built-in 'AND' misses items found with combined 
separate searches:

    # built-in 'AND':
    % apt-cache search foo bar | sort > /tmp/x1

    # simulate 'AND' with "sort | uniq -d":
    % { apt-cache search foo ; apt-cache search bar ; } | sort | uniq -d > /tmp/x2

    # show what the built-in 'AND' missed:
    % diff /tmp/x[12]
    9a10,11
    > libart-2.0-2 - Library of functions for 2D graphics - runtime files
    > libart-2.0-dev - Library of functions for 2D graphics - development files

HTH...

-- Package-specific info:

-- (no /etc/apt/preferences present) --


-- (/etc/apt/sources.list present, but not submitted) --


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

Kernel: Linux 3.2.0-4-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 apt depends on:
ii  debian-archive-keyring  2012.4
ii  gnupg                   1.4.12-6
ii  libapt-pkg4.12          0.9.7.6
ii  libc6                   2.13-35
ii  libgcc1                 1:4.7.1-4
ii  libstdc++6              4.7.1-4

apt recommends no packages.

Versions of packages apt suggests:
pn  apt-doc     <none>
ii  dpkg-dev    1.16.8
ii  python-apt  0.8.6
ii  synaptic    0.75.13
ii  xz-utils    5.1.1alpha+20120614-1

-- debconf-show failed

--- End Message ---
--- Begin Message ---
On Thu, Oct 25, 2012 at 10:15 PM, A. Costa <agcosta@gis.net> wrote:
> However, that built-in 'AND' misses items found with combined
> separate searches:

True. And that is intentional as combining two separate searches
is a logical OR and not an AND as the combined list includes packages
which match "foo" but not "bar".
E.g. libart-2.0-2 is not included as it matches "foo(tprint)", but not "bar".
If you want OR you can use the usual regex syntax for that.

Closing therefore as not-a-bug.


Best regards

David Kalnischkies

--- End Message ---

Reply to: