Difference between revisions of "Pacman-mirrors/zh-cn"

Updating to match new version of source page
(Created page with "应用程序究竟如何生成镜像列表,可以通过在命令行上提供参数来添加。")
(Updating to match new version of source page)
Line 8: Line 8:
Manjaro 使用 pacman 实现系统维护,更新数据和安装新的软件。为了让 pacman 有效运作,一栏服务器列表,或是作为更为大多数人所熟知的镜像站,与 Manjaro 软件包是密不可分的。就像是 Manjaro 在世界各地有着许多的镜像站那样,使用离你最近的镜像站是可行的,并且最好也要用最新的(up-to-date)。
Manjaro 使用 pacman 实现系统维护,更新数据和安装新的软件。为了让 pacman 有效运作,一栏服务器列表,或是作为更为大多数人所熟知的镜像站,与 Manjaro 软件包是密不可分的。就像是 Manjaro 在世界各地有着许多的镜像站那样,使用离你最近的镜像站是可行的,并且最好也要用最新的(up-to-date)。


<div class="mw-translate-fuzzy">
=== 使用 ===
=== 使用 ===
为了实现大多数的功能,链接到互联网是很有必要的。从 v4 版本开始,Pacman-Mirrors 将会在网络在线时,通过查询某些通用的网站,从而进行检查。也正是由于这些站点普遍可用,所以才选择了它们。
为了实现大多数的功能,链接到互联网是很有必要的。从 v4 版本开始,Pacman-Mirrors 将会在网络在线时,通过查询某些通用的网站,从而进行检查。也正是由于这些站点普遍可用,所以才选择了它们。
</div>


<div class="mw-translate-fuzzy">
# wikipedia.org
# wikipedia.org
# github.com
# github.com
# bitbucket.org
# bitbucket.org
</div>


如果你遇到证书错误,并且pacman-mirrors抛出了网络连接缺失的信息--你必须核实你的计算机固件日期和时间,因为这可能是由于配置或CMOS电池故障而导致的完全错误。
如果你遇到证书错误,并且pacman-mirrors抛出了网络连接缺失的信息--你必须核实你的计算机固件日期和时间,因为这可能是由于配置或CMOS电池故障而导致的完全错误。
Line 26: Line 30:
{{Tip|每当运行 pacman-mirrors 时,都需要你同步你的数据库,并更新你的系统。}}
{{Tip|每当运行 pacman-mirrors 时,都需要你同步你的数据库,并更新你的系统。}}


  $ sudo pacman -Syyu
  <div class="mw-translate-fuzzy">
$ sudo pacman -Syyu
</div>


