[Pkg] Installer: Installer-Core-kph.320.mcz
squeak-dev-noreply at lists.squeakfoundation.org
squeak-dev-noreply at lists.squeakfoundation.org
Thu Jul 2 21:39:04 UTC 2009
A new version of Installer-Core was added to project Installer:
http://www.squeaksource.com/Installer/Installer-Core-kph.320.mcz
==================== Summary ====================
Name: Installer-Core-kph.320
Author: kph
Time: 2 July 2009, 10:39:02 pm
UUID: 6a214657-1983-4c1d-99ad-d215b02ecbe7
Ancestors: Installer-Core-damiencassou.319
Fix to loading of multiple packages
=============== Diff against Installer-Core-damiencassou.319 ===============
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 files fileToLoad version count |
loader := self classMCVersionLoader new.
+ count := 0. files := nil.
+ self logCR: 'reading ', mc description, '...'.
- 1 to: self packages size do: [ :n |
-
- self logCR: 'finding ', self package asString, '...'.
"several attempts to read files - repository readableFileNames sometimes fails"
+ [ count := count + 1.
+ (files = nil) and:[ count < 5 ] ]
+ whileTrue: [files := mc readableFileNames asSortedCollection: self mcSortFileBlock ].
+ files ifNil: [ Warning signal: 'Repository not readable: ', mc description. ^ nil ].
+
+ self packages do: [ :pkg |
- count := 0. fileToLoad := nil.
-
- [count := count + 1.
- (fileToLoad = nil) and:[ count < 5 ] ]
- whileTrue: [
- files := mc readableFileNames asSortedCollection: self mcSortFileBlock.
- fileToLoad := files detect: self mcDetectFileBlock ifNone: [ nil ].
- ].
-
- fileToLoad ifNil: [ Warning signal: 'Package: ', self package ,' not found in repository: ', mc description. ^ nil ].
- version := mc versionFromFileNamed: fileToLoad.
- (version isKindOf: MCConfiguration)
- ifTrue: [ ^ version ]
- ifFalse:[
- MCRepositoryGroup default addRepository: self normalizedRepository.
- version workingCopy repositoryGroup addRepository: self normalizedRepository.
- loader addVersion: version].
- self log: ' found ', version fileName, '...'.
+ self log: 'finding ', pkg asString, '...'.
+
+ fileToLoad := files detect: (self mcDetectFileBlock: pkg) ifNone: [ nil ].
+
+ version := mc versionFromFileNamed: 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, '...'.
- packages removeFirst.
].
^ loader!
Item was removed:
- ----- Method: InstallerMonticello>>mcDetectFileBlock (in category 'monticello') -----
- mcDetectFileBlock
-
- self package isString ifTrue: [ ^ [ :aFile | aFile beginsWith: self package ] ].
-
- (self package isKindOf: Array)
- ifTrue: [ ^ [ :aFile | (self package detect: [ :item | aFile beginsWith: item ] ifNone: [ false ]) ~= false ] ].
-
- self package isBlock ifTrue: [ ^ self package ].
-
- !
More information about the Packages
mailing list