[Aptitude-devel] Aptitude History Tracking progress report, Week 6

Daniel Burrows dburrows at debian.org
Thu Jul 9 14:56:30 UTC 2009


[CCs trimmed]

On Thu, Jul 09, 2009 at 12:19:02AM -0500, Cristian Porras <porrascristian at gmail.com> was heard to say:
> 2009/7/8 Daniel Burrows <dburrows at debian.org>:
> >  Hi, Christian.  It's nice to see that you've been making some real
> > progress.
> >
> > On Sat, Jul 04, 2009 at 11:32:46AM -0500, Cristian Porras <porrascristian at gmail.com> was heard to say:
> >> In b) I added command line support, thus having the ability to view
> >> history of a package as $ aptitude history [PACKAGE ...].
> >
> >  I notice that the code throws out attempts to view the history of
> > packages that don't currently exist.  It would probably be better to
> > move this test so that it only happens if a package has no history: the
> > user should be able to view the history of packages that no longer exist
> > in the archive.  And of course turn the error message into something
> > like "package %s does not exist and has no recorded history".
> 
> Hi
> 
> Everything seems very strange, I tested the code in my two computers
> and one of a friend and everything has worked well, except some of the
> things you said that I already knew.

  Ok, I'm glad to hear that.  We just need to figure out why nothing
works on my computer, then, and get things working a bit more robustly.
BTW, if you know that things don't work yet, you should include that in
your status reports.  That was the biggest thing that surprised me;
from reading your report I had the impression that everything was
working A-OK and you were moving on to new stuff.

> When I try to see the history of a package that does not exist I get
> the following:
>
> pollopolis at pollopolis:~/compiladito/bin$ sudo ./aptitude history
> xmoto3333
> E: No se pudo localizar el paquete xmoto3333
> 
> It couldn't be found as I expected

  Just to be clear, what I'm talking about is, e.g., the case where
you installed xmoto3333, then you removed it, then it was removed from
the Debian archive.  It will still exist in the history database, but
not in the apt database, so the "history" command won't find it.

  The high-level logic (IMO) should be:

  (1) Does this package have history?  (i.e., is the result of SELECT
      non-empty?)
    (1.a)  If yes, display it.
    (1.b)  If no, then is it known to apt?
        (1.b.i)  If yes, then exit successfully.
        (1.b.ii) If no, then print an error and exit.

> I have marked several changes from the command line and from the GUI,
> from both sides I am writing the right entries in history. When I view
> the changes from console I have no problem:

  OK, my thought about COMMIT statements yesterday was a wrong
conclusion that I leapt to; sorry about that.  In fact, SQLite has
autocommit on by default, so in theory everything should work.  Sorry
about that.

  It looks to me like the culprit is the code that munges the history
database in save_selection_list.  It never finds something whose dpkg
state has changed, so it always cancels any attempt to create history
entries.  As I said, I don't really see what the purpose of this code
is; I tried pulling it out in my tree, and now I can get entries for
packages that I install:

Package: abook
	Date: 07  9 2009 07:42:25
	[install] installed 0.6.0~pre2-1 -> installed 0.6.0~pre2-1
	Reason: select

  Patch attached, to hopefully make it clear what I meant.  I don't
know if this is right, because I'm not clear on what this code is
supposed to be doing.

> >  I also got a crash when there was no history database at all, but I
> > don't know if that is the same problem or something separate.
> 
> I have to make this exception :P

  I think that this was a red herring.  The code clearly is set up to
create a database if none exists, and it seems to be handling the case
where there is no database and it can't create one.  So it was just the
same crash I was getting in other cases.

> I travel to obtain the response of the visa application and It was
> refused. 	Today I presented the application for reconsideration and
> I'm expecting the final answer, but I see it difficult to get the visa
> approved. I lost my first 500 USD :(

  That sucks. :-(

  Daniel
-------------- next part --------------
A non-text attachment was scrubbed...
Name: aptitude-dont-suppress-history.patch
Type: text/x-diff
Size: 1770 bytes
Desc: not available
URL: <http://lists.alioth.debian.org/pipermail/aptitude-devel/attachments/20090709/9cf2c5d6/attachment.patch>


More information about the Aptitude-devel mailing list