<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
</head>
<body>
<div dir="auto" style="direction: ltr; margin: 0; padding: 0; font-family: sans-serif; font-size: 11pt; color: black; ">
Deprecation first? ðŸ™ƒ At least for the url methods...</div>
<br>
<br>
<br>
<div class="gmail_quote">On Tue, Aug 27, 2019 at 10:08 PM +0200, "commits@source.squeak.org"
<span dir="ltr"><<a href="mailto:commits@source.squeak.org" target="_blank">commits@source.squeak.org</a>></span> wrote:<br>
<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div dir="3D"ltr"">
<pre>tim Rowledge uploaded a new version of Installer-Core to project The Inbox:
http://source.squeak.org/inbox/Installer-Core-tpr.434.mcz

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

Name: Installer-Core-tpr.434
Author: tpr
Time: 27 August 2019, 1:08:05.39831 pm
UUID: c1ea7dcd-9b59-4796-b66a-0f558e074ec9
Ancestors: Installer-Core-mt.433

Some possible cleanups for Installer.

Make InstallerWeb behave more like the other installer classes.
Remove a couple of redundant installer types.
Start adding some up to date copmments and make the Installer class comment appear in a HelpBrowser - more needed. Subclasses should get more extensive class specific commentary and that should be made to appear in the help browser pages.

=============== Diff against Installer-Core-mt.433 ===============

Item was changed:
  Object subclass: #Installer
        instanceVariableNames: 'answers packages messagesToSuppress useFileIn noiseLevel'
        classVariableNames: 'InstallerBindings IsSetToTrapErrors Repositories SkipLoadingTests ValidationBlock'
        poolDictionaries: ''
        category: 'Installer-Core'!
  Installer class
        instanceVariableNames: 'localRepository'!
  
+ !Installer commentStamp: 'tpr 8/25/2019 18:37' prior: 0!
+ Installer is a mechanism for listing, examining and installing software from a variety of sources. It is intended to help in building install scripts for package setups etc.

+ Currently it can use
+   - files; a file specified by a filename. Relative filenames will be treated as based form the current default directory. See InstallerFile.
+   - urls; a file specified by a url or a script embedded in a webpage. See InstallerWeb.
+   - squeakmap; see InstallerSqueakMap
+   - monticello;  by ftp or http access, or a local directory, or a Magma or GOODS database. There is a list of shortcuts to popular repositories in this class protocol 'repositories'. See InstallerMonticello.
+   - mantis; accessing code attached to a mantis bug report. See InstallerMantis.

+ Simple example usages - 
+ Installer squeakmap install: 'DynamicBindings'.
+ Installer squeakmap search: '*scratch'.
+ Installer squeakmap search: 'author:*rowledge'.
+ Installer squeaksource project: 'ss2'; install: 'TinyWiki'.
+ Installer ss project: 'Installer'; browse: 'Installer-Core'.

- !Installer commentStamp: 'kph 3/30/2009 01:29' prior: 0!
- Documentation now available at http://installer.pbwiki.com/Installer
   
  useFileIn - flag to load source.st rather than using Monticello!
  Installer class
        instanceVariableNames: 'localRepository'!

Item was added:
+ ----- Method: Installer class>>asHelpTopic (in category 'documentation') -----
+ asHelpTopic
+   ^HelpTopic
+           title: 'Installer'
+           contents: self class comment!

Item was removed:
- ----- Method: Installer class>>cobalt (in category 'repositories') -----
- cobalt

-       ^ self monticello http: 'http://croquet-src-01.oit.duke.edu:8886'!

Item was removed:
- ----- Method: Installer class>>goran (in category 'repositories') -----
- goran

-       ^ self monticello http: 'squeak.krampe.se'; project: ''!

Item was removed:
- ----- Method: Installer class>>impara (in category 'repositories') -----
- impara

-       ^ self monticello http: 'source.impara.de'!

Item was removed:
- ----- Method: Installer class>>install: (in category 'action report') -----
- install: scriptName

-       ^ (self scripts install: scriptName) ifNil:[ self web install: scriptName ]
- !

