KEYWORDS
From Gentoo Wiki
Outdated translations are marked like this.
另请参阅
This article is for anyone working on ebuilds. Most users may want to refer to other articles, such as accepting a keyword for a single package.
This article is for anyone working on ebuilds. Most users may want to refer to other articles, such as accepting a keyword for a single package.
In an ebuild the KEYWORDS variable informs in which architectures the ebuild is stable or still in testing phase.
示例
下面的示例包含了一些 KEYWORDS 变量可能的值:
KEYWORDS="alpha amd64 arm arm64 hppa ia64 m68k ~mips ppc ppc64 s390 sh sparc x86 ~sparc-fbsd ~x86-fbsd"
在 /var/db/repos/gentoo/profiles/arch.list 查看 keyword 列表。
上面的示例中,在各种架构前面的 ~
前缀(波浪线字符串)意思是 该架构正处于 "测试阶段",还没有准备好用于生产。
特殊的 keywords
除了正常的 KEYWORDS 值之外,Portage 还支持三种特殊的 token。
*
— 如果该软件包在所有系统架构都是稳定的,那么它可见。~*
— 如果该软件包在所有系统架构都是测试的,那么它可见。**
— 这个包总是可见。(完全忽略 KEYWORDS)。
附注
The behavior of ~arch and ~* differ: ~arch includes arch, ~* doesn't include *. To use the most recent version of a package which is marked stable or unstable on any architecture, specify "* ~*".
The behavior of ~arch and ~* differ: ~arch includes arch, ~* doesn't include *. To use the most recent version of a package which is marked stable or unstable on any architecture, specify "* ~*".
Using more then one keyword
To use a recent version which is marked stable or unstable on any arch use:
app-text/fdftk * ~*
To use a recent version which is marked unstable on your architecture or stable on any arch use:
app-text/fdftk ~''arch'' *
Using a package that is released for another architecture only
当指定了 -*
KEYWORD,这表示该软件包在所有没有在 KEYWORDS 中列出的系统上都有已知的故障。例如,一个只针对 x86 构建的二进制软件包看起来是这样的:
user $
equery meta fdftk
* app-text/fdftk [gentoo] Maintainer: robbat2@gentoo.org Maintainer: tex@gentoo.org (Gentoo TeX Project) Upstream: None specified Homepage: http://www.adobe.com/devnet/acrobat/fdftoolkit.html Location: /var/portage/repos/gentoo/app-text/fdftk Keywords: 6.0-r1:0: x86 -* License: Adobe
如果说无论如果都要同意这个软件包,那么像这样使用 package.accept_keywords 中其他的 keyword。
app-text/fdftk amd64
更多详细信息请查看 portage(5) man 手册页。
参考
- ACCEPT_KEYWORDS — ACCEPT_KEYWORDS 变量告诉包管理器哪个 ebuild 的 KEYWORDS 被允许接受。
- Knowledge Base:Accepting a keyword for a single package
- Knowledge Base:Accepting a keyword for all packages
- Stable request — the procedure for moving an ebuild from testing to stable.
- Package testing — provides information for ebuild developers on testing ebuilds.
- /etc/portage/package.accept_keywords — files or directories of files containing definitions for per-package ACCEPT_KEYWORDS statements.
- equery ke(y)words — display keywords for specified PKG.