Chris Muller uploaded a new version of SMBase to project The Trunk: http://source.squeak.org/trunk/SMBase-cmm.112.mcz
==================== Summary ====================
Name: SMBase-cmm.112 Author: cmm Time: 5 February 2011, 3:02:46 pm UUID: 05f36b19-1b85-4cff-846a-93a8aa099f74 Ancestors: SMBase-gk.111
- Add support for Community-Supported packages. The overall design is as follows:
- Add a new category, "Community Supported". For discussion, we'll refer to SMCategorizableObjects having this category as, #isCommunitySupported. - Add this new category to all Packages whose members have departed the community. - Change the server so that, when saving a package-release, if it is a new package release and the Package isCommunitySupported, then allow the release to be added by any user-account instead of only the package owner. - That new PackageRelease is saved with the "Community Supported" category so it, too, may be updated by anyone. - Legacy PackageReleases for that Package cannot be updated, because they will not be isCommunitySupported.
=============== Diff against SMBase-gk.109 ===============
Item was changed: ----- Method: SMAccount>>newFile:block: (in category 'files') ----- newFile: fileName block: aBlock "Create a new file. Let <aBlock> fill the file with content by calling it with a stream."
+ | dir stream | - | dir | dir := self uploadsDirectory. + [(dir fileExists: fileName) ifTrue:[dir deleteFileNamed: fileName]. + stream := dir newFileNamed: fileName. + stream binary. + aBlock value: stream] ensure: [stream close]! - (dir fileExists: fileName) ifTrue:[dir deleteFileNamed: fileName]. - dir newFileNamed: fileName do: [:stream | - stream binary. - aBlock value: stream]!
Item was added: + ----- Method: SMCategorizableObject>>beCommunitySupported (in category 'testing') ----- + beCommunitySupported + self addCategory: (self map categoryWithNameBeginning: 'Community Supported')!
Item was added: + ----- Method: SMCategorizableObject>>isCommunitySupported (in category 'testing') ----- + isCommunitySupported + | csCat | + csCat := self categories detect: [ : each | each name = 'Community Supported' ] ifNone: [ nil ]. + ^ csCat notNil!
Item was changed: ----- Method: SMMaintainableObject>>rss: (in category 'maintainers') ----- rss: anUrl + anUrl = 'nil' + ifTrue: [rss := nil] + ifFalse: [rss := anUrl]! - rss := anUrl!
Item was changed: ----- Method: SMPackageRelease>>initializeFromRelease:package: (in category 'initialize-release') ----- initializeFromRelease: parentRelease package: aPackage "Initialize package release from a given parent. Branch if needed."
self map: aPackage map id: UUID new. package := aPackage. + aPackage isCommunitySupported ifTrue: [ self beCommunitySupported ]. automaticVersion := parentRelease ifNil: [VersionNumber first] ifNotNil: [parentRelease nextOrBranch]. version := note := downloadUrl := ''!
Item was changed: ----- Method: SMSqueakMap>>saveCheckpoint: (in category 'checkpoints') ----- saveCheckpoint: contentWithFilename "Save the map checkpoint to disk if it is not there already."
+ | file directory sz fname content | - | directory sz fname content | directory := self directory. sz := contentWithFilename size. fname := contentWithFilename last: sz - (contentWithFilename lastIndexOf: $:). content := contentWithFilename first: sz - fname size - 1. (directory fileExists: fname) ifFalse: [ + [file := StandardFileStream newFileNamed: (directory fullNameFor: fname). + file nextPutAll: content] + ensure: [file close]]! - StandardFileStream newFileNamed: (directory fullNameFor: fname) do: [ :file | - file nextPutAll: content ] ]!
packages@lists.squeakfoundation.org