[squeak-dev] The Trunk: Installer-Core-cmm.346.mcz

Levente Uzonyi leves at elte.hu
Wed Apr 6 07:57:48 UTC 2011


On Wed, 6 Apr 2011, commits at source.squeak.org wrote:

> Chris Muller uploaded a new version of Installer-Core to project The Trunk:
> http://source.squeak.org/trunk/Installer-Core-cmm.346.mcz
>
> ==================== Summary ====================
>
> Name: Installer-Core-cmm.346
> Author: cmm
> Time: 5 April 2011, 9:45:13.488 pm
> UUID: c579dac3-6487-4420-a28d-5bb93c029215
> Ancestors: Installer-Core-cmm.345
>
> - Quick-fix for Installer; to be able to specify packages either with or without a version-number.

When I wrote prefix matching, I really meant it. It's a feature of 
Installer. The following used to work:

Installer squeaksource
 	project: 'OCompletion';
 	install: 'Ocomple';
 	install: 'Ocompletion';
 	install: 'Ocompletion-';
 	install: 'Ocompletion-u';
 	install: 'Ocompletion-ul';
 	install: 'Ocompletion-ul.';
 	install: 'Ocompletion-ul.8';
 	install: 'Ocompletion-ul.86';
 	install: 'Ocompletion-ul.86.'

Here's a real script from the Xtreams repository 
(www.squeaksource.com/Xtreams.html ) using this feature:

Installer squeaksource
  	project: 'Xtreams';
  	install: 'Xtreams-Support';
  	install: 'Xtreams-Core-';
  	install: 'Xtreams-Terminals-';
  	install: 'Xtreams-Transforms-';
  	install: 'Xtreams-Substreams-';
  	install: 'Xtreams-Parsing-';
  	" --- tests follow --- "
  	install: 'Xtreams-CoreTests';
  	install: 'Xtreams-TerminalsTests';
  	install: 'Xtreams-TransformsTests';
  	install: 'Xtreams-SubstreamsTests';
  	install: 'Xtreams-ParsingTests';
  	" --- following require FFI --- "
  	install: 'Xtreams-Xtras-';
  	install: 'Xtreams-XtrasTests'.

Actually the dash at the end of the package names is mandatory because of 
prefix matching. Without those Installer used to install the tests if 
those have higher version numbers.

I consider removing the prefix matching a good idea, but we should 
care about backwards compatibility too.


Levente

>
> =============== Diff against Installer-Core-cmm.345 ===============
>
> Item was changed:
>  ----- Method: InstallerMonticello>>mcThing (in category 'monticello') -----
>  mcThing
>  	| loader |
>  	loader := self classMCVersionLoader new.
>  	self logCR: 'reading ' , mc description , '...'.
> + 	"several attempts to read files - repository readableFileNames
> + 	sometimes fails"
> + 	self packages
> + 		do: [:pkg |
> + 			| fileToLoad version |
> + 			fileToLoad := pkg asMCVersionName versionNumber = 0
> + 						ifTrue: [mc highestNumberedVersionNameForPackageNamed: pkg]
> + 						ifFalse: [pkg asMCVersionName].
> + 			version := mc versionNamed: fileToLoad.
> + 			(version isKindOf: MCConfiguration)
> + 				ifTrue: [^ version]
> + 				ifFalse: [MCRepositoryGroup default addRepository: self normalizedRepository.
> + 					version workingCopy repositoryGroup addRepository: self normalizedRepository.
> + 					loader addVersion: version].
> + 			self logCR: ' found ' , version fileName , '...'].
> - 	"several attempts to read files - repository readableFileNames sometimes fails"
> - 	self packages do:
> - 		[ : pkg | | fileToLoad version |
> - 		fileToLoad := mc highestNumberedVersionNameForPackageNamed: pkg.
> - 		version := mc versionNamed: fileToLoad.
> - 		(version isKindOf: MCConfiguration)
> - 			ifTrue: [ ^ version ]
> - 			ifFalse:
> - 				[ MCRepositoryGroup default addRepository: self normalizedRepository.
> - 				version workingCopy repositoryGroup addRepository: self normalizedRepository.
> - 				loader addVersion: version ].
> - 		self logCR: ' found ' , version fileName , '...' ].
>  	^ loader!
>
>
>



More information about the Squeak-dev mailing list