Chris Muller uploaded a new version of Installer-Core to project The Trunk:
http://source.squeak.org/trunk/Installer-Core-cmm.406.mcz ==================== Summary ==================== Name: Installer-Core-cmm.406 Author: cmm Time: 22 June 2016, 9:03:21.329276 pm UUID: b5f775d3-5f20-49bf-be10-edd2cec2d1bf Ancestors: Installer-Core-cmm.405 - Factor ability to #packageDependenciesFor:do:. - Fix for repository overriding. =============== Diff against Installer-Core-cmm.405 =============== Item was changed: ----- Method: Installer>>merge: (in category 'public interface') ----- merge: structureOrSymbol | toUncache | toUncache := Set new. + self + packageDependenciesFor: structureOrSymbol + do: + [ : eachPackageName : eachRepositorySpec | | repo | + (repo := self class repositoryFor: eachRepositorySpec) cacheAllFilenames. + toUncache add: repo. + self primMerge: eachPackageName ]. + toUncache do: [ : each | each flushAllFilenames ]! - structureOrSymbol isSymbol - ifTrue: [ self merge: (self perform: structureOrSymbol) ] - ifFalse: - [ self - depthFirstOf: structureOrSymbol - do: - [ : each | each isVariableBinding - ifTrue: - [ currentRepository := self class repositoryFor: each. - currentRepository cacheAllFilenames. - toUncache add: currentRepository ] - ifFalse: - [ each isString - ifTrue: [ self primMerge: each ] - ifFalse: [ self error: 'invalid specification' ] ] ] ]. - toUncache do: - [ : each | each flushAllFilenames ]! Item was added: + ----- Method: Installer>>packageDependenciesFor:do: (in category 'private') ----- + packageDependenciesFor: structureOrSymbol do: twoArgBlock + "Value twoArgBlock with each package name and the currently-specified repository where that package resides." + structureOrSymbol isSymbol + ifTrue: + [ self + packageDependenciesFor: (self perform: structureOrSymbol) + do: twoArgBlock ] + ifFalse: + [ self + depthFirstOf: structureOrSymbol + do: + [ : each | each isVariableBinding + ifTrue: [ currentRepository := each ] + ifFalse: + [ each isString + ifTrue: + [ twoArgBlock + value: each + value: currentRepository ] + ifFalse: [ self error: 'invalid specification' ] ] ] ]! Item was changed: ----- Method: Installer>>primMerge: (in category 'private') ----- primMerge: packageName + | version repo | + repo := self class repositoryFor: currentRepository. + version := (repo includesVersionNamed: packageName) + ifTrue: [ repo versionNamed: packageName ] + ifFalse: [ repo highestNumberedVersionForPackageNamed: packageName ]. - | version | - version := (currentRepository includesVersionNamed: packageName) - ifTrue: [ currentRepository versionNamed: packageName ] - ifFalse: [ currentRepository highestNumberedVersionForPackageNamed: packageName ]. [ version shouldMerge ifTrue: [ version merge ] ifFalse: [ version load ] ] on: MCNoChangesException + do: [ : req | req resume ] - do: - [ : req | req resume ] on: MCMergeResolutionRequest do: [ : request | request merger conflicts isEmpty ifTrue: [ request resume: true ] ifFalse: [ request pass ] ]. + version workingCopy repositoryGroup addRepository: repo! - version workingCopy repositoryGroup addRepository: currentRepository! |
Free forum by Nabble | Edit this page |