Robert Collins wrote: > On Sun, 2003-03-09 at 07:41, Max Bowsher wrote: >> I traced it to this curious condition: >> >> pkg.desired.sourcePackage() == false && >> pkg.desired.sourcePackage().picked() == true >> >> How? Well, it turns out that the defaultversion placeholder object >> used, amongst other circumstances, when a package is has no source >> package, is returning *true* to picked()! >> >> Robert, how do you think this should be fixed? > > Offhand, without referencing the source - make the defaultversion > return false to picked().
Not that simple, unfortunately. defaultversion is a _defaultversion, which derives from _packageversion. In this, picked is a member variable. The picked() method is in packageversion, which wraps a _packageversion, which may be a _defaultversion (but the only _defaultversion is defaultversion). So _defaultversion has no control over what the wrapping packageversion does with its data members. Have I successfully conveyed the confusing complexity of this code? :-) Max.
