Re: Reflector reborn

graysky wrote:

Stupid question: how are people using reflector?

I don't use it directly. I have a fixed mirrorlist for syncing the database. When I upgrade the system with powerpill-light, it uses Reflector at run-time to get a list of the most up-to-date mirrors for parallel downloads.

Re: Reflector reborn

Nice script !

Just a small typo in the help, a "Limit" is missing for the --grep option. Also, when trying to save on a location without permission (typically /etc/pacman.d/mirrorlist without being root), the exception is not correctly handled and itself throws an exception.

filters.add_argument('--grep', dest='grep', metavar='<regex>', action='append',- help=' the list to URLs that match at least one of the given regular expressions.')+ help='Limit the list to URLs that match at least one of the given regular expressions.')

Re: Reflector reborn

All I see is that you are killing it with a KeyboardInterrupt, which is not a bug. I could update the code to catch that and avoid the tracedump, but that would only be a cosmetic change.

Btw, you shouldn't use "pacman -Syy" in a script unless you update the system immediately afterward. It can break the system. Example:

pacman -Syy
# some time later
pacman -S <some library>

Now only the library has been updated without updating packages that depend on it. Those packages depend on the old version and will no longer work. If this affects a critical package, the system will be unusable. There is a thread somewhere on the forum that goes into detail about this.

Look at the way paconky handles update detection. You can also use an alternative database with pacman ("pacman -b /some/temporary/path ...") but you will need to copy or symlink in the local database.

Re: Reflector reborn

Re: Reflector reborn

Thanks a lot. This script is a life saver.However, it has the unfortunate bug of requiring the existence of $HOME/.cache in order to run.Also, where are the sources for your programs? It would be very helpful if I could see what couldhave caused the problem.

Nothing is too wonderful to be true, if it be consistent with the laws of nature -- Michael FaradaySometimes it is the people no one can imagine anything of who do the things no one can imagine. -- Alan Turing---How to Ask Questions the Smart Way