[Pkg] The Trunk: MonticelloConfigurations-cmm.88.mcz
commits at source.squeak.org
commits at source.squeak.org
Tue Mar 15 19:15:40 UTC 2011
Chris Muller uploaded a new version of MonticelloConfigurations to project The Trunk:
http://source.squeak.org/trunk/MonticelloConfigurations-cmm.88.mcz
==================== Summary ====================
Name: MonticelloConfigurations-cmm.88
Author: cmm
Time: 6 March 2011, 5:11:05.492 pm
UUID: 004573f6-fefb-4a49-85f2-f19f209f039e
Ancestors: MonticelloConfigurations-cmm.87
- Removed calls to MCFileBasedRepository-specific api's. Use only generic API's so that other repository types can support MC Configurations.
=============== Diff against MonticelloConfigurations-cmm.87 ===============
Item was changed:
----- Method: MCConfiguration>>versionNamed:for:from: (in category 'private') -----
versionNamed: aMCVersionName for: aDependency from: repo
| baseName fileName ver |
(repo filterFileNames: repo cachedFileNames forVersionNamed: aMCVersionName) ifNotEmptyDo: [:cachedNames |
fileName := cachedNames anyOne.
self class extraProgressInfo
ifTrue:[ProgressNotification signal: '' extra: 'Using cached ', fileName].
+ ver := repo versionNamed: fileName].
- ver := repo versionFromFileNamed: fileName].
ver ifNil: [
baseName := self diffBaseFor: aDependency.
(baseName notNil and: [baseName ~= aMCVersionName and: [repo includesVersionNamed: baseName]]) ifTrue: [
fileName := (MCDiffyVersion nameForVer: aMCVersionName base: baseName), '.mcd'.
self class extraProgressInfo
ifTrue:[ProgressNotification signal: '' extra: 'Downloading ', fileName].
+ ver := repo versionNamed: fileName]].
- ver := repo versionFromFileNamed: fileName]].
ver ifNil: [
fileName := aMCVersionName versionName, '.mcz'.
self class extraProgressInfo
ifTrue:[ProgressNotification signal: '' extra: 'Downloading ', fileName].
+ ver := repo versionNamed: fileName].
- ver := repo versionFromFileNamed: fileName].
^ver!
Item was changed:
----- Method: MCMcmUpdater class>>updateFromRepositories: (in category 'updating') -----
updateFromRepositories: repositoryUrls
"MCMcmUpdater updateFromRepositories: #(
'http://squeaksource.com/MCUpdateTest'
)"
| repos config |
Preferences enable: #upgradeIsMerge.
LastUpdateMap ifNil:[LastUpdateMap := Dictionary new].
"The list of repositories to consult in order"
repos := repositoryUrls collect:[:url|
MCRepositoryGroup default repositories
detect:[:r| r description = url]
ifNone:[ | r |
r := MCHttpRepository location: url user: '' password: ''.
MCRepositoryGroup default addRepository: r.
r]].
"The list of updates-author.version.mcm sorted by version"
repos do:[:r| r cacheAllFileNamesDuring:[
| minVersion updateList allNames |
updateList := SortedCollection new.
minVersion := LastUpdateMap at: r description ifAbsent:[0].
"Find all the updates-author.version.mcm files"
'Checking ', r description
displayProgressAt: Sensor cursorPoint
from: 0 to: 1 during:[:bar|
bar value: 0.
allNames := r allFileNamesOrCache.
].
allNames do:[:versionedName| | version base parts author type |
parts := versionedName findTokens: '.-'.
parts size = 4 ifTrue:[
base := parts at: 1.
author := parts at: 2.
version := [(parts at: 3) asNumber] on: Error do:[:ex| ex return: 0].
type := parts at: 4.
].
(base = 'update' and:[version >= minVersion and:[type = 'mcm']])
ifTrue:[updateList add: version -> versionedName]].
"Proceed only if there are updates available at all."
updateList ifNotEmpty: [
"Now process each update file. Check if we have all dependencies and if not,
load the entire configuration (this is mostly to skip older updates quickly)"
updateList do:[:assoc|
ProgressNotification signal: '' extra: 'Processing ', assoc value.
+ config := r versionNamed: assoc value.
- config := r versionFromFileNamed: assoc value.
"Skip packages that were specifically unloaded"
config dependencies: (config dependencies
reject: [:dep| self skipPackages includes: dep package name]).
self updateMissingPackages ifFalse:[
"Skip packages that are not in the image"
config dependencies: (config dependencies
select: [:dep| dep package hasWorkingCopy])].
(config dependencies allSatisfy:[:dep| dep isFulfilled])
ifFalse:[config upgrade].
LastUpdateMap at: r description put: assoc key.
] displayingProgress: 'Processing configurations'.
"We've loaded all the provided update configurations.
Use the latest configuration to update all the remaining packages."
config updateFromRepositories.
config upgrade.
]].
].
^config!
More information about the Packages
mailing list