[squeak-dev] The Trunk: MonticelloConfigurations-eem.125.mcz

commits at source.squeak.org commits at source.squeak.org
Sun May 11 15:58:21 UTC 2014


Eliot Miranda uploaded a new version of MonticelloConfigurations to project The Trunk:
http://source.squeak.org/trunk/MonticelloConfigurations-eem.125.mcz

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

Name: MonticelloConfigurations-eem.125
Author: eem
Time: 11 May 2014, 8:58:07.455 am
UUID: 58bb1940-a441-403a-b761-3138dab6fdb2
Ancestors: MonticelloConfigurations-eem.124

Make updateFromRepositoriesWithoutCaching favour versions
available from the repositories at the beginning of the list of
repositories.

This allows source.squeak.org/spur to override
source.squeak.org/trunk, so that spur need only provide the
spur-specific packages (currently Collections, Kernel & System).

Provide a secondary update URL.  In preferences, rename
Update URL to Primary Update URL.  Make
updateFromDefaultRepository use both the primary and
secondary update URLs if the secondary URL is defined.

=============== Diff against MonticelloConfigurations-eem.124 ===============

Item was changed:
  ----- Method: MCConfiguration>>updateFromRepositoriesWithoutCaching (in category 'updating') -----
  updateFromRepositoriesWithoutCaching
  
  	| oldNames newNames sortedNames newDeps |
  	oldNames := self dependencies collect: [:dep | dep versionInfo versionName].
  	newNames := Dictionary new.
  	self repositories
  		do: [:repo | 
  			ProgressNotification signal: '' extra: 'Checking ', repo description.
  			(repo possiblyNewerVersionsOfAnyOf: oldNames)
+ 				do: [:newName |
+ 					"If a version is available from more than one repository, make sure to take
+ 					 it from the first repository that has it.  This allows the first repository to be
+ 					 the primary repository, supplying only a subset of packages, falling back on
+ 					 another repository for the rest, e.g. spur as primary & trunk as secondary."
+ 					(newNames includesKey: newName) ifFalse:
+ 						[newNames at: newName put: repo]]]
- 				do: [:newName | newNames at: newName put: repo]]
  		displayingProgress: 'Searching new versions'.
  
  	sortedNames := newNames keys asArray sort:
  		[:a :b | a versionNumber > b versionNumber].
  
  	newDeps := OrderedCollection new: self dependencies size.
  	self dependencies
  		do: [:dep |
  			newDeps add: (sortedNames
  				detect: [:each | each packageAndBranchName = dep packageAndBranchName]
  				ifFound: [ :newName |
  					| repo |
  					repo := newNames at: newName.
  					(self versionInfoNamed: newName for: dep from: repo)
  						ifNil: [ dep ]
  						ifNotNil: [ :info |
  							MCVersionDependency package: dep package info: info ] ]
  				ifNone: [ dep ]) ]
  		displayingProgress: 'downloading new versions'.
  
+ 	self dependencies: newDeps!
- 	self dependencies: newDeps.
- !

Item was changed:
  Object subclass: #MCMcmUpdater
  	instanceVariableNames: ''
+ 	classVariableNames: 'DefaultUpdateURL LastUpdateMap SecondaryUpdateURL SkipPackages UpdateFromServerAtStartup UpdateMissingPackages'
- 	classVariableNames: 'DefaultUpdateURL LastUpdateMap SkipPackages UpdateFromServerAtStartup UpdateMissingPackages'
  	poolDictionaries: ''
  	category: 'MonticelloConfigurations'!
  
  !MCMcmUpdater commentStamp: 'cbc 8/26/2010 16:42' prior: 0!
  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).
  !

Item was changed:
  ----- Method: MCMcmUpdater class>>defaultUpdateURL (in category 'preferences') -----
  defaultUpdateURL
  	"The default update repository URL"
  
+ 	<preference: 'Primary Update URL'
- 	<preference: 'Update URL'
  		category: 'updates'
  		description: 'The repository URL for loading updates'
  		type: #String>
  
  	^DefaultUpdateURL ifNil:['']!

Item was added:
+ ----- Method: MCMcmUpdater class>>secondaryUpdateURL (in category 'preferences') -----
+ secondaryUpdateURL
+ 	"The secondary update repository URL"
+ 
+ 	<preference: 'Secondary Update URL'
+ 		category: 'updates'
+ 		description: 'The secondary repository URL for loading updates'
+ 		type: #String>
+ 
+ 	^SecondaryUpdateURL ifNil:['']!

Item was added:
+ ----- Method: MCMcmUpdater class>>secondaryUpdateURL: (in category 'preferences') -----
+ secondaryUpdateURL: aString
+ 	"The secondary update repository URL, if any"
+ 
+ 	SecondaryUpdateURL := aString!

Item was changed:
  ----- Method: MCMcmUpdater class>>updateFromDefaultRepository (in category 'updating') -----
  updateFromDefaultRepository
+ 	"Update from the default repository, or primary and secondary only."
+ 	^self updateFromRepositories: (self secondaryUpdateURL
+ 										ifNil: [{self defaultUpdateURL}]
+ 										ifNotNil: [:secondary|
+ 											{self defaultUpdateURL. secondary}])!
- 	"Update from the default repository only"
- 	^self updateFromRepositories: {self defaultUpdateURL}!



More information about the Squeak-dev mailing list