[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Bug#60488: internal error with --reinstall; analysis and possible strategy



On Wed, 15 Mar 2000 james@netcsi.com wrote:

>   13) Then it decides that the version it's looking at is not
>       worth bothering over because it meets the following 3
>       conditions:
>         the package is marked keep()
>         it's all set up and doesn't need anything done
>         it's the target version (not necessary but doesn't
>           stop it given the other two)
>       This is in a branch marked 'not the install version'.
>       I find this rather odd, maybe the bug is actually
>       here?

Oh, this sounds about right. The trouble is that there is all these
complex little tests (that all test for something different sadly) that
are sprinkled around the code and when you go and add a new feature like
reinstall you have to re-evaluate every condition and see if it needs
updating..

This one got missed apparently.

The trouble would appear to be that it installs debian utils, which
naturally makes IsNow('debian-utils') == false and my bet is that since 
Cache['debian-utils'].keep == true the critical test 'not the install
version' does the continue. 

The Keep == true && pkg.state() thing is designed to take care of kept but
broken packages. It would be safe to throw in a 'and if not reinstall
test' to make the problem go away away.

There seems to be something entirely wrong with this little loop anyhow..
it should ignore versions other than current/install.

> IsNow() you can see it returns a somewhat arbitrary nonzero
> number for true.  Seems though that in C++ or the dialect of it

My version has IsNow returning the result of == 0 which in C++ is a boolen
result.

> that apt uses the type 'bool' has '==' overridden to compare truth

As far as syntax goes bool acts just like int and true = 1 false = 0.

Jason


Reply to: