Skip to main content

Arch Linux Pacman mirrorlist merging utility

Project description

pacmimi is an utility to merge two files in the mirrorlist format used by the pacman package manager into a single file.

Use case

A concrete use case for such an utility is the following:

  • The pacman package manager uses a mirrorlist file containing available package mirrors. That file is provided and updated by the Arch Linux package pacman-mirrorlist.

  • The mirrorlist file needs to be edited by the user in order to enable (uncomment) at least one mirror. Personally, I enable multiple mirrors and change their order so that faster mirrors come first.

  • When the pacman-mirrorlist package is updated, pacman won’t override the mirrorlist file with the updated version if it has been edited by the user (which will always be the case). Instead, the new version is saved as mirrorlist.pacnew.

  • The user thus needs to manually compare both mirrorlist files and merge the changes from the new mirrorlist.pacnew file into his locally modified copy of mirrorlist while keeping his modifications.

  • An easy way to do this is to just replace the local copy with the updated mirrorlist and enable and reorder the correct mirrors all over again, but that gets tedious fast.

The last point is where pacmimi comes in. pacmimi relieves you of that tedious work – it removes mirrors which are not available anymore from your local mirrorlist and adds newly added mirrors as disabled (commented) entries. At the same time, it keeps your enabled mirrors and their order (it will, however, remove those enabled mirrors which are not present anymore in the new mirrorlist).

Installation

Install on Arch Linux

On Arch Linux, I provide an AUR package called pacmimi.

Please refer to the AUR page on the Arch Linux wiki for help on how to use the AUR.

An example installation command might be:

paru -S pacmimi

Install using pip

You can also pip to install pacmimi only for your own user, e.g.:

pip install --user pacmimi

GPG-signed Git release tags

From version 1.1.1 and newer, all Git release tags such as v1.1.1 are signed with the following GPG key:

Quick start

  1. Execute the following command:

    sudo pacmimi -s /etc/pacman.d/mirrorlist*
  2. This will merge your mirrorlist and mirrorlist.pacnew files and remove mirrorlist.pacnew when it’s done. It backups the original mirrorlist to /etc/pacman.d/_orig_mirrorlist before modifying it.

See pacmimi -h for available options. The -s (--sane-defaults) option used above enables useful default options.

Version history

Version 1.1.2

  • Update README to include AUR package information.

This is really just a release intended to update the README on PyPI, and should’ve been part of v1.1.1…

Version 1.1.1

  • GPG-sign Git release tags.

Version 1.1.0

  • Build process modernization.

Version 1.0.0

  • First release on PyPI.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

pacmimi-1.1.2.tar.gz (7.9 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

pacmimi-1.1.2-py3-none-any.whl (9.7 kB view details)

Uploaded Python 3

File details

Details for the file pacmimi-1.1.2.tar.gz.

File metadata

  • Download URL: pacmimi-1.1.2.tar.gz
  • Upload date:
  • Size: 7.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.0.1.dev0+g94f810c.d20240510 CPython/3.12.4

File hashes

Hashes for pacmimi-1.1.2.tar.gz
Algorithm Hash digest
SHA256 53ce9ba8eef5995a2e76972dcc0e2c983383f5205eb0f364d16a8fd5909e7926
MD5 51537202a81b026cfd424c11cc73362f
BLAKE2b-256 8852e28da141af96fac96545050f53d2674708904b560bc8e99ea09aadfe8825

See more details on using hashes here.

File details

Details for the file pacmimi-1.1.2-py3-none-any.whl.

File metadata

  • Download URL: pacmimi-1.1.2-py3-none-any.whl
  • Upload date:
  • Size: 9.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.0.1.dev0+g94f810c.d20240510 CPython/3.12.4

File hashes

Hashes for pacmimi-1.1.2-py3-none-any.whl
Algorithm Hash digest
SHA256 04277d04faa4f59452525011a2ad2b10c618b1dfc222af8a023fc7eeb78e85cf
MD5 19d45476c44c2e851c4bc2a89056688c
BLAKE2b-256 449c4348369b8bd49c0ea737d93af746476db7ddd5ce18d1c5bc7fc77b556e00

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page