Difference between revisions of "Pacman-mirrors"

moved temporary switch branch to advanced pacman-mirrors page
imported>Fhdk
imported>Fhdk
(moved temporary switch branch to advanced pacman-mirrors page)
Line 2: Line 2:
== Pacman-Mirrors ==
== Pacman-Mirrors ==


Pacman-mirrors is a Manjaro specific utility for generating and maintaining the system mirrorlist. This article covers current version 4.7.1.
Pacman-mirrors is a Manjaro specific utility for generating and maintaining the system mirrorlist. This article covers current version 4.7.x.
Pacman-mirrors uses the information available on the [http://repo.manjaro.org: Mirrorservice]
Pacman-mirrors uses the information available on the [http://repo.manjaro.org: Mirrorservice]


Line 16: Line 16:


=== '''IMPORTANT''' ===
=== '''IMPORTANT''' ===
'''It cannot be stressed enough, that every run of pacman-mirrors requires you to syncronize your database'''
'''It cannot be stressed enough, that every run of pacman-mirrors requires you to syncronize your database and update your system'''


  $ sudo pacman -Syy
  $ sudo pacman -Syyu


If you fail to do so, the issue/s which had you make change might not be solved. Furthermore you might run into ''partial-updated'' scenario which can cause havoc in your system. For more detailed information on how pacman works you can read up on the [https://wiki.archlinux.org/index.php/System_maintenance Archlinux Wiki]
If you fail to do so, the issue/s which had you make change might not be solved. Furthermore you might run into ''partial-updated'' scenario which can cause havoc in your system. For more detailed information on how pacman works you can read up on the [https://wiki.archlinux.org/index.php/System_maintenance Archlinux Wiki]


Quote from that wiki about why you need to ensure consistency in your system maintenance:
<blockquote>
==== Partial upgrades are unsupported ====
Arch Linux is a rolling release distribution. That means when new library versions are pushed to the repositories, the developers and Trusted Users rebuild all the packages in the repositories that need to be rebuilt against the libraries. For example, if two packages depend on the same library, upgrading only one package might also upgrade the library (as a dependency), which might then break the other package which depends on an older version of the library.
That is why partial upgrades are not supported. Do not use pacman -Sy package or any equivalent such as pacman -Sy followed by pacman -S package. Always upgrade (with pacman -Syu) before installing a package. Be very careful when using IgnorePkg and IgnoreGroup for the same reason. If the system has locally installed packages (such as AUR packages), users will need to rebuild them when their dependencies receive a soname bump.
If a partial upgrade scenario has been created, and binaries are broken because they cannot find the libraries they are linked against, do not "fix" the problem simply by symlinking. Libraries receive soname bumps when they are not backwards compatible. A simple pacman -Syu to a properly synced mirror will fix the problem as long as pacman is not broken.
The bash script checkupdates, included with the pacman package, provides a safe way to check for upgrades to installed packages without running a system update at the same time.
==== Act on alerts during an upgrade ====
When upgrading the system, be sure to pay attention to the alert notices provided by pacman. If any additional actions are required by the user, be sure to take care of them right away. If a pacman alert is confusing, search the forums and the recent news posts for more detailed instructions.
==== Deal promptly with new configuration files ====
When pacman is invoked, .pacnew and .pacsave files can be created. Pacman provides notice when this happens and users must deal with these files promptly. Users are referred to the Pacman/Pacnew and Pacsave wiki page for detailed instructions.
Also, think about other configuration files you may have copied or created. If a package had an example configuration that you copied to your home directory, check to see if a new one has been created.
</blockquote>


==TL:DR - Samples please==
==TL:DR - Samples please==
Line 68: Line 48:
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 -Syy
===Commands writing temporary mirrorlist===
====Switch mirrorlist to unstable branch====
sudo pacman-mirrors --branch unstable && sudo pacman -Syy
====Revert mirrorlist to stable branch====
sudo pacman-mirrors -b stable && sudo pacman -Syy


===Commands customizing the mirror pool===
===Commands customizing the mirror pool===
Anonymous user