[squeak-dev] The Trunk: MonticelloConfigurations-fbs.122.mcz

commits at source.squeak.org commits at source.squeak.org
Tue Dec 10 21:45:31 UTC 2013


Frank Shearar uploaded a new version of MonticelloConfigurations to project The Trunk:
http://source.squeak.org/trunk/MonticelloConfigurations-fbs.122.mcz

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

Name: MonticelloConfigurations-fbs.122
Author: fbs
Time: 10 December 2013, 9:31:32.872 pm
UUID: c5e78c4f-f69d-e547-b11b-888d605b4bea
Ancestors: MonticelloConfigurations-nice.121

Make the #updateFromServerAtStartup preference a pragma preference. Update the old call sites. Remove the preference in the postscript.

(Also, move #setSystemVersion to its more natural home. Extensions are great, but in this case we don't need one.)

=============== Diff against MonticelloConfigurations-nice.121 ===============

Item was added:
+ ----- Method: MCConfiguration>>setSystemVersion (in category 'updating') -----
+ setSystemVersion
+ 	"Set the current system version date to the latest date found in my configuration (or the associated working copy). Also set the highest update number to the sum of version numbers in my configuration."
+ 
+ 	| versionNumbers versionDates |
+ 	versionNumbers := self dependencies collect: [:d |
+ 		(d versionInfo name copyAfterLast: $.) asInteger].
+ 	versionDates := self dependencies collect: [:d |
+ 		d versionInfo date
+ 			ifNil: [d package workingCopy ancestors first date]].
+ 	SystemVersion current
+ 		date: versionDates max;
+ 		highestUpdate: versionNumbers sum.!

Item was changed:
  Object subclass: #MCMcmUpdater
  	instanceVariableNames: ''
+ 	classVariableNames: 'DefaultUpdateURL LastUpdateMap SkipPackages UpdateFromServerAtStartup UpdateMissingPackages'
- 	classVariableNames: 'DefaultUpdateURL LastUpdateMap SkipPackages 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 added:
+ ----- Method: MCMcmUpdater class>>updateFromServer (in category 'updating') -----
+ updateFromServer
+ 	"Update the image by loading all pending updates from the server."
+ 	| config |
+ 	"Flush all caches. If a previous download failed this is often helpful"
+ 	MCFileBasedRepository flushAllCaches.
+ 	config := MCMcmUpdater updateFromDefaultRepository.
+ 	config ifNil: [^self inform: 'Unable to retrieve updates from remote repository.' translated].
+ 	config setSystemVersion.
+ 	self inform: ('Update completed.
+ Current update number: ' translated, SystemVersion current highestUpdate).!

Item was added:
+ ----- Method: MCMcmUpdater class>>updateFromServerAtStartup (in category 'preferences') -----
+ updateFromServerAtStartup
+ 	<preference: 'Update from server at startup'
+ 		category: 'updates'
+ 		description: 'If true, the system will check for and load any available updates.'
+ 		type: #Boolean>
+ 	^ UpdateFromServerAtStartup ifNil: [false].!

Item was added:
+ ----- Method: MCMcmUpdater class>>updateFromServerAtStartup: (in category 'preferences') -----
+ updateFromServerAtStartup: aBool
+ 	"Whether to update the image on startup."
+ 
+ 	UpdateFromServerAtStartup := aBool.!



More information about the Squeak-dev mailing list