[Pkg] Packages: Sake-Packages-kph.7.mcz
squeak-dev-noreply at lists.squeakfoundation.org
squeak-dev-noreply at lists.squeakfoundation.org
Fri Dec 12 00:12:46 UTC 2008
A new version of Sake-Packages was added to project Packages:
http://www.squeaksource.com/Packages/Sake-Packages-kph.7.mcz
==================== Summary ====================
Name: Sake-Packages-kph.7
Author: kph
Time: 12 December 2008, 12:12:45 am
UUID: e76152c8-c486-4794-92df-da026ea801eb
Ancestors: Sake-Packages-kph.6
Packages upgrade should work!
When a package has been loaded it attempts to tell the packageInfo instance of the name of the package, property #packages.
This is to a) allow a menu item in the MCWorkingCopyBrowser
and b) allow packages to reconstruct "provided" should it be unloaded and loaded.
If a package has a name that is different to its monticello package name it can tell us via self info mcName: 'XML-Support' (e.g. YAXO)
=============== Diff against Sake-Packages-kph.6 ===============
Item was changed:
----- Method: Packages>>defaultUnloadAction (in category 'defaults') -----
defaultUnloadAction
+ self info url ifNotNil: [ Installer mc unload: (self info mcName ifNil: [ self name]) ]!
- self info url ifNotNil: [ Installer mc unload: self name ]!
Item was changed:
----- Method: Packages class>>upgrade (in category 'public') -----
upgrade
self provided values asSet asTask run!
Item was changed:
----- Method: Packages>>doActionEnd (in category 'as yet unclassified') -----
doActionEnd
self isUnloading ifTrue: [ ^ self ].
self class provided in: [ :reg |
self provides do: [ :each | reg at: each put: self ].
+ ].
+
+ "if a package appears in Packages under an obscure name, it can
+ tell the PackageInfo instance what name was used to load it via metadata
+ at mcName"
+
+ (self info mcName ifNil: [ self name ]) ifNotNilDo: [ :mcName |
+ (PackageOrganizer default packageNamed: mcName ifAbsent: [ ^ self ])
+ propertyAt: #packages put: self name.
+ ].
+ !
- ].!
Item was changed:
SakeTask subclass: #Packages
instanceVariableNames: 'unloadBlock unloadPriors provides name version isUnload'
classVariableNames: 'Provided'
poolDictionaries: ''
category: 'Sake-Packages'!
Packages class
instanceVariableNames: 'lastUpdate theUUniverse'!
+ !Packages commentStamp: 'kph 12/11/2008 23:27' prior: 0!
- !Packages commentStamp: 'kph 9/4/2008 15:29' prior: 0!
To generate all of the methods based upon universes definitions:
Packages taskGenerateAllUniverses run.
or
Packages taskGenerateAll run.
Sake/Packages usage:
Public API
============
Package definition for your current version of Squeak are found using the following path.
For SystemVersion Squeak3.7
Packages findPath -> {PackagesSqueak37 . PackagesDev . PackagesBeta} *the default is #current
Packages current findPath -> {PackagesSqueak37 . PackagesDev . PackagesBeta}
Packages dev findPath {PackagesDev. PackagesSqueak37 . PackagesBeta}
Packages beta findPath {PackagesBeta . PackagesSqueak37 . PackagesDev}
Packages current load: 'Seaside'.
Packages beta named: 'Seaside'.
or
(Packages current named: 'Seaside') run. " or runQuietly, runStepping, runLogging"
(Packages beta named: 'Seaside') run.
multiples:
Packages current load: #('Seaside' 'Magma' 'Logging')
Run-variants
=========
#runStepping , - presents a confirm/debug dialog before each action.
#run - default.
#runQuietly - auto-confirms any SakeConfirm dialogs.
#runLogging - Writes any SakeStop warnings to self log.
Unloading
========
Unloading comes in two variants.
Each package task loaded by Sake/Packages is remembered in the 'provided' list
If you perform:
Packages unload: 'Seaside' .
Packages unloadStepping: 'Seaside' .
Then the 'historical' unload scripts are used, as defined when the original load tasks were run.
If instead you perform:
(Packages current named: 'Seaside') unload runStepping.
Then the most recently defined unload script will be run.
Note: If packages such as "Magma server" and "Magma client" provides "Magma", then
Packages unload: 'Magma'.
Will unload whichever of the two are loaded.
===
Misc notes...
Universes are using 'instance side' task definition, so the task extensions mechanism does not work in this context.
+ If a package appears in Packages under an obscure name, it can
+ tell the PackageInfo instance what name was used to load it via metadata
+ at mcName
+ !
- !
More information about the Packages
mailing list