如果你不这样做,让你做出改变的问题可能不会得到解决。此外,你可能会遇到[[System_Maintenance|''partial-updated'']]的情况,这可能会对你的系统造成破坏。关于pacman如何工作的更多详细信息,你可以在[https://wiki.archlinux.org/index.php/System_maintenance Archlinux Wiki]上阅读。
如果你不这样做,让你做出改变的问题可能不会得到解决。此外,你可能会遇到[[System_Maintenance|''partial-updated'']]的情况,这可能会对你的系统造成破坏。关于pacman如何工作的更多详细信息,你可以在[https://wiki.archlinux.org/index.php/System_maintenance Archlinux Wiki]上阅读。


<div lang="en" dir="ltr" class="mw-content-ltr">
==TL:DR - Samples please==
==TL:DR - Samples please==
All commands uses the available mirror pool.<br />
All commands uses the available mirror pool.<br />
Line 36: Line 43:
All samples are using the long name version of the argument.
All samples are using the long name version of the argument.
For short versions have a look at the [https://gitlab.manjaro.org/applications/pacman-mirrors/tree/master/docs|man page] or the usage command
For short versions have a look at the [https://gitlab.manjaro.org/applications/pacman-mirrors/tree/master/docs|man page] or the usage command
</div>


===命令:展示信息===
===命令:展示信息===
Line 63: Line 71:
===命令:使用默认镜像===
===命令:使用默认镜像===


<div class="mw-translate-fuzzy">
====更新镜像列表,以获得最快的镜像====
====更新镜像列表,以获得最快的镜像====
  sudo pacman-mirrors --fasttrack && sudo pacman -Syyu
  sudo pacman-mirrors --fasttrack && sudo pacman -Syyu
</div>


<div class="mw-translate-fuzzy">
====限制为 5个 镜像====
====限制为 5个 镜像====
可以提供一个具体的数量,以此限制镜像列表中的镜像数量:
可以提供一个具体的数量,以此限制镜像列表中的镜像数量:
  sudo pacman-mirrors --fasttrack 5 && sudo pacman -Syyu
  sudo pacman-mirrors --fasttrack 5 && sudo pacman -Syyu
</div>


<div class="mw-translate-fuzzy">
====只选择你所在的国家或地区的镜像====
====只选择你所在的国家或地区的镜像====
并不是所有的国家和地区都有镜像,根据地理位置信息(geoip)返回的国家或地区,若不在镜像池中,则将会使用全部镜像。
并不是所有的国家和地区都有镜像,根据地理位置信息(geoip)返回的国家或地区,若不在镜像池中,则将会使用全部镜像。
  sudo pacman-mirrors --geoip && sudo pacman -Syyu
  sudo pacman-mirrors --geoip && sudo pacman -Syyu
</div>


===命令:自定义镜像源===
===命令:自定义镜像源===
Line 79: Line 93:
但是!请勿过度限制你自己,因为 pacman-mirrors '''仅会''' 将最新的(up-to-date)镜像写入到你的镜像列表中。
但是!请勿过度限制你自己,因为 pacman-mirrors '''仅会''' 将最新的(up-to-date)镜像写入到你的镜像列表中。


<div class="mw-translate-fuzzy">
====根据世界地理分区,自定义镜像源====
====根据世界地理分区,自定义镜像源====
根据地址查询结果,使用所在大陆的镜像,创建一个定制的镜像源。
根据地址查询结果,使用所在大陆的镜像,创建一个定制的镜像源。
  sudo pacman-mirrors --continent && sudo pacman -Syyu
  sudo pacman-mirrors --continent && sudo pacman -Syyu
</div>


<div class="mw-translate-fuzzy">
====根据国家和地区,自定义镜像源====
====根据国家和地区,自定义镜像源====
使用德国(Germany)、法国(France)和奥地利(Austria)的镜像,创建一个定制的镜像源。
使用德国(Germany)、法国(France)和奥地利(Austria)的镜像,创建一个定制的镜像源。
  sudo pacman-mirrors --country Germany,France,Austria && sudo pacman -Syyu
  sudo pacman-mirrors --country Germany,France,Austria && sudo pacman -Syyu
</div>


<div class="mw-translate-fuzzy">
====根据互动选取,自定义镜像源====
====根据互动选取,自定义镜像源====
Create a custom mirror pool using the '''--default''' mirror pool '''--interactive''' will list all available mirrors and procotols in a gui windows allowing to sort the columns and interactively select according to your preferences.
Create a custom mirror pool using the '''--default''' mirror pool '''--interactive''' will list all available mirrors and procotols in a gui windows allowing to sort the columns and interactively select according to your preferences.
  sudo pacman-mirrors --interactive --default && sudo pacman -Syyu
  sudo pacman-mirrors --interactive --default && sudo pacman -Syyu
</div>


<div class="mw-translate-fuzzy">
====优先使用特定的传输协议====
====优先使用特定的传输协议====
仅使用 https 和 http 协议对当前的镜像源进行排序。
仅使用 https 和 http 协议对当前的镜像源进行排序。
  sudo pacman-mirrors --api --protocol https,http && sudo pacman -Syyu
  sudo pacman-mirrors --api --protocol https,http && sudo pacman -Syyu
</div>


<div class="mw-translate-fuzzy">
====转换为 unstable 分支,并使用德国的镜像====
====转换为 unstable 分支,并使用德国的镜像====
更改系统分支为不稳定(unstable) ,并使用德国(German)的镜像创建一个自定义镜像源。
更改系统分支为不稳定(unstable) ,并使用德国(German)的镜像创建一个自定义镜像源。
  sudo pacman-mirrors --country Germany --api --set-branch unstable && sudo pacman -Syyu
  sudo pacman-mirrors --country Germany --api --set-branch unstable && sudo pacman -Syyu
</div>


<div class="mw-translate-fuzzy">
==== 转化分支,并使用德国的镜像 and use German mirrors with https====
==== 转化分支,并使用德国的镜像 and use German mirrors with https====
Change the system branch to unstable, set configuration to use https only and create a custom mirror pool using mirrors from Germany
Change the system branch to unstable, set configuration to use https only and create a custom mirror pool using mirrors from Germany
  sudo pacman-mirrors --country Germany --api --set-branch unstable --protocol https && sudo pacman -Syyu
  sudo pacman-mirrors --country Germany --api --set-branch unstable --protocol https && sudo pacman -Syyu
</div>


===重置===
===重置===
若把设置重置为默认值,你将会回到原点。
若把设置重置为默认值,你将会回到原点。


  sudo pacman-mirrors --country all --api --protocols all --set-branch stable && sudo pacman -Syyu
  <div class="mw-translate-fuzzy">
sudo pacman-mirrors --country all --api --protocols all --set-branch stable && sudo pacman -Syyu
</div>


==简介==
==简介==


<div lang="en" dir="ltr" class="mw-content-ltr">
=== Available arguments ===
=== Available arguments ===
</div>


<div lang="en" dir="ltr" class="mw-content-ltr">
<div class="toccolours mw-collapsible mw-collapsed">
<div class="toccolours mw-collapsible mw-collapsed">
All available arguments can be viewed by unfolding this block
All available arguments can be viewed by unfolding this block
Line 124: Line 155:
[--api] [-S/-B BRANCH] [-p PREFIX]
[--api] [-S/-B BRANCH] [-p PREFIX]
[-P PROTO [PROTO...]] [-R] [-U URL]
[-P PROTO [PROTO...]] [-R] [-U URL]
</div>


<div lang="en" dir="ltr" class="mw-content-ltr">
METHODS:
METHODS:
   -i, --interactive    Generate custom mirrorlist
   -i, --interactive    Generate custom mirrorlist
Line 135: Line 168:
   --geoip              Get current country using geolocation
   --geoip              Get current country using geolocation
   --continent          Use continent from geolocation
   --continent          Use continent from geolocation
</div>


<div lang="en" dir="ltr" class="mw-content-ltr">
API:
API:
   -a, --api            [-p PREFIX][-R][-S/-B|-G BRANCH][-P PROTO [PROTO ...]]
   -a, --api            [-p PREFIX][-R][-S/-B|-G BRANCH][-P PROTO [PROTO ...]]
Line 145: Line 180:
   -R, --re-branch      API: Replace branch in mirrorlist
   -R, --re-branch      API: Replace branch in mirrorlist
   -U, --url URL        API: Replace mirror url in mirrorlist
   -U, --url URL        API: Replace mirror url in mirrorlist
</div>


<div lang="en" dir="ltr" class="mw-content-ltr">
MISC:
MISC:
   -G, --get-branch      Return branch from configuration
   -G, --get-branch      Return branch from configuration
Line 168: Line 205:
   --use-async          Experimental async mirror test.
   --use-async          Experimental async mirror test.
</pre>
</pre>
</div>
</div>
</div>
</div>
</div>


<div lang="en" dir="ltr" class="mw-content-ltr">
===Files used by pacman-mirrors===
===Files used by pacman-mirrors===
</div>


<div lang="en" dir="ltr" class="mw-content-ltr">
====File: <code>/etc/pacman-mirrors.conf</code> <small>(sample - can be changed by pacman-mirrors api commands)</small>====
====File: <code>/etc/pacman-mirrors.conf</code> <small>(sample - can be changed by pacman-mirrors api commands)</small>====
</div>


<div lang="en" dir="ltr" class="mw-content-ltr">
<div class="toccolours mw-collapsible mw-collapsed">
<div class="toccolours mw-collapsible mw-collapsed">
To view the content of a default configuration - click the link to the right --->
To view the content of a default configuration - click the link to the right --->
Line 183: Line 226:
     ## /etc/pacman-mirrors.conf
     ## /etc/pacman-mirrors.conf
     ##
     ##
</div>


     ## Branch Pacman should use (stable, testing, unstable)
     <div lang="en" dir="ltr" class="mw-content-ltr">
## Branch Pacman should use (stable, testing, unstable)
     # Branch = stable
     # Branch = stable
</div>


     ## Generation method
     <div lang="en" dir="ltr" class="mw-content-ltr">
## Generation method
     ## 1) rank  - rank mirrors depending on their access time
     ## 1) rank  - rank mirrors depending on their access time
     ## 2) random - randomly generate the output mirrorlist
     ## 2) random - randomly generate the output mirrorlist
     # Method = rank
     # Method = rank
</div>


     ## Define protocols and priority
     <div lang="en" dir="ltr" class="mw-content-ltr">
## Define protocols and priority
     ##  separated by comma 'https,http' or 'http,https'
     ##  separated by comma 'https,http' or 'http,https'
     ## ATM available protocols are: http, https, ftp
     ## ATM available protocols are: http, https, ftp
Line 199: Line 248:
     ## Empty means all in reversed alphabetic order
     ## Empty means all in reversed alphabetic order
     # Protocols =
     # Protocols =
</div>


     ## When set to False - all certificates are accepted.
     <div lang="en" dir="ltr" class="mw-content-ltr">
## When set to False - all certificates are accepted.
     ## Use only if you fully trust all ssl-enabled mirrors.
     ## Use only if you fully trust all ssl-enabled mirrors.
     # SSLVerify = True
     # SSLVerify = True
</pre>
</pre>
</div>
</div>
</div>
</div>
</div>


<div lang="en" dir="ltr" class="mw-content-ltr">
====File: <code>/usr/share/pacman-mirrors/mirrors.json</code> <small>(sample - self updating)</small>====
====File: <code>/usr/share/pacman-mirrors/mirrors.json</code> <small>(sample - self updating)</small>====
</div>


<div lang="en" dir="ltr" class="mw-content-ltr">
<div class="toccolours mw-collapsible mw-collapsed">
<div class="toccolours mw-collapsible mw-collapsed">
To view the content of a default mirror pool - click the link to the right --->
To view the content of a default mirror pool - click the link to the right --->
Line 769: Line 824:
]
]
</pre>
</pre>
</div>
</div>
</div>
</div>
</div>


<div lang="en" dir="ltr" class="mw-content-ltr">
====File: <code>/var/lib/pacman-mirrors/status.json</code> <small>(sample - self updating)</small>====
====File: <code>/var/lib/pacman-mirrors/status.json</code> <small>(sample - self updating)</small>====
<div class="toccolours mw-collapsible mw-collapsed">
<div class="toccolours mw-collapsible mw-collapsed">
Line 1,795: Line 1,852:
]
]
<pre>
<pre>
</div>
</div>
</div>
</div>
</div>


