#600010 document that apt-cache search operates only on candidates

Package:
apt
Source:
apt
Description:
commandline package manager
Submitter:
Willi Mann
Date:
2010-10-12 20:15:09 UTC
Severity:
wishlist
#600010#5
Date:
2010-10-12 19:07:15 UTC
From:
To:
I discovered this when searching for the new rc6 kernel in experimental. A search
for the package name (or parts of it) returns no result despite the package being
available as shown by a-c policy:

# apt-cache search linux-image 2.6.36
# apt-cache search linux-image-2.6.36-rc6-amd64
# apt-cache policy linux-image-2.6.36-rc6-amd64
linux-image-2.6.36-rc6-amd64:
  Installiert: (keine)
  Kandidat:    (keine)
  Versionstabelle:
     2.6.36~rc6-1~experimental.1 0
        -10 http://127.0.0.1/ftp.at.debian.org/debian/ experimental/main amd64 Packages

# apt-cache show linux-image-2.6.36-rc6-amd64
Package: linux-image-2.6.36-rc6-amd64
Priority: optional
Section: kernel
Installed-Size: 100580
Maintainer: Debian Kernel Team <debian-kernel@lists.debian.org>
Architecture: amd64
Source: linux-2.6
Version: 2.6.36~rc6-1~experimental.1
Provides: linux-image, linux-image-2.6, linux-modules-2.6.36-rc6-amd64
Depends: module-init-tools, linux-base (>= 2.6.36~rc6-1~experimental.1), initramfs-tools (>= 0.55) | linux-initramfs-tool
Pre-Depends: debconf | debconf-2.0
Recommends: firmware-linux-free (>= 2.6.36~rc6)
Suggests: linux-doc-2.6.36, grub | lilo
Conflicts: initramfs-tools (<< 0.55)
Filename: pool/main/l/linux-2.6/linux-image-2.6.36-rc6-amd64_2.6.36~rc6-1~experimental.1_amd64.deb
Size: 28935378
MD5sum: e1dce6687b44c55fb5ba1bc544579675
SHA1: 904a41f42bc3ac94b97eb3d4c816d5725e2af3a6
SHA256: babcb0b25be5154760e1d2b3985536fe5e292c66597187790eaf787c509caabc
Description: Linux 2.6.36-rc6 for 64-bit PCs
 The Linux kernel 2.6.36-rc6 and modules for use on PCs with AMD64 or Intel
 64 processors.
 .
 This kernel also runs on a Xen hypervisor.  It supports only unprivileged
 (domU) operation.


I guess the problem is that the Package name is not searched. If that's the case, please
include it in the searched fields.

#600010#10
Date:
2010-10-12 19:29:32 UTC
From:
To:
Removing the preferences file solves the problem. Does that mean that
packages with negative Pin-Priorities get ignored by apt-cache search?
If yes, is this docuemented somewhere?

WM

#600010#15
Date:
2010-10-12 20:10:34 UTC
From:
To:
retitle 600010 document that apt-cache search operates only on candidates
severity 600010 wishlist
thanks


You have pinned all versions of this package below zero so,
as policy tells you, this package has no candidate:

What can't be installed isn't really useful as a search result,
so APT doesn't include the package in the result list - expected behavior.
(a quick look suggests that it is nowhere documented that apt-cache search
 only does searching in candidate versions)

You might want to pin to 1 instead of -10 (which is the default
for experimental), so APT can choose this experimental version
as candidate for this package (as no other "better" archive provides
a version of this package) and can therefore include it in search results…


Best regards

David Kalnischkies