2015-11-17 15:37 GMT+01:00 Sven Van Caekenberghe <sven@stfx.eu>:
On 17 Nov 2015, at 15:30, Thierry Goubier <thierry.goubier@gmail.com> wrote:
2015-11-17 15:12 GMT+01:00 Sven Van Caekenberghe <sven@stfx.eu>: Hi,
I have a question about the way repositories are specified in Metacello (i.e. by means on #repository:).
Say I use FileTree where the files come from a classic VCS or just from some archive. Using ZeroConf I can get an image+vm, etc. I can use the config command line handler to load the configuration from a local file directory (I haven't tried this yet, but I assume no scheme results in a MCDirectoryRepository). So far so good.
The question is, what do I put in as argument to #repository: in my baseline ?
baseline1: spec <version: '1-baseline'>
spec for: #common do: [ spec blessing: #baseline; repository: 'http://mc.stfx.eu/Neo'; package: 'Neo-Console-Core'; group: 'default' with: #('Neo-Console-Core'); group: 'Core' with: #('Neo-Console-Core') ]
Obviously not a remote http repository. But also not an absolute path, since I do not know where the user placed the files. Ideally, it should be possible to leave out repository and let it resolve to wherever the configuration was located. Can that be done ? Or is there another way to do this ?
I'm not sure it can be done that way.
Loading from a local repository can be done on the command line, by using Metacello directly with a local path. This is what I do for projects where the repository is cloned before the start of Pharo.
How do you do that ?
"Loading from a local repository can be done on the command line, by using Metacello directly with a local path."
Suppose I have a repository that contains both my Configuration and my code (except for the dependencies), let's say at $WORKDIR/repository.
$ pharo Pharo.image config $WORKDIR/repository/ ConfigurationOfMyProject --install
$ pharo Pharo.image eval --save Metacello new configuration: \'MyProject\'\; repository: \'$WORKDIR/repository\'\; load (Not sure about the way to designate just a file repository for Metacello)
How do I tell ConfigurationOfMyProject to load its code from $WORKDIR/repository ? Maybe this is really simple and I just don't see it ?
Maybe there is a simpler way than the one I use. Thierry
Thierry
Thanks,
Sven