<div lang="en" dir="ltr" class="mw-content-ltr">
====File: <code>/etc/pacman-mirrors.conf</code> <small>(sample of default config)</small>====
====File: <code>/etc/pacman-mirrors.conf</code> <small>(sample of default config)</small>====
</div>


<div lang="en" dir="ltr" class="mw-content-ltr">
<div class="toccolours mw-collapsible mw-collapsed">
<div class="toccolours mw-collapsible mw-collapsed">
To view the content of a default pacman-mirrors.conf - click the link to the right --->
To view the content of a default pacman-mirrors.conf - click the link to the right --->
Line 1,808: Line 1,869:
## /etc/pacman-mirrors.conf
## /etc/pacman-mirrors.conf
##
##
</div>


<div lang="en" dir="ltr" class="mw-content-ltr">
## Branch Pacman should use (stable, testing, unstable)
## Branch Pacman should use (stable, testing, unstable)
# Branch = stable
# Branch = stable
</div>


<div lang="en" dir="ltr" class="mw-content-ltr">
## Generation method
## Generation method
## 1) rank  - rank mirrors depending on their access time
## 1) rank  - rank mirrors depending on their access time
## 2) random - randomly generate the output mirrorlist
## 2) random - randomly generate the output mirrorlist
# Method = rank
# Method = rank
</div>


