The Trunk: Installer-Core-cmm.414.mcz

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

The Trunk: Installer-Core-cmm.414.mcz

commits-2
Chris Muller uploaded a new version of Installer-Core to project The Trunk:
http://source.squeak.org/trunk/Installer-Core-cmm.414.mcz

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

Name: Installer-Core-cmm.414
Author: cmm
Time: 18 July 2016, 11:29:44.226614 am
UUID: c43c7349-b55d-41fa-a754-be8e8e21c683
Ancestors: Installer-Core-cmm.407

Support more configuration use-cases:
        * Automatically addLocalRepositories and addRemoteRepositories to the MC browser when merging packages.
        * Ability to #copyLocalVersionsToRemoteFor: a package.  This can be used as a single 'commit' of all changes across multiple packages (which reside in their own repositories).

- Connectors was moved back to SqueakSource.
- webClientSsp seems to be just as current at SqueakSource as it does at SS3.
- Fixed some assumptions in the package-definitions that assumed they exist in their same repository as their prerequisite packages.

=============== Diff against Installer-Core-cmm.407 ===============

Item was changed:
  Object subclass: #Installer
+ instanceVariableNames: 'answers packages messagesToSuppress useFileIn noiseLevel'
- instanceVariableNames: 'answers packages messagesToSuppress useFileIn noiseLevel currentRepository'
  classVariableNames: 'InstallerBindings IsSetToTrapErrors Repositories SkipLoadingTests ValidationBlock'
  poolDictionaries: ''
  category: 'Installer-Core'!
  Installer class
  instanceVariableNames: 'localRepository'!
 
  !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>>suspendRepositoryOverridesWhile: (in category 'repository-overrides') -----
+ suspendRepositoryOverridesWhile: aBlock
+ | priorOverrides |
+ [ priorOverrides := Repositories.
+ self clearOverrides.
+ aBlock value ] ensure: [ Repositories := priorOverrides ]!

Item was added:
+ ----- Method: Installer class>>symbolicPackages (in category 'accessing') -----
+ symbolicPackages
+ ^ self methodsInCategory: 'package-definitions'!

Item was added:
+ ----- Method: Installer>>addLocalRepositories (in category 'configure') -----
+ addLocalRepositories
+ "For all MC packages defined in my 'package-definitions', add the local directory repository where they reside."
+ self allPackages do:
+ [ : each | self class suspendRepositoryOverridesWhile:
+ [ self class useLocalRepository.
+ self addRepositoryFor: each ] ]!

Item was added:
+ ----- Method: Installer>>addRemoteRepositories (in category 'configure') -----
+ addRemoteRepositories
+ "For all MC packages defined in my 'package-definitions', add the remote repository where they reside."
+ self allPackages do:
+ [ : each | self class suspendRepositoryOverridesWhile: [ self addRepositoryFor: each ] ]!

Item was added:
+ ----- Method: Installer>>addRepositoryFor: (in category 'configure') -----
+ addRepositoryFor: structureOrSymbol
+ self
+ packageDependenciesFor: structureOrSymbol
+ do:
+ [ : eachPackageName : eachRepositorySpec | MCWorkingCopy allManagers
+ detect: [ : eachWorkingCopy | eachWorkingCopy packageName = eachPackageName ]
+ ifFound: [ : foundWorkingCopy | foundWorkingCopy repositoryGroup addRepository: (self class repositoryFor: eachRepositorySpec) ]
+ ifNone: [ nil ] ]!

Item was changed:
  ----- Method: Installer>>allPackages (in category 'accessing') -----
  allPackages
