-
-
Notifications
You must be signed in to change notification settings - Fork 491
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
sage-update selects a suiteable mirror #6612
Comments
comment:2
sidenote to all spkg maintainers for clarification: mirroring the spkgs means that the current main repository of spkgs is essentially no longer used once this patch goes in. you have to push changes to any (standard) spkgs to the mirrors. that's the same procedure as with a new release and should be done in sync! testing is still possible by providing the url to the sagemath.org website, but it does not automatically work as it did until now! optional packages are not mirrored and also not covered by this patch, they are still located at the master server and this patch shouldn't mess around with them. |
comment:3
The patch should contain your username and a sensible commit message. |
enables sage -update to select a suiteable mirror from the sage mirror network |
comment:4
Attachment: 6612-sage-update-mirror-network-r0.diff.gz I received the following errors after patching
|
comment:5
This error is just the same for all threads, that's why it looks scary. The problem is, that you are running python 2.5 and it doesn't have a method to get the return code for a url request in "urllib". (addinfourl instance has no attribute 'getcode') ... e.g. getcode should not be "404" (indicating a missing webpage) and so on! Does anyone know how to circumvent this? I'm using python 2.6, that's why it works for me. Additionally, even through there are exceptions, the whole process works fine as you can see at the bottom. Those exceptions are just ignored and upgrading would work as usual. |
comment:6
more importantly, could you try to upgrade using a manually specified mirror? i.e. |
comment:7
Replying to @haraldschilly:
OK that worked. Hmm... The coding style in the patch doesn't conform to coding conventions mentioned in the Developers' Guide. In particular, use 4 spaces for indentation. This ticket will have to wait for Sage 4.1.2. |
comment:8
I got the following errors when upgrading from Sage 4.1.1.alpha0 to Sage 4.1.1:
The upgraded version doesn't even start properly:
|
comment:9
Replying to @sagetrac-mvngu:
Your version info banner is corrupted and i guess you cannot upgrade from a pre release to a release due to such collissions. you have to resolve all of them first. I just upgraded from 4.1 to 4.1.1 using the czech cvut.cz mirror. It worked fine! |
comment:10
Replying to @haraldschilly:
Hmm... I guess we need to document that in the update script. Essentially, the update script is for updating from one previous stable release to another new stable release.
It worked fine for me too. I upgraded Sage 4.1 under Gentoo (running within VirtualBox) to Sage 4.1.1 using your patch. It went OK. Before I went home, I started the doctest suite and started to upgrade 4.1 under the Ubuntu host. Seems like I need to wait another few hours before I can check up on those updates/doctests on the computer in my office. One of my pet peeves at the moment is that the patch doesn't conform to coding conventions. Another thing is that, when I use that patch to upgrade from my office computer, the patch would randomly choose a mirror from a list of the top three mirrors. That is OK as far as I'm concerned. An enhancement would be to allow the user to choose a mirror from one of the top three. My reason is that, say I upgrade from my office computer. That computer is located within a university network. At least over here in Australia, it is usually faster for me to upgrade from one of the Australian mirrors (preferably the Sydney Uni mirror) than from another any other mirrors. Apart from the above rantings, I need to spend some quality time investigating each line of the patch. |
comment:11
Replying to @sagetrac-mvngu:
The history behind that is, that
yes, i'll change that, no problem.
That's a good point for your situation. I can enhance it by a litte menu, where you either hit "return" and you get the random-top-3 or you enter a number to select one from all of the mirrors. That shouldn't be too hard. |
Attachment: 6612-sage-update-mirror-network-r1.patch.gz enables sage -update to select a suiteable mirror from the sage mirror network,updated patch |
comment:12
first patch can be deleted, "-r1" contains everything including the optional manual mirror selection. My tests show that it asks two times, but the second one is only an assurance and well, shouldn't be a problem. |
complete patch |
comment:13
Attachment: 6612-sage-update-mirror-network-r2.patch.gz patches besides "-r2" can be deleted. now, it selects the "best" mirror automatically, uses the given one if there is any and asks the user which one to use if given url is "ask". additionally, this is documented in "sage-sage". and i know, line indentations are wrong, but the file has "5" by default but sage policy is 4. |
reviewer patch |
comment:14
Attachment: trac_6612-reviewer.patch.gz The two patches
If my patch gets some thumbs up, then the whole ticket can be merged for Sage 4.1.2. |
comment:15
ok, thank's for fixing this and the reviewer patch looks good for me. also checking spelling in other parts of that file. ... and i once again forgot to combine my patches, so, only r0 is to ignore, it's r1 and r2 as you have noted. |
Reviewer: Minh Van Nguyen |
Merged: Sage 4.1.2.rc0 |
Author: Harald Schilly |
comment:16
Merged patches in the script repository in this order:
|
This is an enhancement to sage-update, that's triggerd by
sage -upgrade
. It downloads a list of available and up-to-date Sage mirrors, uses some heuristics to select a new one, and uses that instead of the default. This should further distribute the server load across the mirror network and speed up downloads. >> see sage-devel discussionThings to test:
Component: distribution
Author: Harald Schilly
Reviewer: Minh Van Nguyen
Merged: Sage 4.1.2.rc0
Issue created by migration from https://trac.sagemath.org/ticket/6612
The text was updated successfully, but these errors were encountered: