equery 的文档字符串来自哪里?

equery 的文档字符串来自哪里?

我需要在 Gentoo 上打包一些东西,我想记录使用标志,在输出中提供更多相关信息equery uses。以下是软件包的示例gnupg

# equery uses app-crypt/gnupg
[ Legend : U - final flag setting for installation]
[        : I - package is installed with flag     ]
[ Colors : set, unset                             ]
 * Found these USE flags for app-crypt/gnupg-1.4.15:
 U I
 + + bzip2      : Use the bzlib compression library
 - - curl       : Add support for client-side URL transfer library
 - - ldap       : Add LDAP support (Lightweight Directory Access Protocol)
 - - linguas_ru : Russian locale
 - - mta        : Build mta support using virtual/mta. 
 + + nls        : Add Native Language Support (using gettext - GNU locale utilities)
 + + readline   : Enable support for libreadline, a GNU line-editing library that almost everyone wants
 - - smartcard  : (Restricted to <app-crypt/gnupg-2.0.17-r1)
                  Bring in dev-libs/libusb as a dependency; enable scdaemon. 
 - - static     : !!do not set this during bootstrap!! Causes binaries to be statically linked instead of dynamically
 - - usb        : (Restricted to >=app-crypt/gnupg-2.0.17-r1)
                  Build direct CCID access for scdaemon; requires dev-libs/libusb. 
 + + zlib       : Add support for zlib (de)compression

这些句子似乎都没有出现在构建,那么它究竟从何而来?

答案1

来自#gentoo@freenode聊天室:

grknight> 它们来自个人资料使用描述和metadata.xml如果是 iamben> 软件包的本地软件包,
除了metadata.xmlebuild 目录中的 per-pkg 外,还可以从中拉取${PORTDIR}/profiles/use.desc它们use.local.desc

来自metadata.xml的文档:

<use> 此标签包含 USE 标志的描述。此标签是可选的,如果指定,则有一个必需的子标签:<flag>。

它还提供例子

<?xml version="1.0" encoding="UTF-8">
<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
<pkgmetadata>
<herd>gentopia</herd>
<maintainer>
    <email>[email protected]</email>
</maintainer>
<maintainer>
    <email>[email protected]</email>
</maintainer>
<use>
    <flag name='acpi'>Enables HAL to attempt to read from
    /proc/acpi/event, if unavailable, HAL will read events from
    <pkg>sys-power/acpid</pkg>. If you need multiple acpi
    readers, ensure acpid is in your default runlevel along with HAL. This
    will also enable HAL to read Toshia and IBM acpi events which do not
    get sent via /proc/acpi/event</flag>
        [...]
</use>
</pkgmetadata>

相关内容