[Pkg] Installer: Installer-Core-kph.305.mcz

squeak-dev-noreply at lists.squeakfoundation.org squeak-dev-noreply at lists.squeakfoundation.org
Mon Feb 23 06:09:07 UTC 2009


A new version of Installer-Core was added to project Installer:
http://www.squeaksource.com/Installer/Installer-Core-kph.305.mcz

==================== Summary ====================

Name: Installer-Core-kph.305
Author: kph
Time: 23 February 2009, 6:09:03 am
UUID: 010c4f5b-19c4-4631-bb0f-185c002d0665
Ancestors: Installer-Core-kph.304

+ #InstallerUrl bootstrap finds the most recent match from a squeaksource repo and loads the source.st from the mcz

=============== Diff against Installer-Core-kph.304 ===============

Item was added:
+ ----- Method: InstallerUrl>>bootstrap (in category 'accessing') -----
+ bootstrap
+ 
+ "
+ (Installer url: 'http://www.squeaksource.com/Sake/Sake-Core-kph.47.mcz') bootstrap.
+ "
+ 
+ 
+ | pkg wc splitPos repo getFileName getSource fileName |
+ 
+ splitPos := url lastIndexOf: $/. 
+ 
+ pkg := url copyFrom: splitPos + 1 to: url size.
+ repo := url copyFrom: 1 to: splitPos.
+ 
+ wc := Smalltalk at: #MCWorkingCopy ifAbsent: [ nil ].
+ wc ifNotNil: [ 
+ 	(wc allManagers select:  [:each | each packageName = pkg ]) do: [ :ea | ea unregister ] 
+ ].
+ 
+ "uninstall previous version"
+ SystemOrganization removeSystemCategory: pkg asSymbol.
+ 
+ getFileName := [ :pkgName | pkgName , ((HTTPSocket httpGet: repo) upToAll: pkgName; upTo: $") ].
+ getSource :=  [ :pkgUrl | ((ZipArchive new readFrom: (HTTPSocket httpGet: pkgUrl)) 
+ 			memberNamed: 'snapshot/source.st') contents ].
+ 
+ fileName := getFileName value: pkg.
+ 
+ [
+ 				
+ 	(getSource value: (repo,fileName)) readStream fileInAnnouncing: 'Booting ' , fileName.
+  
+ ] on: Warning do: [ :ex | ex resume: true ].!

Item was removed:
- ----- Method: InstallerUrl>>latest (in category 'url') -----
- latest
- 	"for protocol compatability"!



More information about the Packages mailing list