Trying to establish a configuration

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

Trying to establish a configuration

jfabry
Hi all,

I have been tinkering a bit to try and get a way in which a specific moose version can be loaded from source, based on a) a virgin Pharo image and b) a moose release (one-click) image. The idea is that this could be done for each moose release.

I am stuck, here is what I got so far. Maybe somebody can give me pointers how to continue.

In image a) do the following in a workspace:

|packversions|

packversions := MCPackage allInstances collect: [:pack | pack workingCopy ancestry ancestorString].
Transcript clear.
packversions do: [:pack | Transcript show: pack,' '].

Copy the contents of the Transcript INCLUDING THE LAST SPACE!

In image b) do the following in a workspace, pasting where indicated.

| opstr oldp newp diff|

opstr := ReadStream on: '<PASTE HERE>'.
oldp := OrderedCollection new.
[opstr atEnd] whileFalse: [oldp add: (opstr upTo: Character space)].
newp := MCPackage allInstances collect: [:pack | pack workingCopy ].
diff := newp select: [:cand | (oldp includes: cand ancestry ancestorString) not].
diff inspect.

diff now contains all the packages of b) that are not in a). Now we need to know the order in which they are to be loaded, to avoid dependency issues. I thought that the requiredPackages of each MCPackage would enable me to order, but -o surprise- none of the packages have these set. Sooo ... this info must be in Metacello.

Hence the question: given a specific MCPackage, how can I obtain the list of required packages from Metacello? I dont care if it is slow BTW, building this list will only be done sporadically.

Thanks in advance ...
--
Johan Fabry  
[hidden email] - http://dcc.uchile.cl/~jfabry
PLEIAD Lab - Computer Science Department (DCC) - University of Chile




_______________________________________________
Moose-dev mailing list
[hidden email]
https://www.iam.unibe.ch/mailman/listinfo/moose-dev