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

stable mirrorlist not created properly #21

Closed
oberon-manjaro opened this issue Feb 12, 2017 · 10 comments
Closed

stable mirrorlist not created properly #21

oberon-manjaro opened this issue Feb 12, 2017 · 10 comments
Labels

Comments

@oberon-manjaro
Copy link
Collaborator

There is a weird thing going on with mirrorlist when 'stable' is selected:
First I tried with setting OnlyCountry = Germany via 'Edit Pacman Mirror Configuration' and then used menu entry 'Rank Mirrors by Speed' with selection unstable. All is well like this.
When I do the same thing and select 'stable' this results in an empty list, why??

Next I removed the OnlyCountry entry and ran rankmirrors with stable again. This gives me a list of apparently the two slowest servers instead of what should be a very long list 😉 What's going on there?
Is this issue maybe pacman-mirrors related @Huluti ? the relevant code in aif can be found here

@Huluti
Copy link

Huluti commented Feb 13, 2017

Do you use the latest version (3.2.2)?

@fhdk
Copy link
Collaborator

fhdk commented Feb 18, 2017

Have a look at my 3.3-unstable branch

@Oberon2007

First I tried with setting OnlyCountry = Germany via 'Edit Pacman Mirror Configuration' and then used menu entry 'Rank Mirrors by Speed' with selection unstable. All is well like this.
When I do the same thing and select 'stable' this results in an empty list, why??

I will see if I can reproduce with the 3.3 branch

@oberon-manjaro
Copy link
Collaborator Author

the weird thing is that when I run what configure_mirrorlist() does outside the installer, all seems fine. But as soon as it runs inside I get this strange sorting behaviour.
I'll try if un-nesting rank_mirrors()rank_mirrors() makes any difference - I wouldn't no why, though 😉

@fhdk
Copy link
Collaborator

fhdk commented Feb 18, 2017

I am by no means a fox on shell scripting but I think a variable survives when your'e nesting the functions - you could try with local'aling your variable to keep them in scope.

I would try move this outside configure_mirrorlist()

Architect didn't have to deal with a branch variable and pacman-mirrors has implemented the new mirrors.json from repo.manjaro.org - so you will also have to rethink the country listing in your installer.

    rank_mirrors() {
        #Choose the branch for mirrorlist        
        BRANCH="/tmp/.branch"
        DIALOG "$_MirrorBranch" --radiolist " $_UseSpaceBar" 0 0 3 \
          "stable" "-" on \
          "testing" "-" off \
          "unstable" "-" off 2>${BRANCH}

        pacman-mirrors -gib $(cat ${BRANCH})
    }

@oberon-manjaro
Copy link
Collaborator Author

Currently country can only be chosen by editing the config. I have removed the original function, since the mt-live sets country with geoip.
I'm not sure what you mean with

I think a variable survives when your'e nesting them
I would move this outside configure_mirrorlist()

somehow there is one negation too much - or too little? 😉 😆 - in any case I was about to un-nest it anyway since we're now more in library mode :)
It does makes sense I think that the nesting would have caused the issue.

@fhdk
Copy link
Collaborator

fhdk commented Feb 18, 2017

I'm not sure what you mean with

I think a variable survives when your'e nesting them
I would move this outside configure_mirrorlist()

I have dived into the shell scripting thing yet.
Just brainstorming - just the thought that if a variable was set previously and you reenter - do you make an assumption or do you explicit reset? The first would be able to make a fuzz the second not.

@oberon-manjaro
Copy link
Collaborator Author

However, unnesting doesn't solve the issue. I've just tried.
How and where does pacman-mirrors remember the collected mirrors data before displaying the list for selection in the TUI?

@oberon-manjaro
Copy link
Collaborator Author

Why on earth is it only an issue with stable branch?? Can it have anything to do with it being the pre-selection? I'll try that next ... ;)

@fhdk
Copy link
Collaborator

fhdk commented Feb 18, 2017 via email

@oberon-manjaro
Copy link
Collaborator Author

Setting no default in dialog seems to do the trick. Seems to be working now.

oberon-manjaro pushed a commit that referenced this issue Feb 18, 2017
- also: do same logging and first of all create logfile properly first ;)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

4 participants