[Pkg] The Trunk: Installer-Core-ul.342.mcz

commits at source.squeak.org commits at source.squeak.org
Tue Nov 16 03:52:13 UTC 2010


Levente Uzonyi uploaded a new version of Installer-Core to project The Trunk:
http://source.squeak.org/trunk/Installer-Core-ul.342.mcz

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

Name: Installer-Core-ul.342
Author: ul
Time: 16 November 2010, 4:52:02 am
UUID: 409f3fc5-2ff1-d948-8b38-99eb0833afe8
Ancestors: Installer-Core-ul.341

- use #= for integer comparison instead of #== (http://bugs.squeak.org/view.php?id=2788 )

=============== Diff against Installer-Core-ul.341 ===============

Item was changed:
  ----- Method: InstallerUpdateStream>>loadUpdatesFromDiskToUpdateNumber:stopIfGap: (in category 'updates') -----
  loadUpdatesFromDiskToUpdateNumber: lastUpdateNumber stopIfGap: stopIfGapFlag 
  	"To use this mechanism, be sure all updates you want to have considered 
  	are in a folder named 'updates' which resides in the same directory as  
  	your image. Having done that, simply evaluate:  
  	 
  	Installer new loadUpdatesFromDiskToUpdateNumber: 100020 stopIfGap: false  
  	 
  	and all numbered updates <= lastUpdateNumber not yet in the image will 
  	be loaded in numerical order."
  	
  	"apparently does not use the updatelist too bad!! and to rewrite - sd 7 March 2008"
  	| previousHighest currentUpdateNumber done fileNames aMessage updateDirectory loaded |
  	updateDirectory := self updateDirectoryOrNil.
  	updateDirectory ifNil: [^ self].
  	previousHighest := SystemVersion current highestUpdate.
  	currentUpdateNumber := previousHighest.
  	done := false.
  	loaded := 0.
  	[done]
  		whileFalse: [currentUpdateNumber := currentUpdateNumber + 1.
  			currentUpdateNumber > lastUpdateNumber
  				ifTrue: [done := true]
  				ifFalse: [fileNames := updateDirectory fileNamesMatching: currentUpdateNumber printString , '*'.
  					fileNames size > 1
  						ifTrue: [^ self inform: 'ambiguity -- two files both start with ' , currentUpdateNumber printString , '
  (at this point it is probably best to remedy
  the situation on disk, then try again.)'].
+ 					fileNames size = 0
- 					fileNames size == 0
  						ifTrue: [Transcript cr; show: 'gap in updates from disk for update number '; print: currentUpdateNumber; show: ' found...'.
  							done := stopIfGapFlag]
  						ifFalse: [ChangeSet
  								newChangesFromStream: (updateDirectory readOnlyFileNamed: fileNames first)
  								named: fileNames first.
  							SystemVersion current registerUpdate: currentUpdateNumber.
  							loaded := loaded + 1]]].
  	aMessage := loaded = 0
  				ifTrue: ['No new updates found.']
  				ifFalse: [loaded printString , ' update(s) loaded.'].
  	self inform: aMessage , '
  Highest numbered update is now ' , (currentUpdateNumber - 1) printString , '.'!



More information about the Packages mailing list