Skip to content

add mirror source switching functionality during slow database sync#4376

Open
xhdndmm wants to merge 4 commits intoarchlinux:masterfrom
xhdndmm:master
Open

add mirror source switching functionality during slow database sync#4376
xhdndmm wants to merge 4 commits intoarchlinux:masterfrom
xhdndmm:master

Conversation

@xhdndmm
Copy link
Copy Markdown

@xhdndmm xhdndmm commented Apr 5, 2026

  • This fix issue:

PR Description:

add mirror source switching functionality during slow database sync

When the mirror is slow , use the TUI to switch to a new mirror

Tests and Checks

  • I have tested the code!

@xhdndmm xhdndmm requested a review from Torxed as a code owner April 5, 2026 22:31
@svartkanin
Copy link
Copy Markdown
Collaborator

Can you add a explanation and description for this PR.
Also this usrs input and not the TUI menu.

@xhdndmm
Copy link
Copy Markdown
Author

xhdndmm commented Apr 7, 2026

Can you add a explanation and description for this PR. Also this usrs input and not the TUI menu.

okay

@svartkanin
Copy link
Copy Markdown
Collaborator

In addition, this should not be in the main.py

@xhdndmm
Copy link
Copy Markdown
Author

xhdndmm commented Apr 7, 2026

In addition, this should not be in the main.py

So do I need to make some changes?

@svartkanin
Copy link
Copy Markdown
Collaborator

The tui should not get included into the main.py, so I would suggest to extract all that functionality out of the main

@xhdndmm
Copy link
Copy Markdown
Author

xhdndmm commented Apr 7, 2026

The tui should not get included into the main.py, so I would suggest to extract all that functionality out of the main

Okay, I changed it.

@svartkanin
Copy link
Copy Markdown
Collaborator

svartkanin commented Apr 11, 2026

This is still using

		return input(prompt).strip().lower() in ('y', 'yes', '')

also why was the check_online moved?

If you're just using an LLM, please don't as these PRs are on the very bottom of my priority list.

@xhdndmm
Copy link
Copy Markdown
Author

xhdndmm commented Apr 11, 2026

This is still using

		return input(prompt).strip().lower() in ('y', 'yes', '')

also why was the check_online moved?

If you're just using an LLM, please don't as these PRs are on the very bottom of my priority list.

okay, I'll check them, sorry

@xhdndmm
Copy link
Copy Markdown
Author

xhdndmm commented Apr 11, 2026

I fixed it, and now can use tui to switch

@svartkanin
Copy link
Copy Markdown
Collaborator

Can you explain what problem you're actually trying to solve here?
I just run the code I was prompted after a 2 second delay if I want to switch mirrors which doesn't make sese.

The retry parameter is always set to false so there's no point in that. Also even if pacman -Sy succeeds it will still prompt for a mirror selection just because it was slow? Then why do we need this special menu hook instead of the user just doing it right in the global menu as the is shown right after?

@xhdndmm
Copy link
Copy Markdown
Author

xhdndmm commented Apr 14, 2026

In some cases, mirror sites are very slow. I want to solve this by allowing users to switch to a different mirror site.

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

Successfully merging this pull request may close these issues.

2 participants