ter*_*don 8 debian apt package-management
根据手册,它
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 is.
[...]
--names-only, -n
Only search on the package names, not the long descriptions.
Configuration Item: APT::Cache::NamesOnly.
Run Code Online (Sandbox Code Playgroud)
然而,我遇到了一个奇怪的情况:
$ apt-cache search --names-only 'kde*' | grep tkcv
tkcvs - Graphical front-end to CVS and Subversion
Run Code Online (Sandbox Code Playgroud)
为什么上面的命令会匹配tk8.6-doc
?Braiam和我花了几分钟聊这个,他注意到
$ apt-cache show tkcvs | grep -i kd
Replaces: tkdiff
Provides: tkdiff
Run Code Online (Sandbox Code Playgroud)
因此,Braiam 建议它也匹配该Replaces
字段,这在更改包名称的情况下具有一定的意义。好的,但是呢:
$ apt-cache search --names-only 'kde*' | grep tk8.6
tk8.6-doc - Tk toolkit for Tcl and X11, v8.6 - manual pages
$ apt-cache show tk8.6-doc | grep -i kd
Provides: tkdoc
Conflicts: tkdoc
Run Code Online (Sandbox Code Playgroud)
这要么匹配Conflicts
或Provides
领域,我不能扭转的意义--names-only
,使其符合这些领域。那么,究竟--names-only
搜索通过什么?它是包描述中提到的所有包的名称吗?它显然与单独的包名称不匹配。
归档时间: |
|
查看次数: |
3955 次 |
最近记录: |