Merge lp://qastaging/~bzoltan/click/vivid-transition_mirrors into lp://qastaging/ubuntu/vivid-proposed/click

Proposed by Zoltan Balogh
Status: Merged
Merge reported by: Michael Vogt
Merged at revision: not available
Proposed branch: lp://qastaging/~bzoltan/click/vivid-transition_mirrors
Merge into: lp://qastaging/ubuntu/vivid-proposed/click
Diff against target: 100 lines (+28/-5)
2 files modified
click/chroot.py (+26/-3)
debian/control (+2/-2)
To merge this branch: bzr merge lp://qastaging/~bzoltan/click/vivid-transition_mirrors
Reviewer Review Type Date Requested Status
Michael Vogt (community) Approve
Review via email: mp+246913@code.qastaging.launchpad.net

Commit message

Transition of locally used mirror servers to the chroots.

Description of the change

Transition of locally used mirror servers to the chroots.

To post a comment you must log in.
Revision history for this message
Zoltan Balogh (bzoltan) wrote :

Some explanation on the MR:

I have chosen to use the local ports and archive mirror because other options seems to be less optimal:

a) There is a way to measure bandwidth to/from the apt's mirror support, but that give a geographically close mirror and not a mirror with a fast access

b) Measuring the bandwidth to mirrors and trying to find the most optimal would need way much more code and would be too complex for a fairly simple problem

I decided to use a strict and limited expression to find the locally used mirror. I accept only the /XX.archive.ubuntu.com $series main/ source line. In case I do not find the mirror the code falls back to the central archive what is a safe choice.

All in all, the job here is to make the Chinese app developer's life easy. I am sure that we can make a more generic and smarter solution to support Ubuntu mirrors, but this one I believe is safe and good enough for now. Also I think it is legit idea to use the same mirror in the chroots what is used on the SDK's host environment.

Revision history for this message
Rex Tsai (chihchun) wrote :

Feedback and summing-up of irc discussion

Ubuntu users are suggested to use [countrycode].archive.ubuntu.com, but most users will select a random mirror server from the software center config (software-properties) or intstaller. http://i.imgur.com/2EvQIrv.png It ends up the user will not have xx.archive.ubuntu.com in /etc/apt/sources.list as reference.

It would make more sense that user can pick a mirror server during the new `click root` setup
1. A dialogue for user to pick which mirror to use. [countrycode].[ports|archive].ubuntu.com
2. The dialogue should suggest the default or preferred mirror server for the user. software-properties use user's locale to guess where is the most close mirror site.

Please note only [countrycode].[ports|archive].ubuntu.com are guarantee up-to-date, the other mirror can delay for few weeks. So we only use [countrycode].[ports|archive].ubuntu.com for phone developer.

66. By Zoltan Balogh

Use the local archive mirror and figure out the ports mirror with geoip lookup

67. By Zoltan Balogh

remove redundant imports

68. By Zoltan Balogh

Use the official archive mirror

69. By Zoltan Balogh

Make it flake8 friendly

70. By Zoltan Balogh

remove unused local_mirror_server

71. By Zoltan Balogh

Handle exception when chroot is created without network and add dependecies

Revision history for this message
Michael Vogt (mvo) wrote :
review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
The diff is not available at this time. You can reload the page or download it.

Subscribers

People subscribed via source and target branches

to all changes: