-
Notifications
You must be signed in to change notification settings - Fork 158
termux-change-repo: make it possible to select a single mirror again #1
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
Conversation
|
Thanks for this. The relevant issue was termux/termux-packages#11091 (comment) I will test later, looks fine, other than missing
Weird, how slow? Also any reason why you didn't preserve history? |
On my old arm tablet it takes maybe 2 seconds, its noticeable.
Me being lazy. There are between 200 and 300 commits affecting these scripts, with various conflicts that would have to be resolved, I don't think that's something I want to spend time on right now anyways but can perhaps revisit it once I'm done with some of the other stuff I am doing at the moment |
XRecorder_31072022_180613.mp4Bug: If (This is the F-droid version of termux, I just added an |
I think it can be split into another file. |
|
Bug: [*] Mirror mirrors.pku.edu.cn.dpkg-new selected
[*] pkg --check-mirror update
Testing the available mirrors:
/data/data/com.termux/files/usr/bin/pkg: line 99: [: missing `]'
[*] (1) https://mirrors.pku.edu.cn/termux/termux-main/: ok
/data/data/com.termux/files/usr/bin/pkg: line 99: [: missing `]' Picking mirror: (0) /data/data/com.termux/files/usr/etc/termux/mirrors/china/mirrors.pku.edu.cn.dpkg-new |
Repeatedly select two ways, invalid when selecting a single mirror. |
814def1 to
974b3f0
Compare
Alright, the '[' issue was fixed at the same time as addressing @agnostic-apollo's comments. *.dpkg-new has been added as a pattern to ignore |
974b3f0 to
f10b24d
Compare
Yeah, agree, but can't think of a convenient way to sort the find output to make that happen |
f10b24d to
3be28ce
Compare
Add it manually after default and skip it in the loop. |
3be28ce to
6045ce7
Compare
Message is updated, works as it should when I test by subscribing to a dummy, non-existing mirror. Mirror order still has to be fixed |
|
I have pushed https://github.com/termux/termux-tools/tree/full-history with complete history. Had you just run following when creating repo, wouldn't have add to waste time cherry picking and rebasing... Alas... ;) Doesn't have any diffs from |
|
There was an empty patch issue while running |
|
Fixed branch at https://github.com/termux/termux-tools/tree/full-history-redo |
Thanks git sensei, several options there I am not familiar with! I went through your branch and removed all references to build.sh: https://github.com/termux/termux-tools/tree/full-history-redo-merge, giving 262 commits instead of 338. |
That is so not true! ;) But thanks!
Is there any specific reasons lesser commits would be better? The |
|
Yeah, my branch might need more cleaning and re-writing of commit messages to make sense. I'll go with your branch and force push over main so that we can start getting stuff into the new repo |
|
Great. Holler at me when everything is final and I'll test. Great work though overall! |
c0b704f to
da9cd0e
Compare
05d3600 to
5ebf385
Compare
For a mirror group, the symlink $PREFIX/etc/termux/chosen_mirrors point to a directory, while for a single mirror it points to a file. Distinguish between the cases in this way.
Since the mirrors are specified as conffiles apt might create .dpkg-new files as well as .dpkg-old.
5ebf385 to
28f89b8
Compare
|
Should be ready for testing again, mirror order has been fixed. Apart from slowness on single mirror selection I am rather happy with it |
|
I don't think 2d082e7 should be done since user may not have any Also can you update termux/termux-packages#11393 with this branch so that debs get built online. Thanks. Another thing I want implemented is a blacklisted mirrors list file that is hosted on fosshost and as fallback on github as well in case its inaccessible, and file possibly signed with our key. This should contain all the mirrors that must not be used or whose domains have been freed or url sub path changed, like An additional default mirror site file should also be hosted, that is used by the app to replace any blacklisted mirror from existing With the above, the blacklisted mirrors will be independent of whether users updates We could also download the files in What do you think? Or any better ideas. |
Try using a static page host like cloudflare pages, github pages, vercel, etc. Maybe we can learn |
|
Cloudflare is blocked in some countries, and our github pages was too.
It does have exclude mirrors support but not meant for apt. But could learn from it. Faster mirrors can have more weight. But a fast mirror does not always mean that it has more monthly bandwidth limit. We should instead have a single config file that's downloaded that contains all the data. |
~ $ pkg install libarrow-cpp-static
Testing the available mirrors:
[*] (1) https://mirrors.ustc.edu.cn/termux/apt/termux-main: bad
Error: None of the mirrors are accessible
~ $If mirror can't connect, do you want to test all mirrors/mirrors in a mirror group? |
I'll drop that.
User can, with these changes, keep their custom mirror in Ability to have a list of blacklisted mirrors is a very good idea, but lets do that in another PR, I'll fix this up and merge it so we can update main termux-tools package |
It's the longest description, shorten it to have something that looks slightly better on smaller screen.
28f89b8 to
ba4dec3
Compare
And verify that mirror weight is valid.
We discussed that this functionality should be re-added in a couple of PRs/issues that I can't find, so ping @2096779623 and @agnostic-apollo, I remember that you were participating in the discussion.
Here are screenshots of what the two screens look like:
If someone wants to try this out you can do it by running something like this in termux:
Some things that can be improved includes: