[Soc-coordination] Aptitude History Tracking progress report, Week 2
porrascristian at gmail.com
Fri Jun 5 23:17:31 UTC 2009
The first important task when one wants to carry out a historical
study of the behavior of a system is to determine what information you
want to store and how this is going to be saved, thinking of providing
an easy way to access information when needed.
In our case, we need to store the information of the packages status
and the actions that have been made to them. For now I have confronted
the aptitude state and the dpkg state.
We use the state of dpkg to see the changes that other applications
(Apt, Synaptic, Adept, etc..) can perform on the packets.
To see the changes we rely on the pkgstates file (which contains some
information about the last state that was seen by aptitude) and the
routine build_selection_list, comparing what is in the apt cache and
what is stored in pkgstates.
So the first task was to create routines to save in each member of the
history the information that can be collected from pkgstates and the
cache, which really is not much. This process is accompanied by the
function to write in the text log and the binary database. I believe
that work it's around 70-75%, missing optimization and definitions of
I have been working this week on the aptitude state , creating a
vector of entries which is storing the information collected from the
state's changes through the functions cleanup_after_change,
apply_solution and build_selection_list from aptitudeDepCache, calling
on the last function to the routine that writes the whole vector of
changes made so far in the text log and the database, I think this
work is located at 50%.
Plan for next weeks:
For the dpkg state, optimize the functions and add to the info of each
package the date when it changed. Maybe based on /var/log/dpkg.log
For the Aptitude state, finishing collecting the information about
changes. For example the dep that trigger a change, groups of packets
that share the same reason of change. Look at other relevant
information that could be included for the trace of each package.
Change the structure of the database to include information that is
Open a separate branch in the repository of aptitude, looking for a
more fluid feedback.
Cristian Porras - http://cristianporras.wordpress.com
Comunidad Universitaria de Software Libre, Cusol UIS -
More information about the Soc-coordination