The bug is present in Ubuntu 16.04; apt version 1.2.10 (amd64)

$ apt-cache search --names-only ab|grep -cv ab
100

Furthermore, the command does not restrict to the package names even if the 
option suggests it does.
The following script should print 0:

$ apt-cache search --names-only ab|cut -d' ' -f1|grep -cv ab
107

-- 
You received this bug notification because you are a member of Ubuntu
Touch seeded packages, which is subscribed to apt in Ubuntu.
https://bugs.launchpad.net/bugs/253761

Title:
  apt-cache search --names-only  gives many false positives

Status in apt package in Ubuntu:
  Confirmed

Bug description:
  Binary package hint: apt

  The manpage for apt-cache says that --names-only  should "Only search
  on the package names, not the long descriptions."

  And yet it frequently lists packages that do not have the search terms
  in the name or short description.

  Example: (bash script)

  for x in ab bc de ef
  do
      echo
      echo "False positives for apt-cache search --names-only '$x':"
      apt-cache search --names-only $x | grep -iv $x
  done

  I get 99 false positives, attached is the output of the above script
  on my box.

  I have ubuntu hardy, and I did "apt-get update" and "apt-get upgrade"
  a few days ago. I don't think this bug is new.

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/apt/+bug/253761/+subscriptions

-- 
Mailing list: https://launchpad.net/~touch-packages
Post to     : [email protected]
Unsubscribe : https://launchpad.net/~touch-packages
More help   : https://help.launchpad.net/ListHelp

Reply via email to