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

Twice --path-to-return #28

Closed
arthurflor23 opened this issue May 17, 2022 · 2 comments
Closed

Twice --path-to-return #28

arthurflor23 opened this issue May 17, 2022 · 2 comments

Comments

@arthurflor23
Copy link

Hi,

I'm using the rate-mirrors for arch and chaotic mirrorslist with stdin (awesome!). However, I saw that --path-to-return parameter returns 'the term before $arch' twice. I don't know if I'm using correctly or if is a real issue.

This is an example of the command:

curl -s "https://archlinux.org/mirrorlist/?country=BR" | sed -e "s/^#Server = //" -e "/^#/d" -e "/^$/d" -e "s/\$repo\/os\/\$arch//g" | rate-mirrors stdin --path-to-test="community/os/x86_64/community.files" --path-to-return='$repo/os/$arch' --output-prefix="Server = " | sudo tee ~/example

And the output:

# STARTED AT: 2022-05-17 12:28:37.448740258 -03:00
# ARGS: rate-mirrors stdin --path-to-test=community/os/x86_64/community.files --path-to-return=$repo/os/$arch --output-prefix=Server = 
# MIRRORS LEFT AFTER FILTERING: 10
# JUMP #1
# EXPLORING US
# VISITED US
# BLANK ITERATION
# COUNTRY JUMPING YIELDED TOO FEW MIRRORS (0), ADDING OTHERS TO UNLABELED
# 

# TESTING UNLABELED MIRRORS
# SpeedTestResult { speed: 374.20 KB/s; elapsed: 1.230897955s; connection_time: 145.549254ms }
# SpeedTestResult { speed: 3.57 MB/s; elapsed: 1.390944385s; connection_time: 107.407297ms }
# SpeedTestResult { speed: 647.21 KB/s; elapsed: 1.3991738s; connection_time: 100.782783ms }
# SpeedTestResult { speed: 116.29 KB/s; elapsed: 1.038307777s; connection_time: 391.465037ms }
# SpeedTestResult { speed: 444.81 KB/s; elapsed: 1.304742522s; connection_time: 184.487418ms }
# SpeedTestResult { speed: 19.22 MB/s; elapsed: 1.375187845s; connection_time: 124.960557ms }
# 

# RE-TESTING TOP MIRRORS
# SpeedTestResult { speed: 20.40 MB/s; elapsed: 1.31985743s; connection_time: 160.257424ms }
# SpeedTestResult { speed: 12.97 MB/s; elapsed: 1.396621156s; connection_time: 103.172203ms }
# SpeedTestResult { speed: 1.26 MB/s; elapsed: 1.327425885s; connection_time: 168.803158ms }
# SpeedTestResult { speed: 670.04 KB/s; elapsed: 1.286572029s; connection_time: 204.588049ms }
# SpeedTestResult { speed: 12.71 MB/s; elapsed: 1.347824757s; connection_time: 149.093535ms }
# ==== RESULTS (top re-tested) ====
#   1. SpeedTestResult { speed: 20.40 MB/s; elapsed: 1.31985743s; connection_time: 160.257424ms } -> http://mirror.ufscar.br/archlinux/$repo/os/$arch
#   2. SpeedTestResult { speed: 12.97 MB/s; elapsed: 1.396621156s; connection_time: 103.172203ms } -> http://br.mirror.archlinux-br.org/$repo/os/$arch
#   3. SpeedTestResult { speed: 12.71 MB/s; elapsed: 1.347824757s; connection_time: 149.093535ms } -> http://archlinux.c3sl.ufpr.br/$repo/os/$arch
#   4. SpeedTestResult { speed: 1.26 MB/s; elapsed: 1.327425885s; connection_time: 168.803158ms } -> http://archlinux.pop-es.rnp.br/$repo/os/$arch
#   5. SpeedTestResult { speed: 670.04 KB/s; elapsed: 1.286572029s; connection_time: 204.588049ms } -> http://mirror.ufam.edu.br/archlinux/$repo/os/$arch
#   6. SpeedTestResult { speed: 116.29 KB/s; elapsed: 1.038307777s; connection_time: 391.465037ms } -> http://linorg.usp.br/archlinux/$repo/os/$arch
# FINISHED AT: 2022-05-17 12:28:47.213625410 -03:00
Server = http://mirror.ufscar.br/archlinux/$repo/os/$repo/os/$arch
Server = http://br.mirror.archlinux-br.org/$repo/os/$repo/os/$arch
Server = http://archlinux.c3sl.ufpr.br/$repo/os/$repo/os/$arch
Server = http://archlinux.pop-es.rnp.br/$repo/os/$repo/os/$arch
Server = http://mirror.ufam.edu.br/archlinux/$repo/os/$repo/os/$arch
Server = http://linorg.usp.br/archlinux/$repo/os/$repo/os/$arch

The results have "[...]$repo/os/$repo/os/$arch" in the end.

Thanks.

@westandskif
Copy link
Owner

hi @arthurflor23
Thank you for you kind words and for reporting this -- it is a bug for sure!
I've fixed it in CHANGELOG -> v0.9.3

@arthurflor23
Copy link
Author

Thanks and again, nice work! :)

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