<div lang="en" dir="ltr" class="mw-content-ltr">
## Define protocols and priority
## Define protocols and priority
##  separated by comma 'https,http' or 'http,https'
##  separated by comma 'https,http' or 'http,https'
Line 1,823: Line 1,890:
## If a mirror has more than one protocol defined only the first is written to the mirrorlist
## If a mirror has more than one protocol defined only the first is written to the mirrorlist
## Empty means all in reversed alphabetic order
## Empty means all in reversed alphabetic order
# Protocols =  
# Protocols =
</div>


<div lang="en" dir="ltr" class="mw-content-ltr">
## Get a list of all available counties with 'pacman-mirrors -l'
## Get a list of all available counties with 'pacman-mirrors -l'
## Value can be 'Custom' or nothing which means all
## Value can be 'Custom' or nothing which means all
# OnlyCountry =  
# OnlyCountry =
</div>


<div lang="en" dir="ltr" class="mw-content-ltr">
## When set to False - all certificates are accepted.
## When set to False - all certificates are accepted.
## Use only if you fully trust all ssl-enabled mirrors.
## Use only if you fully trust all ssl-enabled mirrors.
# SSLVerify = True
# SSLVerify = True
</pre>
</pre>
</div>
</div>
</div>
</div>
</div>


<div lang="en" dir="ltr" class="mw-content-ltr">
====Sample command to customize mirror pool====
====Sample command to customize mirror pool====
</div>


