Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

rate-mirrors not work in stdin #23

Closed
Keerthivasan472 opened this issue Jan 22, 2022 · 3 comments
Closed

rate-mirrors not work in stdin #23

Keerthivasan472 opened this issue Jan 22, 2022 · 3 comments

Comments

@Keerthivasan472
Copy link

Hello everyone,

I am from India, recently i switch to blackarch linux so i need to update my system so i like to change my mirrors for faster connectivity speed and to avoid timeout errors.
so i fed mirrorlist via stdin but i got no output on screen but the syntax was correct one

:rate-mirrors stdin --path-to-test="blackarch-mirrorlist.backup" --comment-prefix="# " --path-to-return='$repo/os/$arch'

working directory: /etc/pacman.d

file:

Worldwide

Server = https://mirrors.fosshost.org/blackarch/$repo/os/$arch
Server = https://mirrors.fossho.st/blackarch/$repo/os/$arch

Australia

Server = http://blackarch.mirror.digitalpacific. … o/os/$arch

Austria

Server = http://mirror.easyname.at/blackarch/$repo/os/$arch
Server = ftp://mirror.easyname.at/blackarch/$repo/os/$arch

China

Server = https://mirror.sjtu.edu.cn/blackarch/$repo/os/$arch
Server = https://mirrors.tuna.tsinghua.edu.cn/bl … o/os/$arch
Server = https://mirrors.ustc.edu.cn/blackarch/$repo/os/$arch

Denmark

Server = https://mirrors.dotsrc.org/blackarch/$repo/os/$arch
Server = http://mirrors.dotsrc.org/blackarch/$repo/os/$arch
Server = ftp://mirrors.dotsrc.org/blackarch/$repo/os/$arch

Ecuador

Server = http://mirror.uta.edu.ec/blackarch/$repo/os/$arch
Server = https://mirror.uta.edu.ec/blackarch/$repo/os/$arch
Server = ftp://mirror.uta.edu.ec/blackarch/$repo/os/$arch
Server = http://mirror.cedia.org.ec/blackarch/$repo/os/$arch
Server = https://mirror.cedia.org.ec/blackarch/$repo/os/$arch

like this [ here i not mention entire output of file blackarch-mirrorlist..backup]

additional questions :
*)what is eps and eps check which ratio is best for faster downloads?
*)how to change entry country because i live in india, i want to explore near by country's to me?
*)by utilizing mirror how to avoid download timeout error? whether i can test rsync protocol

that's all my friend

@westandskif
Copy link
Owner

hi @Keerthivasan472
quoting the docs from README:

rate-mirrors stdin -- takes mirrors from stdin

Each string should comply with one of two supported formats:
tab-separated url and country (either name or country code)
tab-separated country and url -- just in case :)
url

So you need to cat your file and preprocess its content with sed first (to make it comply with the rules above) before you feed it to rate-mirrors

Answers to your questions:

  1. eps is sigma to mean speed ratio (the lower it is, the lower are errors in speed measurements); eps checks defines number of data points to collect to start calculating the epsilon we just discussed. Default values should work fine

  2. to be honest you don't need it -- because this iterative algorithm works best when you allow it to work, starting from the farthest country you can ping). If you just start from India, the tool can stop after few steps because speeds are worsening (however there's a chance that on step#4 you'd found a perfect mirror). So as a rule of thumb, the further you start, the better results are.
    However, if you still want it, here it is: rate-mirrors --entry-country=IN stdin

  3. can you please clarify the question about avoiding timeout errors? timeouted mirrors are just excluded from results.
    As for rsync, there's no support at the moment (as far as I know http & https protocols are the only pacman-native protocols).

@Keerthivasan472
Copy link
Author

Keerthivasan472 commented Jan 23, 2022

Reply @westandskif

  1. if i use fastest mirror even if the update is huge (ex:8gb) sometime aur helpers cause time out error to fetch packages at particular mirror

next,please give example format or file for stdin and make a blog or youtube video and explore the full potential of rate-mirrors
it will help different arch-distro users

please provide sample file to feed in stdin or show how the content look like in mirrorlist file

@westandskif
Copy link
Owner

westandskif commented Jan 23, 2022

@Keerthivasan472

re: AUR timeouts
AUR isn't the source of your AUR package updates, neither mirrors are. So if you are installing something from AUR, please check out the PKGBUILD file of a package on AUR, to see the source it is downloading from.

I already shared that the file has to be the list of links or tab separated links and country codes.
Links are what your --path-to-test is to be joined to for testing.

AT\thttp://mirror.easyname.at/blackarch/
https://mirrors.fosshost.org/blackarch/

So you can mix country-annotated links with unlabeled ones.

re: blog or videos: to cut it short - contributions are welcome!
a more verbose reply: I believe this isn't how open source works:) you can't just send a list of things in an imperative manner to have them done for you.
I'm comfortable with coding and improving README where needed and that's it for now. if you are willing to contribute by making vids or writing a blog post, please, do

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants