After installing reflector-auto.conf using the command
sudo pacman -S reflector-auto the config file was not available to edit:
After installing reflector-auto.conf using the command
Hi, and welcome here!
The config file is not required, but it may help to configure reflector-auto to be better suitable for automatic running.
Anyway, here’s some parts of my version of the config file:
## Configuration for 'reflector-auto'. # use only these countries (select suitable for your location!): --country Germany -c France # exclude some mirrors for various reasons: --exclude ubrco.de -x nebulanet.cc -x bethselamin.de -x mikrogravitation.org -x ratenzahlung -x n-ix.net -x niyawe.de -x checkdomain.de # use only https protocol --protocol https # only mirrors synced within 2 hours: --age 2 # only fastest 10 mirrors --fastest 10 # sort results based on the download rate --sort rate # these options not currently used: # --latest 20 --number 10
As you can see, the options in the config file are ordinary reflector options.
You can use command
to see available reflector options that can be used in the config file.
Thanks for the clarification. The article explaining using reflector does not say to create the file, but to edit it. If there is no file there to edit, that causes confusion, and if someone has no idea how this kind of stuff works, then the whole article is of little use. The article should be edited to reflect this, including a sample reflector-auto.conf file.
Looking at your example file, and the help file (reflector -h), I am none the wiser : Is there a difference between -c and --country? The help file eludes to them to be one and the same, since there is only one description for each option with a - and --, but then again, I have been caught in the “this is written for people who understand coding” trap before, and had bad consequences due to the lack of documentation, and your use of both in your file could mean you are using both because they are different, or you used both to show that one can use one, or the other, or both. I do understand that the # implies a comment and cancels out any command that follows one.
Thanks for any help.
Thanks for the question.
The # character starts a comment, and the rest of that line is the comment. Comment means text that will be ignored by the program (here reflector-auto) that reads the file.
Options -c and —country mean the same. I used both of them because —country is easier to understand, and -c is short to write.
Hope this clears any confusion regarding the contents of that file.
I modified the wiki
to include more information of the configuration file.
EDIT: fixed the link, thanks @Lemon !
You may want to alter your link since it leads back to this topic.
Thanks, I did get all of the stuff in the Config right, but it still didn’t work!
sudo systemctl start reflector-auto.timer
and entering my password, the terminal advanced to an empty line and NOTHING. It just stayed there, and after waiting more than an hour, I couldn’t do anything but close the terminal which asked if I wanted to terminate the running process “sudo systemctl”.
I checked to see what packages are available for reflector, and found “reflector-timer” which was not installed. This is a fresh install of endeavouros-2019.12.22-x86_64. I installed the package, and passed the start and enable commands again, and checked if it was running: It was up and doing it’s thing!
Seems it is needed, but was not installed by default for whatever reason.
Oh, and I did change to the short form of -c from United States and Canada to US and CA, but read that it was fixed and no longer a problem way before the release of the version of reflector-auto I was using.
The timer is set to launch once a week, so waiting only one hour is not enough to see it launch.
Anyway, what does command
systemctl status reflector-auto.timer
And did you run also command
sudo systemctl enable reflector-auto.timer
Then, reflector-timer from AUR is another software and has nothing to do with reflector-auto.
After running (1):
I closed the terminal and ran (2):
and it told me it was “DEAD”
I then tried (1), left the terminal open, and did (2) in another terminal window, and (3) gave me the same result again, also “DEAD”
After I installed the service, I edited the .conf file, switched to short country names, and removed all blank lines, so that may have been what fixed it because (3) returned status “ACTIVE”. I did not take out any #comments, nor put it all into a single line though.
Hope you can use this info.
Can you show me what was the contents of the config file before and after those changes?
It is important to see exactly how they were (if possible), because that may give a clue of the problem.
Another thing: there’s a somewhat alternative program reflector-simple which is a GUI around the reflector command. The reflector-simple should be easier and more obvious to use. With that you can select mirror countries easily with simple mouse clicks, and then it generates the pacman mirrorlist. But it does not update the mirrorlist periodically like reflector-auto does.
I recommend getting to know reflector-simple too.
The Endeavour OS welcom app uses reflector-simple: I figured that much out all by myself!
## Configuration for 'reflector-auto'. -c United States -c Canada -p https -a 4 -f 10 --sort rate
It didn’t work
Then I changed -c United States to
-c 'United States'
as I saw someone do in another post, but that didn’t work either.
I then changed it to:
## Configuration for 'reflector-auto'. -c US -c CA -p https -a 4 -f 10 --sort rate
and then it worked.
I have an idea but that remains to be seen after a thorough check.
I’ll get back to this probably tomorrow.
Thanks. I have it working now, but good to see you want to make sure it doesn’t happen to anyone else. You sure make EndeavourOS worth while.
I made a new version 1.3-1 of reflector-auto.
There really was a problem with option handling and I thought I already fixed that a while ago, but it seems that I put the fix only at reflector-simple package.
So many thanks for testing and reporting it!
If you try the new version, please report if it does not work as expected.
Thorough testing is the only sure way to find all bugs and eventually fix them.
What is the difference between the update mirrors on the Welcome screen as opposed to reflector-auto? Is it the reflector-simple? What i do after an install is use the update mirrors on the welcome screen and then then detect package issues. I think that should be the norm for anyone installing. Then i install additional packages and use yay to install software. Some new users don’t understand that the install is up to date being that it is Arch rolling release. Then they think something is wrong because they are looking for updates. When i say some… i mean a few. There are some new users who aren’t familiar with Arch or the rolling release model. This is why i believe that the Wiki has to be informative not just technical like Arch which doesn’t explain how.
What are reflector-auto and reflector-simple?
Reflector-auto is meant for automatic and weekly update of /etc/pacman.d/mirrorlist.
Reflector-auto is best to use with a configuration file at /etc/reflector-auto.conf, mainly to select mirror countries and possibly other reflector options in advance.
Reflector-simple is an easy “one-timer” selector of mirrors into the /etc/pacman.d/mirrorlist, with a GUI.
The Update Mirrors button in the welcome app starts reflector-simple.
And why do we need to worry about the mirrors?
Mirrors are the package servers we use when installing or updating packages.
There are lots of mirrors around the world, and to keep packages updates running smoothly, the mirrors should be both
- fast (high data rate and responsiveness)
- up to date
Usually (but not always) the closest mirrors are the fastest.
Another important factor is that the mirrors we use are up to date, meaning they have been synced with the master Arch package server recently. Better to use a mirror that has the latest Arch packages.
Yet another (temporary) concern may be that a particular mirror is offline, e.g. in maintenance. Sometimes a mirror may be even permanently offline.
That’s why having decent mirrors (i.e. a working mirrorlist on our machines) is important.
EndeavourOS has two “mirror ranking” applications: reflector-auto and reflector-simple. Their purpose was explained above.
You may either one of them, or both of them.
Reflector-simple is informative as it shows right away what it is capable of doing. I recommend starting with this application and get the idea of the selections that are the most sensible in your case.
Reflector-auto has some small learning curve since it (to be the most useful) needs a configuration file with proper settings (i.e. proper reflector options).
Excellent … Easily understandable. Was this in the Wiki already as i didn’t look at the time or did you update it again since?