<div lang="en" dir="ltr" class="mw-content-ltr">
<div class="toccolours mw-collapsible mw-collapsed">
<div class="toccolours mw-collapsible mw-collapsed">
To view the content of the sample command - click the link to the right --->
To view the content of the sample command - click the link to the right --->
Line 1,844: Line 1,919:
~ >>> sudo pacman-mirrors --country Denmark && sudo pacman -Syyu                                                                                                         
~ >>> sudo pacman-mirrors --country Denmark && sudo pacman -Syyu                                                                                                         
.: INFO Downloading mirrors from repo.manjaro.org
.: INFO Downloading mirrors from repo.manjaro.org
</div>


<div lang="en" dir="ltr" class="mw-content-ltr">
.: INFO User generated mirror list
.: INFO User generated mirror list
--------------------------
--------------------------
Line 1,865: Line 1,942:
  der er intet at udføre
  der er intet at udføre
</pre>
</pre>
</div>
</div>
</div>
</div>
</div>


<div lang="en" dir="ltr" class="mw-content-ltr">
====File: <code>/etc/pacman.d/mirrorlist</code> <small>(sample)</small>====
====File: <code>/etc/pacman.d/mirrorlist</code> <small>(sample)</small>====
</div>


<div lang="en" dir="ltr" class="mw-content-ltr">
<div class="toccolours mw-collapsible mw-collapsed">
<div class="toccolours mw-collapsible mw-collapsed">
To view the content of the sample mirrorlist - click the link to the right --->
To view the content of the sample mirrorlist - click the link to the right --->
Line 1,883: Line 1,964:
## To remove custom config run  'pacman-mirrors -c all'
## To remove custom config run  'pacman-mirrors -c all'
##
##
</div>


<div lang="en" dir="ltr" class="mw-content-ltr">
## Country : Denmark
## Country : Denmark
Server = https://www.uex.dk/public/manjaro/unstable/$repo/$arch
Server = https://www.uex.dk/public/manjaro/unstable/$repo/$arch
</div>


<div lang="en" dir="ltr" class="mw-content-ltr">
## Country : Denmark
## Country : Denmark
Server = https://mirrors.dotsrc.org/manjaro/unstable/$repo/$arch
Server = https://mirrors.dotsrc.org/manjaro/unstable/$repo/$arch
</pre>
</pre>
</div>
</div>
</div>
</div>
</div>


<div lang="en" dir="ltr" class="mw-content-ltr">
====File: <code>/var/lib/pacman-mirrors/custom-mirrors.json</code> <small>(sample)</small>====
====File: <code>/var/lib/pacman-mirrors/custom-mirrors.json</code> <small>(sample)</small>====
</div>


