Difference between revisions of "Pacman-mirrors"

moved section to advanced pacman-mirrors and added -u to pacman command
imported>Fhdk
(moved temporary switch branch to advanced pacman-mirrors page)
imported>Fhdk
(moved section to advanced pacman-mirrors and added -u to pacman command)
Line 39: Line 39:


====Create a mirrorlist====
====Create a mirrorlist====
  sudo pacman-mirrors --fasttrack && sudo pacman -Syy
  sudo pacman-mirrors --fasttrack && sudo pacman -Syyu


====Limit to 5 mirrors====
====Limit to 5 mirrors====
An optional number can be supplied to limit the number of mirrors in the mirrorlist
An optional number can be supplied to limit the number of mirrors in the mirrorlist
  sudo pacman-mirrors --fasttrack 5 && sudo pacman -Syy
  sudo pacman-mirrors --fasttrack 5 && sudo pacman -Syyu


====Mirrors for your country only====
====Mirrors for your country only====
Not all countries have mirrors, if geoip returns a country not in the pool all mirrors will be used.
Not all countries have mirrors, if geoip returns a country not in the pool all mirrors will be used.
  sudo pacman-mirrors --geoip && sudo pacman -Syy
  sudo pacman-mirrors --geoip && sudo pacman -Syyu


===Commands customizing the mirror pool===
===Commands customizing the mirror pool===
Line 55: Line 55:


====Customize mirror pool by countries====
====Customize mirror pool by countries====
  sudo pacman-mirrors --country Germany,France,Austria && sudo pacman -Syy
  sudo pacman-mirrors --country Germany,France,Austria && sudo pacman -Syyu


====Customizing mirror pool by interactive selection====
====Customizing mirror pool by interactive selection====
Using the --default will list all available mirrors and procotols
Using the --default will list all available mirrors and procotols
  sudo pacman-mirrors --interactive --default && sudo pacman -Syy
  sudo pacman-mirrors --interactive --default && sudo pacman -Syyu


====Use specific protocols (prioritized)====
====Use specific protocols (prioritized)====
  sudo pacman-mirrors --api --protocol https,http && sudo pacman -Syy
  sudo pacman-mirrors --api --protocol https,http && sudo pacman -Syyu


====Permanently switch to unstable and use German mirrors====
====Permanently switch to unstable and use German mirrors====
  sudo pacman-mirrors --country Germany --api --set-branch unstable && sudo pacman -Syy
  sudo pacman-mirrors --country Germany --api --set-branch unstable && sudo pacman -Syyu


====Permanently switch branch and use German mirrors with https====
====Permanently switch branch and use German mirrors with https====
  sudo pacman-mirrors --country Germany --api --set-branch unstable --protocol https && sudo pacman -Syy
  sudo pacman-mirrors --country Germany --api --set-branch unstable --protocol https && sudo pacman -Syyu


===Reset===
===Reset===
Line 74: Line 74:


====Revert all changes ====
====Revert all changes ====
  sudo pacman-mirrors --country all --api --protocol all -set-branch stable && sudo pacman -Syy
  sudo pacman-mirrors --country all --api --protocol all -set-branch stable && sudo pacman -Syyuu


==Overview==
==Overview==
Line 1,807: Line 1,807:
<div class="mw-collapsible-content">
<div class="mw-collapsible-content">
<pre>
<pre>
~ >>> sudo pacman-mirrors --country Denmark && sudo pacman -Syy                                                                                                             
~ >>> sudo pacman-mirrors --country Denmark && sudo pacman -Syyu                                                                                                       
.: INFO Downloading mirrors from repo.manjaro.org
.: INFO Downloading mirrors from repo.manjaro.org


