Anybody want to help us Guides fix a process bug? (was: Re: [Fwd: Package Loader version filtering ...

goran.hultgren at bluefish.se goran.hultgren at bluefish.se
Wed Feb 12 18:49:32 UTC 2003


Daniel Vainsencher <danielv at netvision.net.il> wrote:
[SNIP]
> So what we need is this - a patch to SMLoader such that it accepts all
> packages for it's own version, and, if it's own version ends with
> 'alpha', also all package for the previous version. Where previous
> version should correctly handle nonobvious cases like 4.0. One approach
> is to store a list of "X's previous version was - Y". Another angle
> might be a patch to Squeak that remembers what it's previous version
> was, though I'm not sure that should be in the base image.

Ok, by "its own version" I assume you mean the version of the image.
Below is a rudimentary version of #filterVersion that I think does what
you want. It finds out the previous version by relying on the order of
the categories in category "Squeak versions".

By hacking in whichever version you like in SystemDictionary>>version it
seemed to do the right thing.

regards, Göran
-----------------


filterVersion
	"Ignore spaces in the version string, they're sometimes spurious.
	If this is an alpha image, also include packages for the previous
Squeak version.
	Note that the version category names do not include alpha/beta/gamma
information as
	myVersion does."

	| myVersion previousVersion name versionCategory |
	myVersion _ (Smalltalk version copyWithout: $ ) asLowercase.
	versionCategory _ squeakMap categoryWithId:
'df573711-4924-4af7-a6e6-2ccaf8b1d2d6'.
	(myVersion endsWith: 'alpha') ifTrue: [
		previousVersion _ (versionCategory subCategories before:
								(squeakMap categories detect:
									[:c | myVersion beginsWith: c name asLowercase]))
							name asLowercase].
	^[:package | package categories anySatisfy:  
		[:cat | cat parent == versionCategory and: [
				name := cat name asLowercase.
				(myVersion beginsWith: name)
						or: [previousVersion notNil
								and: [previousVersion beginsWith: name]]]]]



More information about the Squeak-dev mailing list