cst

About image builds

April 27, 2007 15:10:53.964

You can file this under "you learn something new every day". Yesterday, I posted on automated image builds - and had a bunch of people point out to me that you can save/restore repository information with stuff that's already lying around in the image. To wit: see the image below:

After you export that, the build script changes as follows:


| fname list |

"do initial parcel load"
#(
        '$(VISUALWORKS)\database\oraclethapiexdi.pcl'
        '$(VISUALWORKS)\contributed\postgresql\storeforpostgresql.pcl'
        '$(VISUALWORKS)\store\storefororacle.pcl'
        '$(VISUALWORKS)\contributed\sunit\sunitui.pcl'
        '$(VISUALWORKS)\parcels\rbsunitextensions.pcl'
        '$(VISUALWORKS)\net\netclients.pcl'
) do: [:each |
        Parcel loadParcelFrom: each].

"read in Repository Information"
Store.RepositoryManager importRepositoriesFromXmlOn: 'repositories.xml' asFilename  readStream.

"connect to Store"
profile := Store.RepositoryManager repositories 
	detect: [:each | 'cincomsmalltalk' = each name] 
	ifNone: [nil].
profile ifNil: [^self].
Store.DbRegistry connectTo: profile.

"load a bundle"
(Store.Bundle newestVersionWithName: 'RSSBuilding') loadSrc.

"disconnect"
Store.DbRegistry disconnect.

"save image"
ObjectMemory saveAs: 'team' thenQuit: false

See that one liner for reading in repository information? That's the change. Now, there is a -settings option, but here's the problem: If the settings file has repository information, and you haven't loaded in any Store drivers... you have a chicken/egg issue. So instead, I just have the one liner that reads in repository settings files in the build script.

 Share Tweet This
-->