Hi Matthew,
Installing a mc package already does some pretty sophisticated pattern matching in the method InstallerMonticello>>mcThing, allowing you to install the latest version, the latest version from a particular author, or a specific version.
Could you briefly tell us how to use #mcThing to load the latest version of a given package? Do we have to adapt #mcSortFileBlock or is there a direct way to load the latest version? Do you have an example?
Were you unaware of it? I don't understand why this is needed.
In Pharo we use a pretty old version of Installer, eg. there everything is still contained in one huge Installer class... Cheers, David
On Thu, Oct 23, 2008 at 05:53:06PM +0200, squeak-dev-noreply@lists.squeakfoundation.org wrote:
A new version of Installer-Core was added to project Installer: http://www.squeaksource.com/Installer/Installer-Core-AlexandreBergel.244.mcz
==================== Summary ====================
Name: Installer-Core-AlexandreBergel.244 Author: AlexandreBergel Time: 23 October 2008, 5:53:02 pm UUID: 2080ff3e-6f59-4f15-91c2-ff07703cbccf Ancestors: Installer-Core-kph.243
added #installLatest: method to Installer
=============== Diff against Installer-Core-kph.243 ===============
Item was added: + ----- Method: Installer>>installLatest: (in category 'instanciation') ----- + installLatest: packageNameCollectionOrDetectBlock + | versions | + self addPackage: packageNameCollectionOrDetectBlock. + versions := (self availablePackages select: [:e | e beginsWith: packageNameCollectionOrDetectBlock]) asSortedCollection: [:a :b | + [(a findBetweenSubStrs: #($.)) allButLast last asInteger > (b findBetweenSubStrs: #($.)) allButLast last asInteger] + on: Error do: [:ex | false]]. + versions isEmpty ifTrue: [^ self]. + self packages removeLast. + self addPackage: versions first. + + ^ self install!