[Pkg] Installer: Installer-Core-kph.308.mcz
squeak-dev-noreply at lists.squeakfoundation.org
squeak-dev-noreply at lists.squeakfoundation.org
Tue Feb 24 07:32:38 UTC 2009
A new version of Installer-Core was added to project Installer:
http://www.squeaksource.com/Installer/Installer-Core-kph.308.mcz
==================== Summary ====================
Name: Installer-Core-kph.308
Author: kph
Time: 24 February 2009, 7:32:29 am
UUID: 4ad6641c-0245-11de-a647-000a95edb42a
Ancestors: Installer-Core-kph.307
made bootstrap more upbiquitous and use MczInstaller if available
=============== Diff against Installer-Core-kph.307 ===============
Item was added:
+ ----- Method: Installer class>>log: (in category 'logging') -----
+ log: aString
+
+ Transcript show: aString; cr.!
Item was changed:
----- Method: InstallerUrl>>bootstrap (in category 'accessing') -----
bootstrap
"
(Installer url: 'http://www.squeaksource.com/Sake/Sake-Core-kph.47.mcz') bootstrap.
"
+ | pkg splitPos repo getFileName fileName |
- | 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 ]
- ].
-
- getFileName := [ :pkgName | pkgName , ((HTTPSocket httpGet: repo) upToAll: pkgName; upTo: $") ].
- getSource := [ :pkgUrl | ((ZipArchive new readFrom: (HTTPSocket httpGet: pkgUrl))
- memberNamed: 'snapshot/source.st') contents ].
+ isBootstrap := true.
+
+ splitPos := url lastIndexOf: $/.
+
+ pkg := url copyFrom: splitPos + 1 to: url size.
+ repo := url copyFrom: 1 to: splitPos.
+
+ getFileName := [ :pkgName | pkgName , ((HTTPSocket httpGet: repo) upToAll: pkgName; upTo: $") ].
+
fileName := getFileName value: pkg.
+ url := repo,fileName.
+
+ self install!
- [
- SystemChangeNotifier uniqueInstance doSilently: [
- (getSource value: (repo,fileName)) readStream fileInAnnouncing: 'Booting ' , fileName.
- ]
- ] on: Warning do: [ :ex | ex resume: true ].!
Item was added:
+ ----- Method: Installer>>bootstrap (in category 'public interface') -----
+ bootstrap
+
+ isBootstrap := true.
+ self install.!
Item was added:
+ ----- Method: Installer class>>bootstrapTheRestOfInstaller (in category 'action report') -----
+ bootstrapTheRestOfInstaller
+
+ (Installer url: 'www.squeaksource.com/Installer/Installer-Scripts') bootstrap.
+ (Installer url: 'www.squeaksource.com/Installer/Installer-Formats')
+ bootstrap;
+ logCR: 'installer bootstrap - loaded'.!
Item was changed:
----- Method: Installer>>mcThing:from: (in category 'mantis') -----
mcThing: aFileName from: stream
"dont use monticello for .cs or for .st use monticello for .mcs"
| reader |
+
+ isBootstrap ifTrue: [ ^ nil ].
+
reader := self classMCReader readerClassForFileNamed: aFileName.
reader name = 'MCStReader' ifTrue: [ ^ nil ].
reader ifNil: [ ^ nil ].
(reader respondsTo: #on:fileName:)
ifTrue: [ reader := reader on: stream fileName: aFileName.
^ reader version ]
ifFalse: [ reader := reader on: stream.
^ reader snapshot ].!
Item was changed:
Object subclass: #Installer
+ instanceVariableNames: 'answers packages messagesToSuppress isBootstrap'
- instanceVariableNames: 'answers packages messagesToSuppress'
classVariableNames: 'IsSetToTrapErrors Remembered SkipLoadingTests InstallerBindings ValidationBlock'
poolDictionaries: ''
category: 'Installer-Core'!
+ !Installer commentStamp: 'kph 2/24/2009 06:32' prior: 0!
- !Installer commentStamp: 'kph 12/19/2007 14:42' prior: 0!
Documentation now available at http://installer.pbwiki.com/Installer
+
+ isBootstrap - flag to load source.st rather than using Monticello!
- !
Item was changed:
----- Method: Installer>>installMCZ:from: (in category 'mantis') -----
installMCZ: aFileName from: stream
+ | source pkg wc |
+
+ pkg := aFileName copyUpToLast: $-.
+
+ wc := Smalltalk at: #MCWorkingCopy ifAbsent: [ nil ].
+ wc ifNotNil: [
+ (wc allManagers select: [:each | each packageName = pkg ]) do: [ :ea | ea unregister ]
+ ].
+
+ self classMczInstaller ifNotNilDo: [ :reader | ^ reader install: aFileName stream: stream].
- self classMczInstaller ifNotNilDo: [ :reader | ^reader installStream: stream].
+ source := ((ZipArchive new readFrom:stream) memberNamed: 'snapshot/source.st') contents.
+
+ [
+ SystemChangeNotifier uniqueInstance doSilently: [
+ source readStream fileInAnnouncing: 'Booting ' , aFileName.
+ ]
+ ] on: Warning do: [ :ex | ex resume: true ].!
- self error: 'no monticello readers available'.
- !
More information about the Packages
mailing list