The Inbox: Installer-Core-cmm.379.mcz

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

The Inbox: Installer-Core-cmm.379.mcz

commits-2
A new version of Installer-Core was added to project The Inbox:
http://source.squeak.org/inbox/Installer-Core-cmm.379.mcz

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

Name: Installer-Core-cmm.379
Author: cmm
Time: 13 August 2013, 3:28:48.017 pm
UUID: 6efab8ff-b53e-45f5-9fd0-0b77da7670ed
Ancestors: Installer-Core-cmm.378

- Fix and refine the repository override API to account more closely with real-world use cases.

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

Item was added:
+ ----- Method: Installer class>>airplaneMode (in category 'repository-overrides') -----
+ airplaneMode
+ "Override all remote repositories with the package cache."
+ self overrideRemoteRepostoriesWith: MCCacheRepository default!

Item was added:
+ ----- Method: Installer class>>clearOverrides (in category 'repository-overrides') -----
+ clearOverrides
+ "When using the new merge:, remove all repository overrides and load everthing from the specified default repositories."
+ Repositories := Dictionary new!

Item was changed:
+ ----- Method: Installer class>>defaultRepositoryFor: (in category 'private') -----
+ defaultRepositoryFor: anAssociation
+ "private -- answer the MC repository specified by anAssociation."
- ----- Method: Installer class>>defaultRepositoryFor: (in category 'repositories') -----
- defaultRepositoryFor: anAssociation
  ^ (self perform: anAssociation key)
  project: anAssociation value ;
  mc!

Item was removed:
- ----- Method: Installer class>>fallbackRepositoryFor:is: (in category 'repositories') -----
- fallbackRepositoryFor: scope is: anMCRepository
- self
- overrideRepositoryFor: scope
- with:
- (MCRepositoryGroup new
- addRepository: (self defaultRepositoryFor: scope) ;
- addRepository: anMCRepository ;
- yourself)!

Item was added:
+ ----- Method: Installer class>>overrideRemoteRepostoriesWith: (in category 'repository-overrides') -----
+ overrideRemoteRepostoriesWith: aMCRepositoryOrGroup
+ self remoteRepositories do:
+ [ : each | self
+ overrideRepository: each
+ with: aMCRepositoryOrGroup ]!

Item was changed:
+ ----- Method: Installer class>>overrideRepository:with: (in category 'repository-overrides') -----
- ----- Method: Installer class>>overrideRepository:with: (in category 'repositories') -----
  overrideRepository: scope with: anMCRepository
+ "When configuring the image with #merge:, override the standard repository specified by scope with anMCRepository.
+ Example 1:
+ ""I'm working on the HTML parser on ss3, load all packages assosciated with that from my local mc directory.  Everything else from remote directories.""
+ Installer
+ override: #ss3->'htmlcssparser'
+ with: (MCDirectoryRepository directory: (FileDirectory default / 'mc')).
+
+ Example 2:
+ ""SqueakSource is down.  Override all projects from there to point to the mirror.""
+ Installer
+ override: #ss
+ with: #ssMirror."
+
- "Override the standard repository specified by scope with anMCRepository.  To override an entire repository, specify scope as the repository selector.  To override a single project within a repository, scope should be an Association whose key is the repository selector and value is the project name."
  self repositories
  at: scope
  put: anMCRepository!

Item was removed:
- ----- Method: Installer class>>preemptRepository:with: (in category 'repositories') -----
- preemptRepository: scope with: anMCRepository
- self
- overrideRepositoryFor: scope
- with:
- (MCRepositoryGroup new
- addRepository: anMCRepository ;
- addRepository: (self defaultRepositoryFor: scope) ;
- yourself)!

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

Item was changed:
+ ----- Method: Installer class>>removeOverride: (in category 'repository-overrides') -----
- ----- Method: Installer class>>removeOverride: (in category 'repositories') -----
  removeOverride: scope
  "Remove override specified by scope and return to using the default repository for packages within that scope."
  ^ self repositories
  removeKey: scope
  ifAbsent: [  ]!

Item was changed:
+ ----- Method: Installer class>>repositoryFor: (in category 'private') -----
+ repositoryFor: anAssociation
+ "private -- anAssociation key is the repository selector Symbol understood by Intsaller class.  It's value is the project name within that HTTP repository."
- ----- Method: Installer class>>repositoryFor: (in category 'repositories') -----
- repositoryFor: anAssociation
  | rep |
  rep := self repositories
+ at: anAssociation  "<-- check for #rep->project overrides first"
- at: anAssociation
  ifAbsent:
  [ self repositories
+ at: anAssociation value "<-- next for just the project, regardless of repository"
- at: anAssociation value
  ifAbsent:
  [ self repositories
+ at: anAssociation key "<-- finally for a general repository redirection."
- at: anAssociation key
  ifAbsent: [ ^ self defaultRepositoryFor: anAssociation ] ] ].
  ^ rep isSymbol
+ ifTrue:
+ [ "Support for redirection from repository selector to another."
+ self defaultRepositoryFor: rep -> anAssociation value ]
- ifTrue: [ self defaultRepositoryFor: rep -> anAssociation value ]
  ifFalse: [ rep ]!

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