<div lang="en" dir="ltr" class="mw-content-ltr">
<div class="toccolours mw-collapsible mw-collapsed">
<div class="toccolours mw-collapsible mw-collapsed">
To view the content of a custom mirror pool - click the link to the right --->
To view the content of a custom mirror pool - click the link to the right --->
Line 1,931: Line 2,020:
]
]
</pre>
</pre>
</div>
</div>
</div>
</div>
</div>


<div lang="en" dir="ltr" class="mw-content-ltr">
=== Defaults ===
=== Defaults ===
PacmanMirrors has some reasonable defaults
PacmanMirrors has some reasonable defaults
</div>


  - Ranking mirrors with the fastest mirrors on top
  <div lang="en" dir="ltr" class="mw-content-ltr">
- Ranking mirrors with the fastest mirrors on top
  - Using stable branch
  - Using stable branch
  - Using all mirrors
  - Using all mirrors
</div>


<div lang="en" dir="ltr" class="mw-content-ltr">
The '''-f''' or '''--fasttrack''' argument uses mirrors which are up-to-date for your branch. Optionally you can supply a number e.g. 10
The '''-f''' or '''--fasttrack''' argument uses mirrors which are up-to-date for your branch. Optionally you can supply a number e.g. 10
</div>


<div lang="en" dir="ltr" class="mw-content-ltr">
=== Continent ===
=== Continent ===
The --continent argument is using a geolocation function to create a custom mirror pool from countries within the geolocated continent.
The --continent argument is using a geolocation function to create a custom mirror pool from countries within the geolocated continent.
</div>


<div lang="en" dir="ltr" class="mw-content-ltr">
=== Country ===
=== Country ===
Instead of pacman-mirrors probing all mirrors in all countries it is possible to supply a list of countries from which to use the mirrors. This creates a custom mirror pool. The countries is an example - check the country list if in doubt.
Instead of pacman-mirrors probing all mirrors in all countries it is possible to supply a list of countries from which to use the mirrors. This creates a custom mirror pool. The countries is an example - check the country list if in doubt.
</div>


  $ sudo pacman-mirrors --country Germany,France,Austria && sudo pacman -Syyu
  <div lang="en" dir="ltr" class="mw-content-ltr">
$ sudo pacman-mirrors --country Germany,France,Austria && sudo pacman -Syu
</div>


<div lang="en" dir="ltr" class="mw-content-ltr">
If a supplied country does not offer a mirrorserver the app quits with an error explaining why.
If a supplied country does not offer a mirrorserver the app quits with an error explaining why.
</div>


  $ sudo pacman-mirrors --country Antarctica && sudo pacman -Syyu
  <div lang="en" dir="ltr" class="mw-content-ltr">
$ sudo pacman-mirrors --country Antarctica && sudo pacman -Syu
  .: Info Downloading mirrors from repo.manjaro.org
  .: Info Downloading mirrors from repo.manjaro.org
  .: Warning Option '-c/--country' : unknown country: 'Antarctica'
  .: Warning Option '-c/--country' : unknown country: 'Antarctica'
Line 1,962: Line 2,067:
  Singapore, South_Africa, Sweden, Spain, Taiwan, Turkey, United_Kingdom, United_States,
  Singapore, South_Africa, Sweden, Spain, Taiwan, Turkey, United_Kingdom, United_States,
  Vietnam
  Vietnam
</div>




<div lang="en" dir="ltr" class="mw-content-ltr">
Another option for the mirrors closest to your location is '''--geoip'''
Another option for the mirrors closest to your location is '''--geoip'''
<pre>$ sudo pacman-mirrors --geoip --quiet && sudo pacman -Syyu
<pre>$ sudo pacman-mirrors --geoip --quiet && sudo pacman -Syu
:: Querying servers, this may take some time
:: Querying servers, this may take some time
=> Testing mirrors in France
=> Testing mirrors in France
Line 1,971: Line 2,078:
:: Mirrorlist generated and saved to: /etc/pacman.d/mirrorlist
:: Mirrorlist generated and saved to: /etc/pacman.d/mirrorlist
</pre>
</pre>
</div>


