[Soc-coordination] Aptitude search ranking and other improvement

Daniel Burrows dburrows at debian.org
Mon Mar 23 17:44:06 UTC 2009

On Sun, Mar 22, 2009 at 12:52:20PM +0100, Federico <undicizeri at gmail.com> was heard to say:
> Hi all,
> I'm a 2nd year undergraduate student of computer science and I'm
> interested in Aptitude search ranking and presentation (
> http://wiki.debian.org/SummerOfCode2009/Aptitude_search_ranking_and_presentation
> ).
> I'm looking at Xapian web page and I noticed that Xapian doesn't offer
> C++ bindings, so in what language the search algorithm will be
> implemented in aptitude?

  The Xapian library is a C++ library.  No need for bindings.

> I have also a couple of proposals for a better (in my opinion) aptitude:
> 1. I don't understand the aptitude Score system, I can imagine that a
> negative score is bad and a positive one is good but it a mess... For
> example -44 is so bad? And what about -1200? +10 is good? And what
> happen if I proceed the remove even if I've a score of -1000?
> I think the score system is very confusing for a first time user and
> not very helpful. Maybe we can improve it with a more consistent
> documentation and at least a scale for the Score system, in this
> manner I know a solution with a score of 99/100 is far better than a
> 50/100 one.

  The score of an aptitude solution is an internal number used to guide
the resolver's search.  If you're not tweaking the resolver settings
you should ignore it.  Probably at some point I'll hide it so I stop
getting these questions. :-)

  If you're interested in working on the resolver, you'll want to read


  to get a basic overview of how it works and


  to be familiar with what I'm doing right now in this area.  (an AI
textbook that has chapters on search algorithms, SAT, and especially
constraint solving is also a good idea)  The proposal of a fractional
score is a good UI idea, but it doesn't fit well into how the dependency
resolver works; the "tiers" I suggest in that mail are an alternative
that's more practical (and mostly implemented now).

> 2. I think is very useful to revert to a pure debian system automatically.
> For example if someone is using an unofficial repository with newer
> package it will be very useful to have aptitude automatically remove
> these third party packages and reinstall official debian version if
> the unofficial repo is removed from source.list. Maybe this won't be
> the default behaviour of aptitude but an user can force this by
> setting a variable in a config file or using a special keyword like
> aptitude revert.

  Should be possible by adjusting version priorities so that anything
with a Debian origin has priority 1001 and everything else has priority 50.
It's an interesting idea to have a feature that does this, but it's more
a week-of-code project than a summer-of-code project ;-).


More information about the Soc-coordination mailing list