[Pkg] The Trunk: Temp-update-stream-migration-dtl.1.mcz

commits at source.squeak.org commits at source.squeak.org
Sat Aug 22 22:08:01 UTC 2015


David T. Lewis uploaded a new version of Temp-update-stream-migration to project The Trunk:
http://source.squeak.org/trunk/Temp-update-stream-migration-dtl.1.mcz

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

Name: Temp-update-stream-migration-dtl.1
Author: dtl
Time: 22 August 2015, 11:48:59.798 am
UUID: d7fb25f5-ac27-45ce-a58e-14cb6e904689
Ancestors: 

The Squeak trunk development stream is transitioning to Spur image format. Existing V3 images that update from trunk need to avoid loading Spur-specific methods. Move the update preference for those images to the squeak46 maintenance repository. This class is intended to be loadedfrom a single update map in order to perform a one time update for V3 images, after which is serves no ongoing purpose. Therefore, following its initialization, it will delete itself from the system.

==================== Snapshot ====================

SystemOrganization addCategory: #'Temp-update-stream-migration'!

Object subclass: #MoveTrunkEndToSqueak46RepoForV3Images
	instanceVariableNames: ''
	classVariableNames: ''
	poolDictionaries: ''
	category: 'Temp-update-stream-migration'!

!MoveTrunkEndToSqueak46RepoForV3Images commentStamp: 'dtl 8/21/2015 19:31' prior: 0!
The Squeak trunk development stream is transitioning to Spur image format. Existing V3 images that update from trunk need to avoid loading Spur-specific methods. Move the update preference for those images to the squeak46 maintenance repository. This class is intended to be loadedfrom a single update map in order to perform a one time update for V3 images, after which is serves no ongoing purpose. Therefore, following its initialization, it will delete itself from the system.

	"MoveTrunkEndToSqueak46RepoForV3Images checkAndChangeUpdateStream"
!

----- Method: MoveTrunkEndToSqueak46RepoForV3Images class>>checkAndChangeUpdateStream (in category 'update stream migration') -----
checkAndChangeUpdateStream
	"Change the update stream preference to squeak46 if this image cannot follow Spur updates."
	
	(((self isSqueakV3
			and: [self isUsingTrunkUpdateStream]))
				and: [self isAtEndOfV3Updates])
		ifTrue: ["change from trunk to http://source.squeak.org/squeak46"
			MCMcmUpdater defaultUpdateURL: 'http://source.squeak.org/squeak46'].
	^ 'updates from ', MCMcmUpdater updateMapName, ' at ', MCMcmUpdater defaultUpdateURL
!

----- Method: MoveTrunkEndToSqueak46RepoForV3Images class>>destroy (in category 'class initialization') -----
destroy
	"Remove this class from the system after it has served its purpose"

	| category |
	category := self category.
	self removeFromSystem.
	SystemOrganization futureDo: #removeCategory: at: 1000 args: { category } 
!

----- Method: MoveTrunkEndToSqueak46RepoForV3Images class>>initialize (in category 'class initialization') -----
initialize
	"This class is intended to be loaded and initialized from a specific update map. After
	performing the update stream check, remove this class from the system."

	self checkAndChangeUpdateStream.
	self destroy
!

----- Method: MoveTrunkEndToSqueak46RepoForV3Images class>>isAtEndOfV3Updates (in category 'testing') -----
isAtEndOfV3Updates
	"The update number for the Squeak 4.6 release image is 15102. Answer true if this image
	is at that level or greater."

	^ SystemVersion current highestUpdate >= 15102!

----- Method: MoveTrunkEndToSqueak46RepoForV3Images class>>isSqueakV3 (in category 'testing') -----
isSqueakV3
	"True if this image is in a pre-Spur object format"
	| formats |
	formats := #(
		6504	"32-bit V3 with traditional float ordering"
		6505	"32-bit V3 with platform float ordering (Cog VM)"
		68002	"64-bit V3 with traditional float ordering"
		68003	"64-bit V3 with platform float ordering (mythical)"
	)..
	^ formats includes: Smalltalk imageFormatVersion!

----- Method: MoveTrunkEndToSqueak46RepoForV3Images class>>isUsingTrunkUpdateStream (in category 'testing') -----
isUsingTrunkUpdateStream
	"True if the update preferences specify the trunk stream"

	^ ( 'http://source.squeak.org/trunk' = MCMcmUpdater defaultUpdateURL )
		and: [ 'update' = MCMcmUpdater updateMapName ]!



More information about the Packages mailing list