[squeak-dev] The Trunk: MonticelloConfigurations-bf.96.mcz

Bert Freudenberg bert at freudenbergs.de
Fri Jul 15 10:05:17 UTC 2011


On 15.07.2011, at 03:32, Chris Muller wrote:

> It can be difficult to remove methods involved in the update process.
> May the force be with you.

This does not remove any methods.

It changes the updateFromRepositories method while it is running, true, but that's fine since the new CompiledMethod won't be activated until the next update.

> Please let us know if there needs to be an update discontinuity.

No need to.

- Bert -

> If there is we should consider one more alpha image saved right up to
> before the discontinuity-causing update.  That way if there must an
> update discontinuity it will be immediately upon upgrading the alpha
> image rather than after a long wait.
> 
> If we have test-objects in the latest alpha image, we may want to
> rebuild the next alpha from the prior alpha instead of 11481.
> 
> 
> 
> On Tue, Jul 12, 2011 at 1:44 PM,  <commits at source.squeak.org> wrote:
>> Bert Freudenberg uploaded a new version of MonticelloConfigurations to project The Trunk:
>> http://source.squeak.org/trunk/MonticelloConfigurations-bf.96.mcz
>> 
>> ==================== Summary ====================
>> 
>> Name: MonticelloConfigurations-bf.96
>> Author: bf
>> Time: 12 July 2011, 8:44:53.731 pm
>> UUID: 55679e6b-ade6-4ea4-a959-a625de620b4b
>> Ancestors: MonticelloConfigurations-ul.95
>> 
>> refactor MCMcmUpdater to allow overriding parts of the huge updateFromRepositories: method
>> 
>> =============== Diff against MonticelloConfigurations-ul.95 ===============
>> 
>> Item was changed:
>> + ----- Method: MCMcmUpdater class>>defaultUpdateURL (in category 'preferences') -----
>> - ----- Method: MCMcmUpdater class>>defaultUpdateURL (in category 'updating') -----
>>  defaultUpdateURL
>>        "The default update repository URL"
>> 
>>        <preference: 'Update URL'
>>                category: 'Monticello'
>>                description: 'The repository URL for loading updates'
>>                type: #String>
>> 
>>        ^DefaultUpdateURL ifNil:['']!
>> 
>> Item was changed:
>> + ----- Method: MCMcmUpdater class>>defaultUpdateURL: (in category 'preferences') -----
>> - ----- Method: MCMcmUpdater class>>defaultUpdateURL: (in category 'updating') -----
>>  defaultUpdateURL: aString
>>        "The default update repository URL"
>> 
>>        DefaultUpdateURL := aString!
>> 
>> Item was changed:
>> + ----- Method: MCMcmUpdater class>>disableUpdatesOfPackage: (in category 'preferences') -----
>> - ----- Method: MCMcmUpdater class>>disableUpdatesOfPackage: (in category 'updating') -----
>>  disableUpdatesOfPackage: packageName
>>        self skipPackages add: packageName!
>> 
>> Item was changed:
>> + ----- Method: MCMcmUpdater class>>enableUpdatesForAllPackages (in category 'preferences') -----
>> - ----- Method: MCMcmUpdater class>>enableUpdatesForAllPackages (in category 'updating') -----
>>  enableUpdatesForAllPackages
>>        SkipPackages := Set new!
>> 
>> Item was changed:
>> + ----- Method: MCMcmUpdater class>>enableUpdatesOfPackage: (in category 'preferences') -----
>> - ----- Method: MCMcmUpdater class>>enableUpdatesOfPackage: (in category 'updating') -----
>>  enableUpdatesOfPackage: packageName
>>        self skipPackages remove: packageName ifAbsent: [].!
>> 
>> Item was changed:
>> + ----- Method: MCMcmUpdater class>>skipPackages (in category 'private') -----
>> - ----- Method: MCMcmUpdater class>>skipPackages (in category 'updating') -----
>>  skipPackages
>>        ^SkipPackages ifNil: [SkipPackages := Set new]!
>> 
>> Item was changed:
>>  ----- Method: MCMcmUpdater class>>updateFromRepositories: (in category 'updating') -----
>>  updateFromRepositories: repositoryUrls
>>        "MCMcmUpdater updateFromRepositories: #(
>>                'http://squeaksource.com/MCUpdateTest'
>>        )"
>> 
>>        | repos config |
>>        Preferences enable: #upgradeIsMerge.
>>        LastUpdateMap ifNil:[LastUpdateMap := Dictionary new].
>>        "The list of repositories to consult in order"
>>        repos := repositoryUrls collect:[:url|
>>                MCRepositoryGroup default repositories
>>                        detect:[:r| r description = url]
>>                        ifNone:[ | r |
>>                                r := MCHttpRepository location: url user: '' password: ''.
>>                                MCRepositoryGroup default addRepository: r.
>>                                r]].
>> 
>>        "The list of updates-author.version.mcm sorted by version"
>>        repos do:[:r| r cacheAllFileNamesDuring:[
>> +               | updateList |
>> +               updateList := self updateListFor: r.
>> -               | minVersion updateList allNames |
>> -               updateList := SortedCollection new.
>> -               minVersion := LastUpdateMap at: r description ifAbsent:[0].
>> -               "Find all the updates-author.version.mcm files"
>> -               'Checking ', r description
>> -                       displayProgressFrom: 0 to: 1 during:[:bar|
>> -                               bar value: 0.
>> -                               allNames := r allFileNames.
>> -                       ].
>> -               allNames do:[:versionedName| | version base parts author type |
>> -                       parts := versionedName findTokens: '.-'.
>> -                       parts size = 4 ifTrue:[
>> -                               base := parts at: 1.
>> -                               author := parts at: 2.
>> -                               version := [(parts at: 3) asNumber] on: Error do:[:ex| ex return: 0].
>> -                               type := parts at: 4.
>> -                       ].
>> -                       (base = 'update' and:[version >= minVersion and:[type = 'mcm']])
>> -                               ifTrue:[updateList add: version -> versionedName]].
>> -
>>                "Proceed only if there are updates available at all."
>>                updateList ifNotEmpty: [
>>                        "Now process each update file. Check if we have all dependencies and if not,
>>                        load the entire configuration (this is mostly to skip older updates quickly)"
>>                        updateList do:[:assoc|
>>                                ProgressNotification signal: '' extra: 'Processing ', assoc value.
>>                                config := r versionNamed: assoc value.
>>                                "Skip packages that were specifically unloaded"
>>                                config dependencies: (config dependencies
>>                                        reject: [:dep| self skipPackages includes: dep package name]).
>>                                self updateMissingPackages ifFalse:[
>>                                        "Skip packages that are not in the image"
>>                                        config dependencies: (config dependencies
>>                                                select: [:dep| dep package hasWorkingCopy])].
>>                                (config dependencies allSatisfy:[:dep| dep isFulfilled])
>>                                        ifFalse:[config upgrade].
>>                                LastUpdateMap at: r description put: assoc key.
>>                        ] displayingProgress: 'Processing configurations'.
>>                        "We've loaded all the provided update configurations.
>>                        Use the latest configuration to update all the remaining packages."
>> +                       (self useLatestPackagesFrom: r) ifTrue: [
>> +                               config updateFromRepositories.
>> +                               config upgrade].
>> -                       config updateFromRepositories.
>> -                       config upgrade.
>>                ]].
>>        ].
>>        ^config!
>> 
>> Item was added:
>> + ----- Method: MCMcmUpdater class>>updateListFor: (in category 'private') -----
>> + updateListFor: repo
>> +       | updateList allNames minVersion |
>> +       updateList := SortedCollection new.
>> +       minVersion := LastUpdateMap at: repo description ifAbsent: [0].
>> +       "Find all the updates-author.version.mcm files"
>> +       'Checking ', repo description
>> +               displayProgressFrom: 0 to: 1 during: [:bar|
>> +                       bar value: 0.
>> +                       allNames := repo allFileNames].
>> +       allNames do: [:versionedName | | version base parts author type |
>> +               parts := versionedName findTokens: '.-'.
>> +               parts size = 4 ifTrue: [
>> +                       base := parts at: 1.
>> +                       author := parts at: 2.
>> +                       version := [(parts at: 3) asNumber] on: Error do: [:ex | ex return: 0].
>> +                       type := parts at: 4.
>> +               ].
>> +               (base = 'update' and: [version >= minVersion and: [type = 'mcm']])
>> +                       ifTrue: [updateList add: version -> versionedName]].
>> +       ^updateList!
>> 
>> Item was changed:
>> + ----- Method: MCMcmUpdater class>>updateMissingPackages (in category 'preferences') -----
>> - ----- Method: MCMcmUpdater class>>updateMissingPackages (in category 'updating') -----
>>  updateMissingPackages
>>        "Whether to update missing (unloaded) packages"
>> 
>>        <preference: 'Update missing package'
>>                category: 'Monticello'
>>                description: 'If true, missing (unloaded) packages will be loaded during the update process.'
>>                type: #Boolean>
>> 
>>        ^UpdateMissingPackages ifNil:[true]!
>> 
>> Item was changed:
>> + ----- Method: MCMcmUpdater class>>updateMissingPackages: (in category 'preferences') -----
>> - ----- Method: MCMcmUpdater class>>updateMissingPackages: (in category 'updating') -----
>>  updateMissingPackages: aBool
>>        "Whether to update missing (unloaded) packages"
>> 
>>        UpdateMissingPackages := aBool.!
>> 
>> Item was added:
>> + ----- Method: MCMcmUpdater class>>useLatestPackagesFrom: (in category 'private') -----
>> + useLatestPackagesFrom: repo
>> +       "for overriding on a per repository basis"
>> +       ^true!
>> 
>> 
>> 
> 





More information about the Squeak-dev mailing list