[squeak-dev] The Inbox: Installer-Core-cmm.347.mcz
commits at source.squeak.org
commits at source.squeak.org
Wed Apr 6 17:43:29 UTC 2011
A new version of Installer-Core was added to project The Inbox:
http://source.squeak.org/inbox/Installer-Core-cmm.347.mcz
==================== Summary ====================
Name: Installer-Core-cmm.347
Author: cmm
Time: 6 April 2011, 12:43:25.748 pm
UUID: 04a3c7db-6dae-45e1-a893-d3e61d33172e
Ancestors: Installer-Core-cmm.346
- Found a way to restore use of the mcDetectFileBlock: by only applying it to the #versionNamesForPackageNamed: rather than allFileNames.
This restores the ability to load either a hard-coded version or the latest version of a package, however the pure prefix-matching capability is still abandoned.
=============== Diff against Installer-Core-cmm.346 ===============
Item was added:
+ ----- Method: InstallerMonticello>>mcDetectFileBlock: (in category 'monticello') -----
+ mcDetectFileBlock: pkg
+
+ pkg isString ifTrue: [ ^ [ :aFile | aFile beginsWith: pkg ] ].
+
+ (pkg isKindOf: Array)
+ ifTrue: [ ^ [ :aFile | (pkg detect: [ :item | aFile beginsWith: item ] ifNone: [ false ]) ~= false ] ].
+
+ pkg isBlock ifTrue: [ ^ pkg ].
+
+ !
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 |
+ | versionNames fileToLoad version |
+ versionNames := mc versionNamesForPackageNamed:
+ (pkg asMCVersionName versionNumber = 0
+ ifTrue: [ "Just a package name specified, use it whole." pkg ]
+ ifFalse: [pkg asMCVersionName packageName]).
+ fileToLoad := versionNames
+ detect: (self mcDetectFileBlock: pkg)
+ ifNone: [ nil ].
+ self halt.
+ fileToLoad
+ ifNotNil: [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 , '...']].
- | 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 , '...'].
^ loader!
More information about the Squeak-dev
mailing list
|