Line 1,822: Line 1,822:
.: INFO Mirror list generated and saved to: /etc/pacman.d/mirrorlist
.: INFO Mirror list generated and saved to: /etc/pacman.d/mirrorlist
.: INFO To remove custom config run  'sudo pacman-mirrors -c all'
.: INFO To remove custom config run  'sudo pacman-mirrors -c all'
:: Synchronizing package databases...
:: Synkroniserer pakkedatabaser...
  core                                                                                     137,4 KiB  19,2M/s 00:00 [####################################################################] 100%
  core                         143,1 KiB  10,7M/s 00:00 [##############################] 100%
  extra                                                                                   1763,6 KiB  11,5M/s 00:00 [####################################################################] 100%
  extra                       1719,8 KiB  10,3M/s 00:00 [##############################] 100%
  community                                                                                 4,4 MiB  11,2M/s 00:00 [####################################################################] 100%
  community                       4,5 MiB  11,0M/s 00:00 [##############################] 100%
  multilib                                                                                 179,0 KiB  13,4M/s 00:00 [####################################################################] 100%
  multilib                     177,7 KiB  13,3M/s 00:00 [##############################] 100%
:: Starter fuld systemopgradering...
der er intet at udføre
</pre>
</pre>
</div>
</div>
Line 1,909: Line 1,911:
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.
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.


  $ sudo pacman-mirrors --country Germany,France,Austria && sudo pacman -Syy
  $ sudo pacman-mirrors --country Germany,France,Austria && sudo pacman -Syyu


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.


  $ sudo pacman-mirrors --country Antarctica && sudo pacman -Syy
  $ sudo pacman-mirrors --country Antarctica && sudo pacman -Syyu
  .: 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,925: Line 1,927:


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 -Syy
<pre>$ sudo pacman-mirrors --geoip --quiet && sudo pacman -Syyu
:: Querying servers, this may take some time
:: Querying servers, this may take some time
=> Testing mirrors in France
=> Testing mirrors in France
Line 1,931: Line 1,933:
:: Mirrorlist generated and saved to: /etc/pacman.d/mirrorlist
:: Mirrorlist generated and saved to: /etc/pacman.d/mirrorlist
</pre>
</pre>
=== Branch ===
Situations could exist, in which you want a not yet released to stable software, which contains a desired improvement or bugfix. For such situations it is possible to make a temporary switch to ''testing'' or ''unstable'' branch
Switch branch and syncronize
$ sudo pacman-mirrors --branch testing && sudo pacman -Syy
Install whatever software needed from that branch.
$ sudo pacman -S some-software-package-you-need
After installation switch back and syncronize
$ sudo pacman-mirrors --branch stable && sudo pacman -Syy
In such a situation, where you have pulled software from another branch, you must be prepared for messages from pacman or pamac about newer packages on the system. These messages can safely be ignored and they dissappear when the installed package(s) reaches stable branch


===Customizing the mirror pool===
===Customizing the mirror pool===
Line 1,961: Line 1,946:


'''First option''' is using ''--interactive''. It uses your current mirror pool(wether default or custom)
'''First option''' is using ''--interactive''. It uses your current mirror pool(wether default or custom)
  $ sudo pacman-mirrors --interactive && sudo pacman -Syy
  $ sudo pacman-mirrors --interactive && sudo pacman -Syyu


'''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 -Syy
  $ sudo pacman-mirrors --interactive --default && sudo pacman -Syyu


'''Third option''' is supplying a list of countries with ''--country''
'''Third option''' is supplying a list of countries with ''--country''
  $ sudo pacman-mirrors --country Germany,France,Austria && sudo pacman -Syy
  $ sudo pacman-mirrors --country Germany,France,Austria && sudo pacman -Syyu


Using ''Option 1 and 2'', pacman-mirrors will process the available mirrors and present you with a list in which you will select your desired mirrors. ''Option 3'' creates a pool from the supplied countries. In either case the pool is saved and used to generate a mirrorlist.
Using ''Option 1 and 2'', pacman-mirrors will process the available mirrors and present you with a list in which you will select your desired mirrors. ''Option 3'' creates a pool from the supplied countries. In either case the pool is saved and used to generate a mirrorlist.
Line 1,983: Line 1,968:
'''Second option''' to is to use ''--default'' with ''--interactive''
'''Second option''' to is to use ''--default'' with ''--interactive''


  $ sudo pacman-mirrors --interactive --default && sudo pacman -Syy
  $ sudo pacman-mirrors --interactive --default && sudo pacman -Syyu
* 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.


Anonymous user