[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: apt-get improvement idea



The first solution that comes to my mind is if some mirror fails (say
404 of HTTP), I recreate the mirrors list (by rewinding Vf?) removing
(maybe marking) the failed mirror. Then I'll select randomly again
using the same QueueNext.
I'm totally new to APT code, so I can't say if that's an optimal
solution, or even a good one. Please discuss it, and if that's OK,
tell me to implement that.

On Mon, Jun 28, 2010 at 2:52 PM, David Kalnischkies
<kalnischkies+debian@gmail.com> wrote:
>
> 2010/6/25 Mohammad Ebrahim Mohammadi Panah <ebrahim@mohammadi.ir>:
> > Simplest solution = Random: Choose randomly between available sources
> > for the package, and pray for your random generator! After all your
> > random generator doesn't always return 0, so it is still an
> > improvement over current situation. (I doubt the round-robin solution
> > is much better than this random solution.)
>
> What do you do if your first try doesn't work for whatever reason
> (connection timeout, 404, …)? *
> Currently your patch breaks APT in this case, as it can't query
> another source as APT thinks it has tried every possible source
> (variable Vf).
>
> How do you want to choose the next mirror to try?
> Sit their and pray that Mr. Random will choose a different mirror for
> the second try? Your random generator can return the same number
> four-hundred times in a row and will still be equally distributed
> (in the long run)… (If you could predict that it will never happen or
> that it is "unlikely" it wouldn't be random)…
> (under the assumption that a pseudo random generator can be
> equally distributed).
>
>
> Beside that a patch should still be written against the branch i pointed
> you to - currently your patch doesn't even apply without failure.
> (Okay, the conflict is simple to fix, but merge could be also painless)
>
>
> Best regards,
>
> David Kalnischkies
>
> * You can easily test this yourself by adding two mirrors to your source
> and insert in your /etc/hosts "127.0.0.1 your.second.mirror.org".


Reply to: