Eselect/Repository

From Gentoo Wiki
Jump to:navigation Jump to:search
This page is a translated version of the page Eselect/Repository and the translation is 25% complete.
Outdated translations are marked like this.
Other languages:

eselect-repository 是 一个 eselect 模块,用来针对第三方仓库来操控 /etc/portage/repos.conf (又称为 overlay)。

另请参阅
For further options see man repository.eselect.
附注
This utility supersedes layman for listing, configuring, and handling synchronization of alternate repositories. There are still some exceptions for which layman can supplement eselect-repository, when using version control systems that Portage does not natively sync (e.g. darcs and g-sorcery).

eselect-repository is written and maintained by Gentoo's Michał Górny (mgorny) .

Emerge

root #emerge --ask app-eselect/eselect-repository

配置

初始设置

REPOS_CONF 目录在下面的文件中配置。它必须在模块正常运行之前就存在。

root #mkdir -p /etc/portage/repos.conf

文件

Paths and options can be changed in /etc/eselect/repository.conf. This file has comments and is self-explanatory.

使用

提示
Repositories can be synced after being configured, using Portage's emaint:
root #emaint sync -r foo

repos.gentoo.org

Gentoo allows users and developers to register repositories on repos.gentoo.org, for public consumption. eselect repository will fetch and read the known list.

列出已经注册的仓库

eselect repository can print all repositories listed on repos.gentoo.org:

root #eselect repository list
Available repositories:
  [1]   foo
  [2]   bar
  [3]   baz
  [4]   cross #
  [5]   good *
  [6]   my_overlay @
  • 已安装,已启动的仓库后缀为 * 字符。
  • 后缀为 # 的仓库,需要更新它们的同步信息(从禁用或启用的仓库)或者由用户定制。
  • 后缀为 @ 的仓库,未在官方公布的名单。
  • 添加 -i 选项参数只列出已安装的仓库。


Use the -i option to show currently configured repositories only:

user $eselect repository list -i

添加已经注册的仓库

语法: enable (<name>|<index>)...

root #eselect repository enable foo bar baz

添加未注册的仓库

语法: add <name> <sync-type> <sync-uri>

root #eselect repository add test git https://github.com/test/test.git
附注
When an ebuild repository is added for the first time, it must be synchronized before use.
警告
While the Gentoo ebuild repository is either written or reviewed by Gentoo developers, and the GURU repository has some developer oversight, that is not always the case for other ebuild repositories. It is possible that some ebuilds repositories might contain vulnerable, badly broken or, theoretically, even malicious software.

禁用仓库但是不移除内容

语法: disable [-f] (<name>|<index>)...

root #eselect repository disable foo bar

未注册仓库需要使用 -f 选项,并且不同步它们的属性。

禁用仓库并且移除内容

Syntax: remove [-f] (<name>|<index>)...

root #eselect repository remove bar baz

未注册仓库需要使用 -f 选项,并且不同步它们的属性。

Create a new ebuild repository

The create subcommand will create an ebuild repository skeleton, and configure it with Portage:

Syntax: create <name> [<path>]

root #eselect repository create <ebuild_repository_name>
Adding <ebuild_repository_name> to /etc/portage/repos.conf ...
Repository <ebuild_repository_name> created and added

另请参阅

  • Eselect — a tool for administration and configuration on Gentoo systems.