Skip to content
Snippets Groups Projects
README.md 2.52 KiB
Newer Older
Hugo Posnic's avatar
Hugo Posnic committed
# pacman-mirrors

[![Build Status](https://travis-ci.org/manjaro/pacman-mirrors.svg?branch=master)](https://travis-ci.org/manjaro/pacman-mirrors)

Package that provides all mirrors for Manjaro Linux.

- Free software: GPL license

## Features

- Generate a new mirror list by using several options:
    - method: rank or random.
    - branch: stable, testing or unstable.
    - country: a single, a list or all.
Frede H's avatar
Frede H committed
    - fasttrack: updated and responsive mirrors
    - geoip: mirrors for country if available
- A GUI for selecting the mirrors to used to generate a custom list.

Frede H's avatar
Frede H committed
### How does fasttrack work
First of all, a working internet connection is mandatory. pacman-mirrors always checks if network is online. It is doing so by pinging google with 3 packets.
Frede H's avatar
Frede H committed

The following arguments `-c -i -m --geoip` will not work in conjunction with `-f`.
Frede H's avatar
Frede H committed
#### Question:
Frede H's avatar
Frede H committed
So, `pacman-mirrors -f 2` takes the same time to create `/etc/pacman.d/mirrorlist` as `pacman-mirrors -f 20`?
Frede H's avatar
Frede H committed
##### Answer:
Frede H's avatar
Frede H committed
No. `pacman-mirors -f 2` will be faster than `pacman-mirrors -f 20` since only 2 mirrors are probed vs 20 mirrors but since most mirrors respond within the first second it is barely noticeable.
Frede H's avatar
Frede H committed
#### Question:
Frede H's avatar
Frede H committed
`pacman-mirrors -f n` always ranks ALL mirrors by response time (the same as `pacman-mirrors -g` does) and additionally takes up-to-date mirrors and writes only **n** mirrors to `/etc/pacman.d/mirrorlist`?
##### Answer:
No. `pacman-mirrors -f n` ranks on a sorted list with known up-to-date mirrors. Thus it is only the first **n** mirrors from this list which are actually probed. If you have a list of 30 mirrors which are up-to-date and use `-f 5` only the top 5 mirrors are probed and then sorted after response time.
The switch does not guarantee you get **the n** fastest mirrors only that they are responsive and up-to-date. Mirrors which have network errors or times out are not considered at all.
Frede H's avatar
Frede H committed
#### Beware
Frede H's avatar
Frede H committed
The smaller number you choose to write to the mirrorlist will increase the possibility of not getting a responsive mirror since only the first **n** in the list are tested not all of them.
Frede H's avatar
Frede H committed

A reasonable number is between 5 and 10.

The force of this approach is that we know forehand if the mirror is up-to-date and thus only have to rank **n** mirrors from the mirrors known to be up-to-date.
Frede H's avatar
Frede H committed

If you need a complete ranking then `pacman-mirrors -g` is the way to go.

## Technologies

pacman-mirrors uses open-source projects to work properly:

* [Python 3](https://www.python.org)
* [GTK+ 3](https://www.gtk.org)
* [npyscreen](https://github.com/npcole/npyscreen)