apt-repo(8)

apt-repo(8) System Manager's Manual apt-repo(8)

NAME

apt-repoManipulate APT repository list

SYNOPSIS

apt-repo [list] [-a]

apt-repo list [task] id

apt-repo add source

apt-repo rm source|all [type]

apt-repo set branch

apt-repo clean

apt-repo update

apt-repo test [task] id

apt-repo upgrade [id]

apt-repo [-h] [-v]

DESCRIPTION

The apt-repo script allows to show, add, and remove APT repositories specified by a source in sources.list(5) format, an URL with optional component, a branch name, or a task number.

Since apt-repo relies internally on apt-config(8) to find the files which contain the repository lists, it can be asked to manipulate arbitrary non-system APT sources.list by setting APT_CONFIG, which is a standard environment variable looked into by APT to find its configuration. Example:

APT_CONFIG=~/.hasher/apt-extra.conf apt-repo add p7

will manipulate the repository lists in the files defined (if any) in ~/.hasher/apt-extra.conf. This can be useful, for example, to manipulate a user's local hasher(7) configuration. (Such configurations are described in more detail at https://www.altlinux.org/Hasher/Tips.)

If --dry-run is defined in command line changes only shown, is not performed.

OPTIONS

list
Show active repositories in sources.list(5) format. If -a is specified, all available repositories are displayed (inactive ones are commented by ‘#’).
list [task] id
Show names of all available packages (except *-devel*, *-checkinstall and *-debuginfo) in a task repository specified by id.
add source
Add source to the list of active repositories.
rm source [<type>]
Remove or comment source if it is active. Special keyword all removes all active sources. The all keyword followed by optional <type> removes all sources of specified type: ‘branch’ or ‘branches’ removes all branch sources, ‘task’ or ‘tasks’ removes all tasks sources, ‘cdrom’ or ‘cdroms’ removes all cdrom sources.
set branch
Removes all exising sources and adds branch branch
clean
Removes all cdrom and task sources.
update
Run
apt-get update
to update the APT cache from the active repositories.
test [task] id
Install all available packages (except *-devel*, *-checkinstall and *-debuginfo) from the task repository specified by id.
test [task] id pkg1 pkg2
Install the given packages from the task repository specified by id.
test [task] '' pkg1 pkg2
Install the given packages (without modifying APT repos).
upgrade [id [id]]
Upgrade all packages (including specified task(s) by id ).
-h --help
Print usage information and quit.
-v --version
Print version and quit.

SOURCE FORMAT

APT Source

Source can be specified in sources.list(5) format:

apt-repo add "rpm http://git.altlinux.org/repo/39115/ i586 task"

Recognized repository types: rpm, rpm-dir and rpm-src. It is allowed to specify source as separate words. If trailing architecture and component are missing, two lines will be added (current system architecture and ‘noarch’) with component ‘classic’.

URL

APT supports file://, copy://, http://, ftp://, rsync:// and cdrom:// protocols. URL with required protocol may be followed by an optional architecture and one or more components. If architecture and component are missing, two lines will be added (current system architecture and ‘noarch’) with component ‘classic’. This form is useful to add a branch on a mirror server.

Example:

apt-repo add ftp://mirror.yandex.ru/altlinux/p7/branch

Absolute Path

Local directory beginning with ‘/’ added as a hasher(7) repository: with current system architecture and ‘hasher’ component.

apt-repo add /opt/repo

Branch

Branch is a named repository consisting of two parts (current system architecture and 'noarch'). By default, the official server is used. Full form:

apt-repo add branch <name of branch> [<archive_date>]

Keyword ‘branch’ may be omitted. Example:

apt-repo add p7

Running

apt-repo add branch

without the name of a branch displays all available branch names. ‘archive_date’ allows to add archive of branch. Date of archive should be in form YYYYMMDD or YYYY/MM/DD.

Task

Task is a small repository for one or more subtasks built in http://git.altlinux.org infrastructure. This source is used to install software for test purposes. Any task has a unique number. Full form:

apt-repo add task <number of task>

Keyword ‘task’ may be omitted. Example:

apt-repo add 39115

FILES

/etc/apt/sources.list
The main list of repositories which APT reads. New repositiories are added here (and, in this case, if it doesn't exist, then it is created).
/etc/apt/sources.list.d/*.list
The additional lists which APT reads.
/etc/apt/apt.conf
 
/etc/apt/apt.conf.d/*.conf
The system APT configuration which may override the above default paths for sources.list(.d).

ENVIRONMENT VARIABLES

APT_CONFIG
This value overrides the default place where APT looks for apt.conf. Setting it allows one to manipulate arbitrary user's non-system sources.list by preparing a custom apt.conf (e.g., for hasher).

SEE ALSO

sources.list(5), apt-cache(8), apt-get(8)

AUTHORS

Andrey Cherepanov cas@altlinux.org

January 2, 2022 Linux