+ | installerClasses | installerClasses := self class withAllSuperclasses.
+ installerClasses := installerClasses copyFrom: 1 to: (installerClasses indexOf: Installer).
+ ^ (installerClasses
- ^ (self class withAllSuperclasses
  inject: OrderedCollection new
  into:
  [ : coll : each | coll
+ addAll: each symbolicPackages ;
- addAll: (each methodsInCategory: 'package-definitions') ;
  yourself ]) sort!

Item was changed:
  ----- Method: Installer>>broomMorphsBase (in category 'package-definitions') -----
  broomMorphsBase
  "Morph alignment user-interface tool."
+ ^ { #ss -> 'Connectors'.
- ^ { #ss3 -> 'Connectors'.
  'BroomMorphs-Base' }!

Item was changed:
  ----- Method: Installer>>connectors (in category 'package-definitions') -----
  connectors
  "Connect Morphs together.  Make diagrams."
+ ^ { self broomMorphsBase.
+ #ss -> 'Connectors'.
- ^ { self broomMorphsBase.
  'CGPrereqs'.
  'FSM'.
  'Connectors'.
  'ConnectorsText'.
  'ConnectorsShapes'.
  'ConnectorsTools'.
  'ConnectorsGraphLayout'.
  'BroomMorphs-Connectors' }!

Item was added:
+ ----- Method: Installer>>copyLocalVersionsToRemoteFor: (in category 'configure') -----
+ copyLocalVersionsToRemoteFor: structureOrSymbol
+ "Ensure the currently loaded MCVersion is present in each repository which holds the packages represented by structureOrSymbol.  Use as a single 'commit' of all changes across multiple packages (which reside in their own repositories).
+ Make sure id's and passwords are already set up on your repositories.  Recommend using the mcSettings file for doing this, see MCHttpRepository>>#userAndPasswordFromSettingsDo: for details."
+ (self remoteRepositoriesFor: structureOrSymbol) do:
+ [ : each | each copyImageVersions ]!

Item was changed:
  ----- Method: Installer>>curvedSpaceExplorer (in category 'package-definitions') -----
  curvedSpaceExplorer
  "Explore curved 3D spaces."
  ^ { self openGL.
+ #krestianstvo -> 'ccse'.
  'CCSpaceExplorer' }!

Item was changed:
  ----- Method: Installer>>ffiTests (in category 'package-definitions') -----
  ffiTests
  "Tests for Foreign Function Interface."
  ^ { self ffi.
+ #squeak -> 'FFI'.
  'FFI-Tests' }!

Item was changed:
  ----- Method: Installer>>mathMorphs (in category 'package-definitions') -----
  mathMorphs
  "MathMorphs is a project that combines mathematics and Smalltalk.  See http://www.dm.uba.ar/MathMorphs/ and chapter 10 of the 'new blue book'."
  ^ { self morphicWrappers.
+ #ss -> 'MathMorphsRevival'.
  'Functions' }!

Item was changed:
  ----- Method: Installer>>merge: (in category 'public interface') -----
  merge: structureOrSymbol
  | toUncache |
  toUncache := Set new.
  self
  packageDependenciesFor: structureOrSymbol
  do:
+ [ : eachPackageName : eachRepositorySpec | | repo version |
- [ : eachPackageName : eachRepositorySpec | | repo |
  (repo := self class repositoryFor: eachRepositorySpec) cacheAllFilenames.
  toUncache add: repo.
+ version := self
+ primMerge: eachPackageName
+ from: repo.
+ "Lazy code, polite MC won't add duplicates if they already exist."
+ version ifNotNil:
+ [ version workingCopy repositoryGroup
+ addRepository: repo ;
+ addRepository: (self class defaultRepositoryFor: eachRepositorySpec) ] ].
- self primMerge: eachPackageName ].
  toUncache do: [ : each | each flushAllFilenames ]!

Item was changed:
  ----- 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."
+ | currentRepository |
  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 added:
+ ----- Method: Installer>>packagesFor: (in category 'configure') -----
+ packagesFor: structureOrSymbol
+ ^ Array streamContents:
+ [ : stream | self
+ packageDependenciesFor: structureOrSymbol
+ do:
+ [ : eachPackageName : eachRepositorySpec | stream nextPut: eachPackageName ] ]!

Item was removed:
- ----- 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 shouldMerge
- ifTrue: [ version merge ]
- ifFalse: [ version load ] ]
- on: MCNoChangesException
- do: [ : req | req resume ]
- on: MCMergeResolutionRequest
- do:
- [ : request | request merger conflicts isEmpty
- ifTrue: [ request resume: true ]
- ifFalse: [ request pass ] ].
- version workingCopy repositoryGroup addRepository: repo!

Item was added:
+ ----- Method: Installer>>primMerge:from: (in category 'private') -----
+ primMerge: packageName from: aMCRepository
+ | version |
+ version := (aMCRepository includesVersionNamed: packageName)
+ ifTrue: [ aMCRepository versionNamed: packageName ]
+ ifFalse: [ aMCRepository highestNumberedVersionForPackageNamed: packageName ].
+ [ version shouldMerge
+ ifTrue: [ version merge ]
+ ifFalse: [ version load ] ]
+ on: MCNoChangesException
+ do: [ : req | req resume ]
+ on: MCMergeResolutionRequest
+ do:
+ [ : request | request merger conflicts isEmpty
+ ifTrue: [ request resume: true ]
+ ifFalse: [ request pass ] ].
+ ^ version!

Item was added:
+ ----- Method: Installer>>remoteRepositoriesFor: (in category 'configure') -----
+ remoteRepositoriesFor: structureOrSymbol
+ | reps |
+ reps := Set new.
+ self class suspendRepositoryOverridesWhile:
+ [ self
+ packageDependenciesFor: structureOrSymbol
+ do:
+ [ : eachPackageName : eachRepositorySpec | | rep |
+ rep := self class repositoryFor: eachRepositorySpec.
+ "Collect up the repositories in the default MCRepositoryGroup, because those ones will have user and password specified."
+ reps add:
+ (MCRepositoryGroup default repositories
+ detect: [ : each | each = rep ]
+ ifNone: [ rep ]) ] ].
+ ^ reps!

Item was changed:
  ----- Method: Installer>>webClientSsp (in category 'package-definitions') -----
  webClientSsp
  "WebClient supports NTLM/SPNEGO authentication via the Microsoft SSP interface (Windows only)."
  ^ { self ffiTests.
+ #ss -> 'WebClient'.
- #ss3 -> 'WebClient'.
  'WebClient-SSP' }!