Prevent to change mirrorlist

Hi.

I have a problem with make /etc/pacman.d/mirrorlist file pernamemt. Some process change it after some days, and I dont have idea which one can modify this file.

Can someone help me ?
Thanks.

This would be the pamac-mirrorlist timer.

sudo systemctl mask pamac-mirrorlist.timer

Another way is to create a custom mirror pool with only one mirror

sudo pacman-mirrors --continent -i

I have my own local weekly repo snapshot for updates.
so I masked this pamac-mirrorlist.timer so I hope it fix it :slight_smile:

Many thanks.

Just watch out for pamac updates - it may reenable the timer.

If you want to be sure nothing changes the mirrorlist - create a custom-mirrors.json with your own mirror.

$ cat /var/lib/pacman-mirrors/custom-mirrors.json
[{"country": "your_country", "protocols": ["http"], "url": "http://local.server/"}]

There is another low-level thing you can do

undocumented

:exclamation: Only do this if you understand the consequences.
:exclamation: These mods in combo are effectively blocking the Manjaro mirror pool.
:exclamation: Using these mods implies you are a power user or system admin
:exclamation: By using these mods you agree that your system is unsupported
:exclamation: YOU AGREE - THIS IS YOUR RESPONSIBILITY
:exclamation: NEVER CREATE TOPICS FOR A SYSTEM MODDED THIS WAY

  1. Modify pacman-mirrors script source
    sudo sed -i 's/^URL_STATUS_JSON.*/URL_STATUS_JSON=""/g' /usr/lib/python3.9/site-packages/pacman_mirrors/config/configuration.py
    
  2. Remove python cache files from pacman_mirrors package
    $ sudo find /usr/lib/python3.9/site-packages/pacman_mirrors -type f -name '*.pyc' -exec rm {} +
    
  3. Modify /usr/share/pacman-mirrors/mirrors.json to contain your one and only mirror
    [{"country": "your_country", "protocols": ["http,https"], "url": "http://local.server/"}]
    
  4. Edit pacman.conf and add pacman-mirrors to the ignore list
    IgnorePkg   = pacman-mirrors
    

pacman-mirrors will now fake all mirror operations and fake the status of your mirrorlist. Nothing changes and you won’t have to rely on the masking of pamac-mirrorlist.timer.

This effectively block the Manjaro mirror pool - of course you can use any official mirror as the only mirror as well - in which case the mirror will never - ever change.

:exclamation: Only do this if you understand the consequences.
:exclamation: These mods in combo are effectively blocking the Manjaro mirror pool.
:exclamation: Using these mods implies you are a power user or system admin
:exclamation: By using these mods you agree that your system is unsupported
:exclamation: YOU AGREE - THIS IS YOUR RESPONSIBILITY
:exclamation: NEVER CREATE TOPICS FOR A SYSTEM MODDED THIS WAY

Many thaks for detailed solutions.

Im impressed with Majaro forum quality. For me is far ahead before Opensuse or Arch.

This topic was automatically closed 15 days after the last reply. New replies are no longer allowed.