621 s cr. |
621 s cr. |
622 ]. |
622 ]. |
623 ]. |
623 ]. |
624 |
624 |
625 self searchForClasses do:[:eachClass | |
625 self searchForClasses do:[:eachClass | |
626 |attributes oldSpecEntry| |
626 |attributes oldSpecEntry oldAttributes| |
627 |
627 |
628 oldSpecEntry := oldSpec detect:[:entry | entry = eachClass name or:[entry first = eachClass name]] ifNone:nil. |
628 oldSpecEntry := oldSpec detect:[:entry | entry = eachClass name or:[entry first = eachClass name]] ifNone:nil. |
629 |
629 |
630 (ignoreOldEntries or:[ oldSpecEntry isNil]) ifTrue:[ |
630 (ignoreOldEntries or:[ oldSpecEntry isNil]) ifTrue:[ |
631 (eachClass isLoaded not or:[eachClass isPrivate not]) ifTrue:[ |
631 (eachClass isLoaded not or:[eachClass isPrivate not]) ifTrue:[ |
632 (self additionalClassNamesAndAttributes includes:eachClass name) ifFalse:[ |
632 (self additionalClassNamesAndAttributes includes:eachClass name) ifFalse:[ |
|
633 (oldSpecEntry isArray and:[oldSpecEntry size > 1]) ifTrue:[ |
|
634 oldAttributes := oldSpecEntry copyFrom:2. |
|
635 ]. |
|
636 |
633 ignoreOldDefinition ifTrue:[ |
637 ignoreOldDefinition ifTrue:[ |
634 "take autoload attribute from classes state in the image" |
638 "take autoload attribute from classes state in the image" |
635 oldSpecEntry notNil ifTrue:[ |
639 oldAttributes notNil ifTrue:[ |
636 attributes := oldSpecEntry copyFrom:2. |
640 attributes := oldAttributes copyWithout:#autoload. |
637 attributes := attributes copyWithout:#autoload. |
|
638 ] ifFalse:[ |
641 ] ifFalse:[ |
639 attributes := #() |
642 attributes := #() |
640 ]. |
643 ]. |
641 eachClass isLoaded ifFalse:[ |
644 eachClass isLoaded ifFalse:[ |
642 attributes := attributes copyWith:#autoload. |
645 attributes := attributes copyWith:#autoload. |
643 ]. |
646 ]. |
644 ] ifFalse:[ |
647 ] ifFalse:[ |
645 "keep any existing attribute" |
648 "keep any existing attribute" |
646 oldSpecEntry notNil ifTrue:[ |
649 oldAttributes notNil ifTrue:[ |
647 attributes := oldSpecEntry copyFrom:2. |
650 attributes := oldAttributes. |
648 ] ifFalse:[ |
651 ] ifFalse:[ |
649 attributes := eachClass isLoaded ifTrue:[ #() ] ifFalse:[ #(autoload) ]. |
652 attributes := eachClass isLoaded ifTrue:[ #() ] ifFalse:[ #(autoload) ]. |
650 ]. |
653 ]. |
651 ]. |
654 ]. |
652 |
655 |