The Trunk: MonticelloConfigurations-bf.66.mcz

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

The Trunk: MonticelloConfigurations-bf.66.mcz

commits-2
Bert Freudenberg uploaded a new version of MonticelloConfigurations to project The Trunk:
http://source.squeak.org/trunk/MonticelloConfigurations-bf.66.mcz

==================== Summary ====================

Name: MonticelloConfigurations-bf.66
Author: bf
Time: 11 December 2009, 12:28:44 pm
UUID: d4e8fd6f-64b8-4b2d-9f02-27fb2e2c60d0
Ancestors: MonticelloConfigurations-ul.65

- return current configuration in updateFromRepositories

=============== Diff against MonticelloConfigurations-ul.65 ===============

Item was changed:
  ----- Method: MCMcmUpdater class>>updateFromRepositories: (in category 'updating') -----
  updateFromRepositories: repositoryUrls
  "MCMcmUpdater updateFromRepositories: #(
  'http://squeaksource.com/MCUpdateTest'
  )"
 
  | repos updateList parts base author version type config minVersion |
  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|
  updateList := SortedCollection new.
  minVersion := LastUpdateMap at: r description ifAbsent:[0].
  "Find all the updates-author.version.mcm files"
  r allFileNames do:[:versionedName|
  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 versionFromFileNamed: assoc value.
  (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."
  config updateFromRepositories.
  config upgrade.
  ].
+ ].
+ ^config!
- ].!