• mirrorlist.pacnew replaces mirrorlist actually?


    Hi all,

    First of all let me tell you that I use reflector to update my mirrorlist regularly. But today I received this mirrorlist.pacnew through the usual update process.
    Watching the update log, there is a warning that my mirrorlist file was replaced with this new mirrorlist.pacnew, but checking the file dates, it wasn’t.

    alt text

    The question is, wouldn’t this update process replace the mirrorlist file automatically or is it always a manual process?
    Thank you in advance for your comments!


    Fer

  • Hi,

    When pacman detects that you have changed one setup file from a package it’s trying to update, it does not update that file, it just creates a .pacnew with the new setup file.

    It’s user’s task to merge both files (old and new).

    mirrorlist.pacnew it’s just the new default mirrorlist file that you should check and merge with your old mirrorlist file.

    Cheers!

  • More unnecessary confusion imo. As I’ve discovered earlier (and still recommended to be installed by default with the distro,) using reflector-timer-weekly seems to be the best solution here for programmatically updating the mirrorlist for most people – no manual uncommenting the mirrors you want and no mv or cp commands to be concerned with.

  • New here and all this.

    Can anyone explain this further. I ran this recent update that had something to do with the mirrors and did nothing else. Everything seems to be working since then.

    Am I supposed to be running something else, I find it hard that you are supposed to manage your update manager?

  • @noobertroon said in mirrorlist.pacnew replaces mirrorlist actually?:


    Am I supposed to be running something else, I find it hard that you are supposed to manage your update manager?

    No, you’re not. It is possible to safely ignore /etc/pacman.d/mirrorlist.pacnew. The thing I do for ages.

    mirrorlist.pacnew is only an Arch’s suggestion. It’s a generic list of recent Arch mirrors available worldwide. They may or may not work well for you.

    Mirrorlist.pacnew files are not accumulated. A newer version, when arrives, overwrites the already existing one.

    The best practice is to run reflector. It will find the best mirrors for your current geographical location. It’s enough to run it two or three times a year. Or run it daily. Weekly. Monthly. Or never run it.

    If you do nothing - ignore mirrorlist.pacnew and don’t run reflector - nothing will break, and nothing dramatic will happen. At worst, the download rate of your mirrors could deteriorate with time, so packages download will be taken a bit more time during upgrades. Or it may even improve - if your mirrors are well maintained by the owners.

    /etc/pacman.d/mirrorlist, generated by reflector, worths hundreds /etc/pacman.d/mirrorlist.pacnew’s proposed by Arch.

    I upgrade Antergos several times a day with one command:

    rd
    

    rd is an alias, which stands for refresh distro:

    alias rd='sudo reflector --age 8 --fastest 128 --latest 64 --number 32 --sort rate --save /etc/pacman.d/mirrorlist && yaourt -Syyua && sync && sudo pacman -Scc && sync'
    

    The rd command:

    • runs reflector, which
      • finds the mirrors updated in last 8 hours
      • sorts them by download rate (speed)
      • selects the best 128 from them
      • from those 128 selects 64 updated most recently
      • from those 64 takes the best | fastest 32
      • writes the ready-to-use /etc/pacman.d/mirrorlist
    • yaourt upgrades
      • all installed packages from regular Antergos and Arch repos
      • all installed AUR packages
    • synchronizes all writes | changes to disks
    • cleans pacman’s cache

    You could create a re alias, and run it by hand from time to time:

    alias re='sudo reflector --age 8 --fastest 128 --latest 64 --number 32 --sort rate --save /etc/pacman.d/mirrorlist'
    

    Or you could schedule reflector’s execution, as suggested by @d_K earlier.

  • @just said in mirrorlist.pacnew replaces mirrorlist actually?:

    If you do nothing - ignore mirrorlist.pacnew and don’t run reflector - nothing will break, and nothing dramatic will happen. At worst, the download rate of your mirrors could deteriorate with time, so packages download will be taken a bit more time during upgrades.

    …or worse, the update manager will be broken completely and you won’t even know it – due to unknown reasons. Reflector is definitely the way to go.

  • So how exactly do I set up reflect-timer-weekly.

    Explain like I am 5 please :)

  • @noobertroon just read the wiki carefully. Some handy notes:

    • After building the package in the AUR, be sure to edit (and properly save) the config file according to your country level. The list of available countries is available by doing a reflector --list-countries. If your county is 2 words like the United States, be sure to quote them in single ’ marks, eg. 'United States'
    • After saving the config file and enabling the timer, you can immediately update the mirrors by doing a sudo systemctl start reflector (note that “.service” is implied when omitted.)
  • I installed the reflector-timer-weekly package. I then opened /etc/reflector.conf

    and simply changed the country from China to Canada. Saved and closed it. I don’t need to change anything else?

    Also, I then ran sudo systemctl enable reflector (and then ran what you said above to run it now)

  • @just said in mirrorlist.pacnew replaces mirrorlist actually?:

    yaourt -Syyua

    I didn’t know I had to run this command as well… everyday we learn something new…


    Fer

  • @ferthelet said in mirrorlist.pacnew replaces mirrorlist actually?:

    We are Linux, so learning constantly. Those who don’t learn use WindOS or *buntu :) .

    @just said in mirrorlist.pacnew replaces mirrorlist actually?:

    yaourt -Syyua

    I didn’t know I had to run this command as well… everyday we learn something new…

    You don’t have to run it.

    What matters here is the -a switch, which does exist in yaourt and does not exist in pacman.

    In the command

    yaourt -Syua
    

    the -a tells yaourt that it must check for upgrades not only from regulaer Arch repos, but also from AUR.

    Pacman knows nothing about AUR, doesn’t work with it, so it doesn’t have -a switch. In pacman’s terms, AUR is not a repository at all.

    If there are no any AUR package installed in the system, then these three commands are absolutely identical one to another:

    • sudo pacman -Syu - a standard upgrade from regular repos
    • yaourt -Syu - exactly the same thing = a standard upgrade from regular repos only
    • yaourt -Syua - an upgrade from regular repos and from AUR - but as there are no AUR pkgs installed, the -a actually does nothing.

    Briefly:

    • yaourt -Syua works always, checks everything, whether AUR pkgs are installed or not
    • sudo pacman -Syu works always, checks everything except AUR

    yaourt -Syua may be seen as more powerful form of sudo pacman -Syu.

    The -y switch tells to pacman and youart to check for updates in pkgs databases on the mirrors | servers. If they are changed, then local pkgs databases are updated accordingly.

    The double -yy switch tells to pacman and youart to update all local pkgs databases unconditionally, whether mirrors databases are changed or not. It is especially useful when you want to post some output to the forum and want to demonstrate to the readers, what repos and in which order (repos priority) you’re using. It is also an absolute guarantee that your local databases are aligned with servers.

  • OK newbie asking more questions.

    What the heck is yaourt and are you saying that if I have an app installed from the AUR and I am using pacman or even the Software Update application its not going to update the apps that are from the AUR?

  • If you go into the preferences of pamac, the software update gui, there is an option in the AUR section to check for updates from the AUR.

    The pacman command by itself will not update AUR packages.

  • Ok that is what I thought. Gotcha!

  • @just is there a --force option in yaourt?

    Antergos (default OS) - WIN10 (abandoned)
    I3wm - Mate desktop
    AMD - A4 7300 Radeon graphics
    16 GB ram
    HD 1 TB
    Linux newbie since 06/2016

  • @noobertroon , pacman is used to work with the official Arch repos. The AUR is NOT an official repo but an unofficial one where users put whatever package they create. Arch warns you about possible risks you may take since they don t officially support it. AUR is kind of a Ubuntu ppa function BUT having all in one place (no need to istall multiple ppas, everything exists in AUR)…
    So, when installing sth from the official repos the command goes
    sudo pacman -S nameofthepackage
    whereas, when installing from the AUR
    yaourt -S nameofthepackage
    When you want to update/upgrade as @just has already said

    yaourt -Syua works always, checks everything, whether AUR pkgs are installed or not
    sudo pacman -Syu works always, checks everything except AUR

    yaourt -Syua may be seen as more powerful form of sudo pacman -Syu.

    1.Antergos Linux KDE plasma / Gnome 2.Ubuntu 17.10 64bit Unity
    Intel Core2 Duo CPU P8400 2.26GHz‖ RAM 3908 MiB ‖ Dell Inc. 0F328M - Dell Inc. Latitude E6500
    Intel Mobile 4 Series Chipset Integrated Graphics [8086:2a42] {i915

  • @just Absolutely fantastic explanation, thank you very much for your time and dedication!!


    Fer

  • @fernandomaroto said in mirrorlist.pacnew replaces mirrorlist actually?:

    @just is there a --force option in yaourt?

    Oops, sorry, I missed your question.

    Yes, there is –force in yaourt. But I don’t like it. Because:

    • AUR pkgs are prone to breakages
    • a powerful tool like yaourt facilitates the work with potentialy unstable pkgs
    • –force makes yaourt even more powerfull

    By using AUR we make the system less stable. Which is not good.

    After a terminal, the next best Linux user’s friend is the man command:

    man yaourt
    

    You’ll find all yaourt commands, options, switches here.

    Same content on web is here.

pacman76 mirrorlist7 update45 Posts 18Views 779
Log in to reply