[squeak-dev] The Inbox: Installer-Core-dtl.426.mcz

commits at source.squeak.org commits at source.squeak.org
Fri Nov 9 01:14:30 UTC 2018


A new version of Installer-Core was added to project The Inbox:
http://source.squeak.org/inbox/Installer-Core-dtl.426.mcz

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

Name: Installer-Core-dtl.426
Author: dtl
Time: 8 November 2018, 8:14:05.491842 pm
UUID: 1467b7b0-9ce6-4b2e-96f4-48c851f5e6e9
Ancestors: Installer-Core-dtl.425

If an explicit MC version is specified for Installer, load that version. Otherwise load the most recent version of the applicable package or package branch.

Previously, in the case of a repository containing both 'Chronology-Core-dtl.3' and 'Chronology-Core-dtl.30', the following will incorrectly load version 30 rather than version 3.

  (Installer ss project: 'UTCDateAndTime') install: 'Chronology-Core-dtl.3'

With this update, the correct version is loaded when explicitly specified, otherwise the most recent version of Chronology-Core (or branch therof) will be loaded.

=============== Diff against Installer-Core-dtl.425 ===============

Item was removed:
- ----- Method: InstallerMonticello>>mcDetectFileBlock: (in category 'monticello') -----
- mcDetectFileBlock: pkg
- 
- 	pkg isString ifTrue: [  ^ [ :aMCVersionName |
- 			(pkg beginsWith: aMCVersionName packageAndBranchName) and: [aMCVersionName = pkg ] ] ].
- 
- 	(pkg isKindOf: Array) 
- 			ifTrue: [  ^  [ :aMCVersionName | pkg anySatisfy: [ :item |
- 						(item beginsWith: aMCVersionName packageAndBranchName) and: [aMCVersionName = item ] ] ] ].
- 
- 	pkg isBlock ifTrue: [ ^ pkg ].
-  !

Item was changed:
  ----- Method: InstallerMonticello>>mcThing (in category 'monticello') -----
  mcThing
  	| loader |
  	loader := self classMCVersionLoader new.
  
  	"several attempts to read files - repository readableFileNames
  	sometimes fails"
  	self packages
+ 		do: [:pkg |
+ 			| mcVersion versionNames sortedVersions fileToLoad version |
+ 			mcVersion := pkg asMCVersionName .
- 		do: [:pkg | 
- 			| versionNames fileToLoad version |
  			versionNames := mc versionNamesForPackageNamed:
+ 				(mcVersion versionNumber = 0 
- 				(pkg asMCVersionName versionNumber = 0 
  					ifTrue: [ "Just a package name specified, use it whole." pkg ] 
+ 					ifFalse: [mcVersion packageName]).
+ 			sortedVersions := versionNames sorted: self mcSortFileBlock.
+ 			fileToLoad := self versionToLoad: mcVersion fromVersions: sortedVersions.
- 					ifFalse: [pkg asMCVersionName packageName]).
- 			fileToLoad := (versionNames sorted: self mcSortFileBlock)
- 						detect: (self mcDetectFileBlock: pkg)
- 						ifNone: [ nil ].
  			fileToLoad
  				ifNotNil: [version := mc versionNamed: fileToLoad.
  					(version isKindOf: MCConfiguration)
  						ifTrue: [^ version]
  						ifFalse: [self normalizedRepositories do: [:repo |
  								MCRepositoryGroup default addRepository: repo].
  							self normalizedRepositories do: [:repo |
  								version workingCopy repositoryGroup addRepository: repo].
  							loader addVersion: version].
  					self logCR: ' found ' , version fileName , '...']].
  	^ loader!

Item was added:
+ ----- Method: InstallerMonticello>>versionToLoad:fromVersions: (in category 'monticello') -----
+ versionToLoad: mcVersion fromVersions: sortedVersions
+ 	"From a list of sortedVersions, answer the most recent version or the
+ 	exact version if explicitly specified."
+ 	^ sortedVersions
+ 		detect: [:aMCVersionName | aMCVersionName = mcVersion "explicit version specified"]
+ 		ifNone: [sortedVersions
+ 				detect: [:aMCVersionName | (mcVersion beginsWith: aMCVersionName packageAndBranchName)
+ 						and: [aMCVersionName beginsWith: mcVersion "most recent version that matches"]]
+ 				ifNone: []]!



More information about the Squeak-dev mailing list