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

Re: Bug in LOAD-PATCHES (and hence LOAD-SYSTEM) affecting using 7.1 and 7.0



I have tracked things down a little better:

If you load a >>PATCHABLE<< system with :VERSION :NEWEST, then you get
the problem.

The reason is that LOAD-SYSTEM calls SCT:SYSTEM-PATCHABLE on the system to see
if it is patchable.  If so, it calls LOAD-PATCHES on it.  Inside there, it
calls SCT:GET-PATCHABLE-SYSTEM-NAMED on the system.  That in turn calls
SCT:SYSTEM-PATCHABLE (which again returns T) and then SCT:SYSTEM-LOADED-VERSION
(which returns :NEWEST) and then SCT:SYSTEM-LOADED-PATCHES which return NIL
and so SCT:GET-PATCHABLE-SYSTEM-NAMED returns NIL.

It is at that point that I claim LOAD-PATCHES errs since it then calls
SCT:PATCH-SYSTEMS-LIST on NIL.  That causes the loading of patches for all
patchable systems.  I claim that LOAD-PATCHES should not call 
SCT:PATCH-SYSTEMS-LIST on NIL unless its own input was NIL.


(One of the things that caused this to be confusing was that apparently
between 6.1 and 7.0 the default behavior changed when you don't declare
whether a system is patchable or not.   People had their own systems
defined to load their own sets of files to customize their environment
and were using them as non-patchable systems.  A quick change of the
DEFSYSTEM form left the PATCHABLE option at its new, changed default value.
But their call to load-system (again it was changed rather syntacticly)
still had (as they intend) :VERSION :NEWEST.)


A temporary patch for us:

(advise LOAD-PATCHES :around sri-bug-fix nil
  (let ((systems (first arglist)))
    (when (not (listp systems)) (setq systems (list systems)))
    (if (loop for sys in systems
	      thereis (sct::get-patchable-system-named sys))
	:do-it					;If at least one patchable system, then load the patches
	nil)))					;Else don't try to as it loads all patches