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

Re: apt-get improvement idea



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: