On Sat, Oct 15, 2011 at 8:54 PM, Sean P. DeNigris <[hidden email]> 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? Thanks in advance, Mariano
-- Mariano http://marianopeck.wordpress.com |
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 |
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 <[hidden email]> 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 |
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 <[hidden email]> wrote: You could add startup code that resets it to an absolute fixed location. -- Mariano http://marianopeck.wordpress.com |
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 <[hidden email]> 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 <[hidden email]> 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 > |
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. 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 <[hidden email]> wrote: how? -- Mariano http://marianopeck.wordpress.com |
On Sun, Oct 23, 2011 at 11:13 PM, Mariano Martinez Peck <[hidden email]> wrote: I am not sure if it is the best solution, but it works, an that's all I need :) 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: -- Mariano http://marianopeck.wordpress.com |
yes publish it somewhere.
On Oct 24, 2011, at 1:07 PM, Mariano Martinez Peck wrote: > > > On Sun, Oct 23, 2011 at 11:13 PM, Mariano Martinez Peck <[hidden email]> 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 <[hidden email]> 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 <[hidden email]> 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 <[hidden email]> 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 > |
Administrator
|
In reply to this post by Mariano Martinez Peck
I don't think you need to do all this (the checkCacheDirectory and ifNil: checks are on the old value you're throwing away). How about: MCCacheRepository>>default: aFileDirectory default := self new directory: aFileDirectory. Then you won't need to do the reset, and it's general enough to include in the image w/o extension methods. A setting would be nice too :) I'll rename my other setting to avoid confusion (I already created an issue). Issue 5067: Make package cache location changeable http://code.google.com/p/pharo/issues/detail?id=5067 I added #default: but not the setting
Cheers,
Sean |
On Wed, Dec 7, 2011 at 2:48 AM, Sean P. DeNigris <[hidden email]> wrote:
Yes, and you can also directly execute: MCCacheRepository default directory: (FileDirectory on: '/Users/mariano/Pharo/sharedRepo'). -- -- Mariano http://marianopeck.wordpress.com |
Administrator
|
If you just change the directory on the default instance, it would not reset the rest of the instance's state e.g. the 'cache' instVar. I don't know if that matters.
Cheers,
Sean |
On Wed, Dec 7, 2011 at 5:25 PM, Sean P. DeNigris <[hidden email]> wrote:
I have no idea :(
-- Mariano http://marianopeck.wordpress.com |
Administrator
|
Probably not worth wading through to find out. I'll just keep #default: and add a setting.
Cheers,
Sean |
On Wed, Dec 7, 2011 at 7:08 PM, Sean P. DeNigris <[hidden email]> wrote:
+1 -- -- Mariano http://marianopeck.wordpress.com |
Free forum by Nabble | Edit this page |