<div lang="en" dir="ltr" class="mw-content-ltr">
===Customizing the mirror pool===
===Customizing the mirror pool===
If you, for various reasons, have a preference for specific mirrors, it is possible to create a personal mirror pool. This is done by supplying ''--interactive [--default]'', ''--continent-- or ''--country'' argument.
If you, for various reasons, have a preference for specific mirrors, it is possible to create a personal mirror pool. This is done by supplying ''--interactive [--default]'', ''--continent-- or ''--country'' argument.
</div>


<div lang="en" dir="ltr" class="mw-content-ltr">
====A word of caution====
====A word of caution====
Don't limit yourself too much. Pacman-mirrors will only use up-to-date mirrors in the final mirrorlist. Also observe this: Your custom mirror pool will not be changed - even if a mirror leaves service or becomes unmaintained. It is your reponsibility to maintain your custom mirror pool in the event the official mirrorpool is changed.
Don't limit yourself too much. Pacman-mirrors will only use up-to-date mirrors in the final mirrorlist. Also observe this: Your custom mirror pool will not be changed - even if a mirror leaves service or becomes unmaintained. It is your reponsibility to maintain your custom mirror pool in the event the official mirrorpool is changed.
</div>


<div lang="en" dir="ltr" class="mw-content-ltr">
===Customizing pool===
===Customizing pool===
The customized pool is saved as <code>/var/lib/pacman-mirrors/custom-mirrors.json</code>
The customized pool is saved as <code>/var/lib/pacman-mirrors/custom-mirrors.json</code>
</div>


<div lang="en" dir="ltr" class="mw-content-ltr">
'''First option''' is using ''--interactive''. It uses your current mirror pool(whether default or custom)
'''First option''' is using ''--interactive''. It uses your current mirror pool(whether default or custom)
  $ sudo pacman-mirrors --interactive && sudo pacman -Syyu
  $ sudo pacman-mirrors --interactive && sudo pacman -Syu
</div>


<div lang="en" dir="ltr" class="mw-content-ltr">
'''Second option''' is using ''--interactive --default''. This force the use of the official mirror pool
'''Second option''' is using ''--interactive --default''. This force the use of the official mirror pool
  $ sudo pacman-mirrors --interactive --default && sudo pacman -Syyu
  $ sudo pacman-mirrors --interactive --default && sudo pacman -Syu
</div>


<div lang="en" dir="ltr" class="mw-content-ltr">
'''Third option''' is supplying a list of countries with ''--country''. The countries is an example - check the country list if in doubt.
'''Third option''' is supplying a list of countries with ''--country''. The countries is an example - check the country list if in doubt.
  $ sudo pacman-mirrors --country Germany,France,Austria && sudo pacman -Syyu
  $ sudo pacman-mirrors --country Germany,France,Austria && sudo pacman -Syu
</div>


<div lang="en" dir="ltr" class="mw-content-ltr">
'''Fourth option''' is ''--continent''. The countries used is determined by the continent they are assigned to and can optionally be combined with '''--interactive'''.
'''Fourth option''' is ''--continent''. The countries used is determined by the continent they are assigned to and can optionally be combined with '''--interactive'''.
  $ sudo pacman-mirrors --continent [--interactive]
  $ sudo pacman-mirrors --continent [--interactive]
</div>


<div lang="en" dir="ltr" class="mw-content-ltr">
Using ''--interactive'' option, pacman-mirrors will process the available mirrors and present you with a list in which you will select your desired mirrors. In any case the pool is saved and used to generate a mirrorlist.
Using ''--interactive'' option, pacman-mirrors will process the available mirrors and present you with a list in which you will select your desired mirrors. In any case the pool is saved and used to generate a mirrorlist.
</div>


<div lang="en" dir="ltr" class="mw-content-ltr">
====Syncronization status====
====Syncronization status====
Pacman-mirrors downloads pool status for the default mirror pool. When you want to regenerate your mirrorlist, your custom pool is updated with the info from the downloaded pool status.
Pacman-mirrors downloads pool status for the default mirror pool. When you want to regenerate your mirrorlist, your custom pool is updated with the info from the downloaded pool status.
</div>


