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

commits at source.squeak.org commits at source.squeak.org
Thu Nov 17 15:56:29 UTC 2011


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

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

Name: MonticelloConfigurations-bf.100
Author: bf
Time: 17 November 2011, 4:56:18.448 pm
UUID: c7ad19b7-1fec-4373-8094-deb16b2bb153
Ancestors: MonticelloConfigurations-bf.99

- when updating from a new repository of add-on packages (e.g. VMMaker), skip ahead to the latest config

=============== Diff against MonticelloConfigurations-bf.99 ===============

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.
  		"Proceed only if there are updates available at all."
  		updateList ifNotEmpty: [
+ 			(LastUpdateMap at: r description ifAbsent: [0]) = 0 ifTrue: [
+ 				"No update has ever been loaded from this repo. If no package is
+ 				present in the image either, we can skip right to the latest config"
+ 				config := r versionNamed: updateList last value.
+ 				(config dependencies anySatisfy: [:dep| dep package hasWorkingCopy])
+ 					ifFalse: [ (self useLatestPackagesFrom: r)
+ 						ifTrue: [LastUpdateMap at: r description put: updateList last key.
+ 							updateList := #()]
+ 						ifFalse: [updateList := updateList last: 1]]].
  			"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!




More information about the Squeak-dev mailing list