root@ubuntu:~# apt-cache search -n ^linux- |grep -v ^linux-
busybox-syslogd - Provides syslogd and klogd using busybox
initramfs-tools - generic modular initramfs generator (automation)
rsyslog - reliable system and kernel logging daemon
dracut - dracut is an event driven initramfs infrastructure
inetutils-syslogd - system logging daemon
socklog-run - system and kernel logging services
syslog-ng-core - Enhanced system logging daemon (core)
tiny-initramfs - Minimalistic initramfs implementation (automation)
Ответ, похоже, заключается в том, что даже с добавлением --names-only
, команда apt-cache search
ищет предоставленные пакеты. Из man apt-cache
:
search regex...
search performs a full text search on all available package lists
for the POSIX regex pattern given, see regex(7). It searches the
package names and the descriptions for an occurrence of the regular
expression and prints out the package name and the short
description, including virtual package names. If --full is given
then output identical to show is produced for each matched package,
and if --names-only is given then the long description is not
searched, only the package name and provided packages are.
Мы можем увидеть, что именно находит поиск следующим образом:
$ apt-cache search --names-only '^linux-' | grep -v '^linux-' |
while read -r pkg rem; do apt-cache show "$pkg" | grep -H --label="$pkg" '^Provides:'; done
busybox-syslogd:Provides: linux-kernel-log-daemon, system-log-daemon
busybox-syslogd:Provides: linux-kernel-log-daemon, system-log-daemon
busybox-syslogd:Provides: linux-kernel-log-daemon, system-log-daemon
initramfs-tools:Provides: linux-initramfs-tool
initramfs-tools:Provides: linux-initramfs-tool
initramfs-tools:Provides: linux-initramfs-tool
rsyslog:Provides: linux-kernel-log-daemon, system-log-daemon
rsyslog:Provides: linux-kernel-log-daemon, system-log-daemon
dracut:Provides: linux-initramfs-tool
inetutils-syslogd:Provides: linux-kernel-log-daemon, system-log-daemon
socklog-run:Provides: linux-kernel-log-daemon, system-log-daemon
syslog-ng-core:Provides: libsyslog-ng-dev, linux-kernel-log-daemon, syslog-ng-mod-journal, system-log-daemon
tiny-initramfs:Provides: linux-initramfs-tool