Looking at Package Management for Karmic or Karmic+1

Derek Broughton derek at pointerstop.ca
Thu Apr 2 13:29:05 UTC 2009

Martin Olsson wrote:

> Mackenzie Morgan wrote:
>> If you download and install everything that has 0 dependencies first,
>> then the ones that depend on those things, and on up the tree, it could
>> be doable. Except for cyclical dependencies. For those, you'd need to get
>> both downloaded before running dpkg on them.
> Downloading everything with 0 dependencies first would be better than
> today but far from optimal. The algorithm should focus on keeping both the
> network and the CPU/HDD at the highest possible utilization rate at all
> times.
> Another way would be an algorithm that considered the total number of
> bytes that needs to be downloaded for each package (the DEB itself plus
> all dependent DEBs) and then start with the one that has the least total
> size. This way you can start the installation as fast as possible.

Not bad, but I would intuitively suspect that means you'd end up getting all
the small stuff installed quickly and then wait for the big stuff.  Perhaps
what you really need to do is start with parallel gets for the largest
0-dependency file and the smallest.  Keep taking the next largest or
smallest as each pipe becomes available, and after downloading _each_ file,
recalculate whether any other package's dependencies have been met.

More information about the Ubuntu-devel-discuss mailing list