Item was removed:
- ----- Method: Installer class>>keith (in category 'repositories') -----
- keith
-  
-       ^ self monticello ftp: 'squeak.warwick.st' directory: 'mc' user: 'squeak' password: 'viewpoints'!

Item was changed:
  ----- Method: Installer class>>remoteRepositories (in category 'repository-overrides') -----
  remoteRepositories
+   ^ #(#ss #ss3 #gemsource #gs #krestianstvo #lukas #squeak #squeakfoundation #squeaksource #squeaksource3 #ss #ss3 #swa #swasource #wiresong )!
-       ^ #(#ss #ss3 #cobalt #gemsource #goran #gs #impara #keith #krestianstvo #lukas #saltypickle #sophie #squeak #squeakfoundation #squeaksource #squeaksource3 #ss #ss3 #swa #swasource #wiresong )!

Item was removed:
- ----- Method: Installer class>>sake (in category 'sake') -----
- sake

-       ^ self sake: InstallerSake sake!

Item was removed:
- ----- Method: Installer class>>sake: (in category 'sake') -----
- sake: aSakePackagesClass

-       ^ InstallerSake new sake: aSakePackagesClass!

Item was removed:
- ----- Method: Installer class>>saltypickle (in category 'repositories') -----
- saltypickle

-       ^ self monticello http: 'squeak.saltypickle.com'!

Item was removed:
- ----- Method: Installer class>>setSakeToUse: (in category 'sake') -----
- setSakeToUse: aClass

-       InstallerSake sake: aClass!

Item was removed:
- ----- Method: Installer class>>sophie (in category 'repositories') -----
- sophie

-       ^ self monticello http: 'source.sophieproject.org'
-       
- !

Item was removed:
- ----- Method: Installer class>>ssMirror (in category 'repositories') -----
- ssMirror
-       "The Chilean mirror for the original SqueakSource."
-       ^ self monticello http: 'http://dsal.cl/squeaksource/'!

Item was changed:
  ----- Method: Installer class>>web (in category 'web') -----
  web 
+   ^ InstallerWeb new!
-       ^ InstallerWeb!

Item was removed:
- Installer subclass: #InstallerSake
-       instanceVariableNames: 'sake'
-       classVariableNames: 'Sake'
-       poolDictionaries: ''
-       category: 'Installer-Core'!

Item was removed:
- ----- Method: InstallerSake class>>classPackages (in category 'accessing system') -----
- classPackages

-       ^Smalltalk at: #Packages  ifAbsent: [ self error: 'Sake Packages code not present' ]!

Item was removed:
- ----- Method: InstallerSake class>>sake (in category 'accessing') -----
- sake

-       ^ Sake ifNil: [ self classPackages current ]!

Item was removed:
- ----- Method: InstallerSake class>>sake: (in category 'accessing') -----
- sake: aClass

-       Sake := aClass!

Item was removed:
- ----- Method: InstallerSake>>basicInstall (in category 'basic interface') -----
- basicInstall
-  
-       self withAnswersDo: [ (self packages collect: [ :packageName | sake named: packageName ]) asTask run ].
-       !

Item was removed:
- ----- Method: InstallerSake>>sake (in category 'websqueakmap') -----
- sake 

-       ^ sake  !

Item was removed:
- ----- Method: InstallerSake>>sake: (in category 'websqueakmap') -----
- sake: aSakePackagesClass

-       sake := aSakePackagesClass!

Item was removed:
- Installer subclass: #InstallerUniverse
-       instanceVariableNames: 'universe'
-       classVariableNames: 'LastUniUpdate'
-       poolDictionaries: ''
-       category: 'Installer-Core'!

Item was removed:
- ----- Method: InstallerUniverse class>>classUGlobalInstaller (in category 'accessing system') -----
- classUGlobalInstaller

-       ^Smalltalk at: #UGlobalInstaller  ifAbsent: [ self error: 'Universes code not present' ]!

Item was removed:
- ----- Method: InstallerUniverse class>>classUUniverse (in category 'accessing system') -----
- classUUniverse

-       ^Smalltalk at: #UUniverse  ifAbsent: [ self error: 'Universes code not present' ]!

