LinuxCommandLibrary

eselect-repository

Enable, disable, or manage software repositories

TLDR

List all ebuild repositories registered on

$ eselect repository list
copy

List enabled repositories
$ eselect repository list -i
copy

Enable a repository from the list by its name or index from the list command
$ eselect repository enable [name|index]
copy

Enable an unregistered repository
$ eselect repository add [name] [rsync|git|mercurial|svn|...] [sync_uri]
copy

Disable repositories without removing their contents
$ eselect repository disable [repo1 repo2 ...]
copy

Disable repositories and remove their contents
$ eselect repository remove [repo1 repo2 ...]
copy

Create a local repository and enable it
$ eselect repository create [name] [path/to/repo]
copy

SYNOPSIS

eselect repository <command> [arguments...]
eselect repository [options]

PARAMETERS

add <name> <location>
    Adds a new repository with the specified <name> and <location> (e.g., a Git URL or local path).

remove <name>
    Removes the repository identified by <name> from the configuration.

enable <name>
    Enables the specified repository, making it active for Portage to use.

disable <name>
    Disables the specified repository, preventing Portage from using it without removing its configuration.

list
    Lists all known repositories, indicating their status (enabled/disabled).

show
    Displays detailed information about the currently active repository configuration.

help
    Shows usage information and available commands for eselect-repository.

--version
    Displays the program's version number.

DESCRIPTION

eselect-repository is a crucial command-line tool within the Gentoo Linux ecosystem, designed to streamline the management of Portage package repositories. It provides a user-friendly interface for adding new repositories, enabling or disabling existing ones, and removing those no longer needed. This utility specifically interacts with the repository configuration files, typically located in the /etc/portage/repos.conf/ directory, ensuring that Portage — Gentoo's package manager — can correctly locate and utilize software sources.

By simplifying repository maintenance, eselect-repository empowers users to easily integrate official Gentoo repositories, community-maintained overlays, or custom third-party repositories, thereby expanding the range of available software packages and maintaining a flexible and up-to-date system. It's an essential part of managing a custom Gentoo installation, especially for users who rely on software not found in the main Gentoo tree.

CAVEATS

Requires root privileges to modify repository configurations.
Modifies critical system files under /etc/portage/repos.conf/; incorrect usage can disrupt Portage functionality.
Users should understand Gentoo's Portage overlay system and repos.conf structure for effective and safe use.
After configuration changes, remember to run emerge --sync or emaint sync to update local package metadata.

CONFIGURATION FILES

eselect-repository primarily manages files within the /etc/portage/repos.conf/ directory. Each repository typically corresponds to a .conf file in this directory. These files define repository properties such as location, sync type, and priority.

OVERLAY SYNCHRONIZATION

After adding or enabling a new repository, it is crucial to synchronize your Portage tree by running emerge --sync or emaint sync -r <repository_name> to fetch the latest package metadata from the newly configured source. Failure to do so means Portage will not be aware of the new packages.

COMMUNITY OVERLAYS

Many community-maintained overlays are available through repositories like the Gentoo official GURU (Gentoo User Repository) or third-party Git repositories, which can be easily added and managed using eselect-repository, greatly expanding software availability.

HISTORY

eselect-repository emerged as a module within the broader eselect framework, which provides a standardized way to manage various system aspects in Gentoo Linux. Its development is closely tied to the evolution of Portage's repository management capabilities, particularly the transition from defining overlays directly in /etc/portage/make.conf to the more modular and flexible /etc/portage/repos.conf/ directory structure. This change aimed to streamline the integration of official, community-maintained (overlays), and custom repositories, improving configuration clarity and reducing potential errors. It standardizes repository management, making it easier for users to expand their available software sources.

SEE ALSO

eselect(1), emerge(1), portage(5), emaint(1)

Copied to clipboard