<div lang="en" dir="ltr" class="mw-content-ltr">
This ensures you will '''always''' use up-to-date mirrors.
This ensures you will '''always''' use up-to-date mirrors.
</div>


<div lang="en" dir="ltr" class="mw-content-ltr">
===Resetting and changing the custom mirror pool===
===Resetting and changing the custom mirror pool===
'''First option''' to reset is to default mirror pool
'''First option''' to reset is to default mirror pool
</div>


  $ sudo pacman-mirrors --country all && sudo pacman -Syyu
  <div lang="en" dir="ltr" class="mw-content-ltr">
$ sudo pacman-mirrors --country all && sudo pacman -Syu
</div>


<div lang="en" dir="ltr" class="mw-content-ltr">
'''Second option''' to is to use ''--default'' with ''--interactive'' and creating a new custom mirror pool
'''Second option''' to is to use ''--default'' with ''--interactive'' and creating a new custom mirror pool
</div>


  $ sudo pacman-mirrors --interactive --default && sudo pacman -Syyu
  <div lang="en" dir="ltr" class="mw-content-ltr">
$ sudo pacman-mirrors --interactive --default && sudo pacman -Syu
* You will be presented with a list with all and every mirror and you can pick your selection.
* You will be presented with a list with all and every mirror and you can pick your selection.
</div>


<div lang="en" dir="ltr" class="mw-content-ltr">
'''Third option''' is to supply a list of countries and use those for a custom mirror pool.
'''Third option''' is to supply a list of countries and use those for a custom mirror pool.
The countries is an example - check the country list if in doubt.
The countries is an example - check the country list if in doubt.
   $ sudo pacman-mirrors --country Germany,France,Austria && sudo pacman -Syyu
   $ sudo pacman-mirrors --country Germany,France,Austria && sudo pacman -Syu
* If you supply the same preferred countries on every reset you will get your mirror pool updated with added or removed mirrors.
* If you supply the same preferred countries on every reset you will get your mirror pool updated with added or removed mirrors.
</div>


<div lang="en" dir="ltr" class="mw-content-ltr">
The '''--continent''' option has a behavior similar to '''--country'''
The '''--continent''' option has a behavior similar to '''--country'''
</div>


<div lang="en" dir="ltr" class="mw-content-ltr">
=== Apply pacman-mirrors defaults ===
=== Apply pacman-mirrors defaults ===
  sudo pacman-mirrors --country all --api --protocol all -set-branch stable && sudo pacman -Syyu
  sudo pacman-mirrors --country all --api --protocol all -set-branch stable && sudo pacman -Syu
</div>


<div lang="en" dir="ltr" class="mw-content-ltr">
The system will throw messages about newer packages on the system. These messages can safely be ignored and they dissappear when the installed package(s) equals the system branch.
The system will throw messages about newer packages on the system. These messages can safely be ignored and they dissappear when the installed package(s) equals the system branch.
</div>


<div lang="en" dir="ltr" class="mw-content-ltr">
== manpage ==
== manpage ==
* The manpage is in section 8 (System administration commands)
* The manpage is in section 8 (System administration commands)
* [https://gitlab.manjaro.org/applications/pacman-mirrors/tree/master/docs man page]
* [https://gitlab.manjaro.org/applications/pacman-mirrors/tree/master/docs man page]
</div>




Line 2,032: Line 2,178:
===pacman-mirrors.conf===
===pacman-mirrors.conf===


<div lang="en" dir="ltr" class="mw-content-ltr">
If pacman-mirrors is updated and has a new '''pacman-mirrors.conf''', it will inform you that a new conf is saved as '''pacman-mirrors.conf.pacnew'''.
If pacman-mirrors is updated and has a new '''pacman-mirrors.conf''', it will inform you that a new conf is saved as '''pacman-mirrors.conf.pacnew'''.
</div>


<div lang="en" dir="ltr" class="mw-content-ltr">
''You must manually merge changes/additions into your pacman-mirrors.conf.''
''You must manually merge changes/additions into your pacman-mirrors.conf.''
</div>


==Forum posts==
==Forum posts==
8,560

edits