[squeak-dev] Re: About unloading of packages in the most recent Squeak 4.1 trunk

Hannes Hirzel hannes.hirzel at gmail.com
Mon Aug 30 14:05:24 UTC 2010


Thank you for your explanations, Bert. I now have a more complete view
how the update process works. In particular noteworthy is the fact
that we could have more than one in the future.

I was able to spot the configuration map in the trunk. The map is
called  'update-...mcm" and contains the load order of the packages
(see below).

I found a method #unloadablePackages in  the ScriptLoader class.

^ #('OmniBrowser' 'PlusTools' 'Flash' 'FFI' 'StarSqueak' 'Speech'
'Movie' 'FlexibleVocabularies' '39Deprecated' '39Deprecated'
'PreferenceBrowser' 'ReleaseBuilder'
	'SUnitUI' 'Protocols' 'Sounds')


Within the code of #unloadAllKnownPackages  (class SmalltalkImage)
we have
#(	'ReleaseBuilder' 'ScriptLoader'
		'311Deprecated' '39Deprecated'
		'Universes' 'SMLoader' 'SMBase' 'Installer-Core'
		'VersionNumberTests' 'VersionNumber'
		'Services-Base' 'PreferenceBrowser' 'Nebraska'
		'ToolBuilder-MVC' 'ST80'
		'CollectionsTests' 'GraphicsTests' 'KernelTests'  'MorphicTests'
		'MultilingualTests' 'NetworkTests' 'ToolsTests' 'TraitsTests'
		'SystemChangeNotification-Tests' 'FlexibleVocabularies'
		'EToys' 'Protocols' 'XML-Parser' 'Tests' 'SUnitGUI'

There is some overlap here. Is the class ScriptLoader still used?
Otherwise I would say it should be deleted to avoid confusion. It is
just one class in a package of it's own and the comment says that
ScriptLoader  is a dummy class.

--Hannes


--------------------------------------------------------------------------------------------------------------------------------

update-nice.150.mcm  (the current version of the configuration map)

Squeak-Version-ar.4662
311Deprecated-nice.2
39Deprecated-ar.19
Balloon-ar.16
Collections-nice.370
CollectionsTests-nice.170
Compression-ar.20
Monticello-ar.397
Kernel-nice.482
Compiler-nice.170
EToys-nice.73
Exceptions-sn.29
Files-ar.83
FlexibleVocabularies-ar.12
Graphics-nice.147
GraphicsTests-nice.26
Installer-Core-nice.339
KernelTests-nice.157
MonticelloConfigurations-dtl.77
System-nice.359
Morphic-eem.460
Multilingual-nice.125
MorphicExtras-nice.91
MorphicTests-ar.17
MultilingualTests-HenrikSperreJohansen.10
Nebraska-nice.31
Network-ar.78
NetworkTests-ar.17
PackageInfo-Base-ar.43
PreferenceBrowser-ar.46
Protocols-nice.31
SMBase-nice.112
SMLoader-ar.59
ST80-eem.117
SUnit-ar.80
SUnitGUI-ar.49
ScriptLoader-nice.332
Services-Base-ar.45
Sound-nice.21
SystemChangeNotification-Tests-bp.11
Tests-eem.90
ToolBuilder-Kernel-eem.36
ToolBuilder-MVC-dtl.20
ToolBuilder-Morphic-ar.66
ToolBuilder-SUnit-nice.14
Tools-nice.261
ToolsTests-tbn.5
Traits-nice.285
TraitsTests-ar.9
TrueType-nice.15
Universes-nice.45
VersionNumber-ar.2
XML-Parser-ar.32
ReleaseBuilder-nice.50
ShoutCore-laza.19
VersionNumberTests-nice.3
HelpSystem-Core-tbn.49
HelpSystem-Tests-tbn.12
Help-Squeak-Project-it.5


The Utilities class does the actual update

Utilities updateFromServer.

This is called by the menu entry.


On 8/27/10, Bert Freudenberg <bert at freudenbergs.de> wrote:
>
> On 27.08.2010, at 19:26, Hannes Hirzel wrote:
>
>> Bert,
>> Somebody (you, Bert?) updated the class comment of MCMcmUpdater  one
>> or two day ago.
>
> It was Chris, I just committed his package to Trunk.
>
>> It is now more comprehensive and answers many of the
>> question. However some new come up. See below.
>>
>> --Hannes
>>
>> On 8/26/10, Bert Freudenberg <bert at freudenbergs.de> wrote:
>>>
>>> On 26.08.2010, at 08:13, Hannes Hirzel wrote:
>>>
>> .....
>>>> 2) Which object is meant here by 'configuration map'?
>>>
>>> The update configuration loaded from the repository (e.g.
>>> "update-xy.42.mcm")
>>
>> Could you give an actual example of a configuration map with packages
>> in the unloaded packages list? (I.e name config map xy uses packages
>> p1, p2, p3)
>
> Just open the trunk repo, scroll to the bottom in the left list, and click
> the "update" entry. There you see all the configs. Click "Browse" top open
> an mcconfig browser on any of them.
>
>> I assume  it is a file in the repository?
>
> Yes.
>
>> And loaded into the image is it an instance of MCConfiguration?
>
> Yes.
>
>> Is the Monticello Configuration browser used to create them?
>
> Yes.
>
>> Why do I not see any of the configuration maps there?
>
> Because they are in the repository. There is no config map in the image. It
> is only loaded from the repository when updating.
>
> - Bert -
>
>> ==================================
>> The current class comment of MCMcmUpdater
>> ==================================
>>
>>
>> MCMcmUpdater provides utility methods for updating Monticello packages
>> from Monticello configurations.
>>
>> When Monticello configurations are stored in a repository (or
>> repositories), MCMcmUpdater acts as an update stream. It first ensures
>> that each configuration map has been loaded in sequence, then updates
>> the last configuration map to the most recent version for each
>> specified package, and finally loads these versions to produce a fully
>> updated configuration.
>>
>> Currently if a set of packages are unloaded from the image, using this
>> class to reload them may cause problems, depending on what
>> dependencies those classes have.  Success is not assured.  Removing
>> packages via SmalltalkImage>>unloadAllKnownPackages will be
>> successful, it flags the packages removed so that they are not loaded
>> by this utility.
>>
>> If you wish to not have MCMcmUpdater update packages, there are two
>> ways to handle this:
>>
>> 1) To have MCMcmUpdater not update any packages not currently in the
>> image set the UpdateMissingPackages preference to false:
>> 		MCMcmUpdater updateMissingPackages: false
>> 	Note that any new packages added to the repositories will not be
>> picked up when this is turned off.
>> 2) To have MCMcmUpdater not update a specific package, evaluate
>> 		MCMcmUpdater disableUpdatesOfPackage: <packageName>
>>
>> Class Variables definitions:
>>
>> DefaultUpdateURL - String: the URL that will be checked by default for
>> updates.  This would be set for a common standard location to check.
>>
>> LastUpdateMap - Dictionary of Integer: version number of the last
>> loaded update map per repository.  Keeps track of the last
>> configuration map, so that the utility will not have to run through
>> the full history in the repositories each time you ask to update.
>>
>> SkipPackages - Set of Strings: names of packages to not update in
>> MCMcmUpdater (empty by default).
>>
>> UpdateMissingPackages - Boolean: if true (default), new packages in
>> the update config map will be loaded unless they are in SkipPackages.
>> If false, packages not currently loaded in the image will not be
>> loaded by MCMcmUpdater.  (This can be dangerous if packages are split
>> - use at your own risk).
>>
>
>
>



More information about the Squeak-dev mailing list