The objectives of this project can be summarized in five topics.

  1. Insert a function to verify the correctness of the ordered list (dependency checking).
  2. Add regression tests with various known configurations to test the new (and old) code
  3. Create other types of ordering according to various constraints.
  4. Divide the ordered list in independent lists that can be processed in parallel (probably use the idea of graphs).
  5. Create a way to parallelize the installation process. (using independent list created in step 2).

The objectives 4 and 5 are optional objectives. This means that they are going to be done if the time was sufficient because these improvements possibly are going to request big changes in other other classes of libapt. If the time was not sufficient to conclude all the objectives, after the GSoC period I will keep working on them.


The libapt is an important part of the Debian package manager. The ordering code is essencial do guarantees that packages are going to be installed in the right order.



Project details

Small introduction

The libapt have three main classes related with the apt ordering process represented by the files:

It is important to observe that all the operations in the ordering process happen over the cache and after the process they are written on disk. First the cache is ordered, then dpkg is called in the right order to commit the changes to disk. The cache class is defined in the pkgcache.{h,cc} and depcache.{h,cc} files.

Some important definitions of the Debian policy:

Main Objectives and possible solutions

1   bool VerifyFunction() {
2      for each package A from the ordered list {
3         for each package B that is a pre-dependency of A {
4            if unpack_B and configure_B isn't before configure_A in the order list return false
5         }
6         for each package B that is a dependency of A {
7            if unpack_B isn't before configure_A in the order list return false
8         }
9         if unpack_A isn't before configure_A in the order list return false
10        for each package B that is installed or in the order list {
11           if B conflicts with A return false
12        }
13     } 
14  }

Line 9 tries to solve a bugreport (https://bugs.launchpad.net/ubuntu/+source/apt/+bug/291482).





: Do you have plans for Debian after the summer ? I am not a Debian Developer yet, but I got very interested on it while I was studying the code and discussing ideas with the mentor. I discover that we may do very good things while working on our normal jobs (or university in my case). I really want to keep the work on the apt code after the GSoC even if my proposal were not choose, I will try to work on it.


* Are you applying for other projects in SoC?