- Status Closed
- Percent Complete
- Task Type Bug Report
- Category Packages → Packages: Stable
-
Assigned To
Erich Eckner - Operating System i686
- Severity Very Low
- Priority Very Low
- Reported Version
- Due in Version Undecided
-
Due Date
Undecided
- Votes
- Private
Opened by Levi - 26.07.2018
Last edited by Erich Eckner - 27.07.2018
FS#47 - rankmirrors $repo guessing broken in i686 only
I usually use rankmirrors on my mirrorlist prior to installing them fully to sort them such that the quickest mirrors are listed first.
I found that when using them to sort my mirrorlist.pacnew, it would claim each server target was unreachable, and reproduce them in their original order, making the tool rather useless.
Workaround
I also discovered that I can work around the problem by passing an argument of ‘-r core’ to the invocation, e.g. ‘$ rankmirrors -r core /etc/pacman.d/mirrorlist.pacnew > mirrorlist.temp’
Steps to reproduce
- rankmirrors -t /etc/pacman.d/mirrorlist.pacnew
This -t option prints out the timings, or unreachable if it failed to create a valid uri.
Investigation
My investigations thus far show that /usr/bin/rankmirrors is a bash script, and it looks like the if statement starting on line 79 in the current version (the first if statement in the getfetchurl function) is designed to replace the $repo string with whatever $TARGETREPO is, else ‘core’ which suggests it should work by default.
The only consistent difference in the format of the mirrorlist file between here and on my x64 machine (where rankmirrors continues to work fine) is that on x64 the repos almost all have /os before /$repo while we often have it at the root of the public filesystem, or under something other than /os.
Unfortunately the vagaries of bash string substitution are something I
rarely touch and never touch again provided they continue to work, so I
can’t guess why this would have stopped working for us. If I have time
to dig further I’ll comment here though, of course.
27.07.2018 04:22
Reason for closing: Fixed
Additional comments about closing:
note, that this deliberately does not
work with upstream's mirror layout
ok, I just checked - with my mirrorlist, it works (this is not the default mirrorlist) - so I suspect, it breaks due to our format of the urls ($root/$arch/$repo instead of $root/$repo/os/$arch) - I'll look into this
I think, I fixed it - let's see if it "compiles" and runs