On Sun, Oct 23, 2011 at 11:13 PM, Mariano Martinez Peck <
[email protected]> wrote:

> I am not sure if it is the best solution, but it works, an that's all I
> need :)
>  What I did is to implement two extension methods:
>
> MCCachedRepository >> marianoDefaultWithDirectory: aDirectory
>     self checkCacheDirectory.
>     ^ default ifNil: [default := self new directory: aDirectory]
>
> MCCachedRepository >> marianoReset
>     default := nil.
>
>
Maybe this is helpful for other guys as well? In such case, I can commit:

MCCachedRepository >> changeDefaultWithDirectory: aDirectory
    default := nil.
    ^ default ifNil: [default := self new directory: aDirectory]

What do you think?

Cheers



> And then in my build script I execute:
>
> MCCacheRepository marianoReset.
> MCCacheRepository marianoDefaultWithDirectory: self
> sharedPackageCacheDirectory.
>
> >> sharedPackageCacheDirectory
> (FileDirectory on: self sharedPackageCacheName)
>         assureExistence;
>         yourself
>
> >> sharedPackageCacheName
>     ^ '/Users/mariano/Pharo/localRepo/'
>
>
> Cheers
>
>
> On Sun, Oct 23, 2011 at 10:51 PM, Stéphane Ducasse <
> [email protected]> wrote:
>
>> how?
>>
>> Stef
>>
>> On Oct 21, 2011, at 11:26 PM, Mariano Martinez Peck wrote:
>>
>> > Thanks guys. I was able to successfully change the directory of the
>> package-cache.
>> >
>> > On Fri, Oct 21, 2011 at 12:15 PM, Lukas Renggli <[email protected]>
>> wrote:
>> > You could add startup code that resets it to an absolute fixed location.
>> >
>> > I would go with the links.
>> >
>> > Lukas
>> >
>> > On 21 October 2011 11:59, Sven Van Caekenberghe <[email protected]> wrote:
>> > >
>> > > On 21 Oct 2011, at 11:47, Mariano Martinez Peck wrote:
>> > >
>> > >> Hi guys. I would really LOVE to have a shared package-cache among
>> images. I have (really) 1 gb of .mcz in different package-cache.
>> > >> I am using new images all the time (hence package cache is empty). I
>> would love to be able to reuse the same package-cache directory for all my
>> images.
>> > >> So...how can I change the place where the package-cache is created so
>> that it uses another directory?
>> > >
>> > > Mine is 0.75 GB, but shared: I put all my images in the same
>> directory.
>> > > Working with links is also an option, I think that is what Lukas'
>> build scripts do.
>> > >
>> > > Sven
>> > >
>> > >
>> > >
>> >
>> >
>> >
>> > --
>> > Lukas Renggli
>> > www.lukas-renggli.ch
>> >
>> >
>> >
>> >
>> > --
>> > Mariano
>> > http://marianopeck.wordpress.com
>> >
>>
>>
>>
>
>
> --
> Mariano
> http://marianopeck.wordpress.com
>
>


-- 
Mariano
http://marianopeck.wordpress.com

Reply via email to