Item was removed:
- ----- Method: InstallerUniverse class>>default (in category 'instance creation') -----
- default

-       ^ self universe: (self classUGlobalInstaller universe: self classUUniverse systemUniverse)!

Item was removed:
- ----- Method: InstallerUniverse class>>universe: (in category 'instance creation') -----
- universe: u

-       ^ self new universe: u!

Item was removed:
- ----- Method: InstallerUniverse>>basicInstall (in category 'basic interface') -----
- basicInstall
-       self packages do: [ :packageName |
-               | potentials pkg pkgAndVersion version |
-       
-               pkgAndVersion := self packageAndVersionFrom: packageName.
-               pkg := pkgAndVersion first.
-               version := pkgAndVersion last.
-       
-               potentials := universe packageVersionsForPackage: pkg.
-       
-               pkg := version isEmpty 
-                       ifTrue: [ potentials last ]
-                       ifFalse: [ 
-                               version := self classUVersion readFrom: version readStream.  
-                               (potentials anySatisfy: [ :p | p version = version]) ifFalse: [ ^ self error: 'version not found']
-                       ].              
-               universe planToInstallPackage: pkg.
-       ].
-       self uniDoInstall!

Item was removed:
- ----- Method: InstallerUniverse>>classUVersion (in category 'class references') -----
- classUVersion

-       ^Smalltalk at: #UVersion  ifAbsent: [ self error: 'Universes code not present' ]!

Item was removed:
- ----- Method: InstallerUniverse>>uniDoInstall (in category 'universes') -----
- uniDoInstall

-       self withAnswersDo: [ self universe doInstall ] !

Item was removed:
- ----- Method: InstallerUniverse>>universe (in category 'universes') -----
- universe

-       ^ universe!

Item was removed:
- ----- Method: InstallerUniverse>>universe: (in category 'universes') -----
- universe: u

-       universe := u.
-       self update.!

Item was removed:
- ----- Method: InstallerUniverse>>update (in category 'public interface') -----
- update

-       (LastUniUpdate isNil or:[ (DateAndTime now - LastUniUpdate) > 600 seconds  ])
-               ifTrue: [universe requestPackageList.
-                               LastUniUpdate := DateAndTime now]!

Item was removed:
- ----- Method: InstallerWeb class>>install: (in category 'compatability') -----
- install: webPageName
- "This keeps the syntax Installer web install: working"
-       ^ self new install: webPageName!

Item was removed:
- ----- Method: InstallerWeb class>>searchPath (in category 'accessing') -----
- searchPath
-       "a search path item, has the following format. prefix*suffix"

-       ^ WebSearchPath ifNil: [ WebSearchPath := OrderedCollection new ].!

Item was added:
+ ----- Method: InstallerWeb>>searchPath (in category 'web install') -----
+ searchPath
+   "a search path item has the following format. prefix*suffix"

+   ^ WebSearchPath ifNil: [ WebSearchPath := OrderedCollection new ].!

Item was changed:
  ----- Method: InstallerWeb>>urlToDownload (in category 'web install') -----
  urlToDownload
        "while we look for a url which returns what we are looking for, we get the data anyway"
        
        | delay |
        delay := 0.
+   self searchPath do: [ :pathSpec |
-       self class webSearchPath do: [ :pathSpec |
                | potentialUrl readPathSpec retry |
                readPathSpec := pathSpec value readStream.
                potentialUrl := (readPathSpec upTo: $*), self package, (readPathSpec upToEnd ifNil: [ '' ]).
                [retry := false.
                pageDataStream := self urlGet: potentialUrl.
                self wasPbwikiSpeedWarning
                        ifTrue: [
                                retry := true.
                                delay := delay + 5. 
                                self logCR: 'PBWiki speed warning. Retrying in ', delay printString, ' seconds'.
                                (Delay forSeconds: delay) wait]
                        ifFalse: [ self hasPage ifTrue: [ pageDataStream reset. ^ potentialUrl ] ].
                retry ] whileTrue
        ].
        ^nil
  !


</pre>
</div>
</blockquote>
</div>
</body>
</html>