[Pharo-project] Having a shared package-cache Re: MCDirectoryRepository defaultDirectoryName ignored?
On Sat, Oct 15, 2011 at 8:54 PM, Sean P. DeNigris <sean@clipperadams.com>wrote:
Mariano Martinez Peck wrote:
it seems "ignored"
When I created the accessors and setting, the purpose was so that when you add a directory repository via the MC Browser ("+Repository"->directory), the UI would start in this directory. I wanted this because all my local repos are in the same parent directory and it saved me having to navigate there as I added every new repository. This is the only place where it is used. We could: * comment/rename the current functionality to reflect this * or, update the other use cases you describe to use it
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
HTH, Sean
-- View this message in context: http://forum.world.st/MCDirectoryRepository-defaultDirectoryName-ignored-tp3... Sent from the Pharo Smalltalk mailing list archive at Nabble.com.
-- 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 <sven@beta9.be> 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 <renggli@gmail.com> 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 <sven@beta9.be> 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
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 <renggli@gmail.com> 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 <sven@beta9.be> 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 < stephane.ducasse@inria.fr> 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 <renggli@gmail.com> 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 <sven@beta9.be> 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
On Sun, Oct 23, 2011 at 11:13 PM, Mariano Martinez Peck < marianopeck@gmail.com> 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 < stephane.ducasse@inria.fr> 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 <renggli@gmail.com> 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 <sven@beta9.be> 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
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 <marianopeck@gmail.com> 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 <stephane.ducasse@inria.fr> 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 <renggli@gmail.com> 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 <sven@beta9.be> 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
Mariano Martinez Peck wrote
MCCachedRepository >> marianoDefaultWithDirectory: aDirectory self checkCacheDirectory. ^ default ifNil: [default := self new directory: aDirectory]
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 -- View this message in context: http://forum.world.st/Having-a-shared-package-cache-Re-MCDirectoryRepository... Sent from the Pharo Smalltalk mailing list archive at Nabble.com.
On Wed, Dec 7, 2011 at 2:48 AM, Sean P. DeNigris <sean@clipperadams.com>wrote:
Mariano Martinez Peck wrote
MCCachedRepository >> marianoDefaultWithDirectory: aDirectory self checkCacheDirectory. ^ default ifNil: [default := self new directory: aDirectory]
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
Yes, and you can also directly execute: MCCacheRepository default directory: (FileDirectory on: '/Users/mariano/Pharo/sharedRepo').
-- View this message in context: http://forum.world.st/Having-a-shared-package-cache-Re-MCDirectoryRepository... Sent from the Pharo Smalltalk mailing list archive at Nabble.com.
-- Mariano http://marianopeck.wordpress.com
Mariano Martinez Peck wrote
MCCacheRepository default directory: (FileDirectory on: '/Users/mariano/Pharo/sharedRepo').
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. -- View this message in context: http://forum.world.st/Having-a-shared-package-cache-Re-MCDirectoryRepository... Sent from the Pharo Smalltalk mailing list archive at Nabble.com.
On Wed, Dec 7, 2011 at 5:25 PM, Sean P. DeNigris <sean@clipperadams.com>wrote:
Mariano Martinez Peck wrote
MCCacheRepository default directory: (FileDirectory on: '/Users/mariano/Pharo/sharedRepo').
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.
I have no idea :(
-- View this message in context: http://forum.world.st/Having-a-shared-package-cache-Re-MCDirectoryRepository... Sent from the Pharo Smalltalk mailing list archive at Nabble.com.
-- Mariano http://marianopeck.wordpress.com
Mariano Martinez Peck wrote
I have no idea :(
Probably not worth wading through to find out. I'll just keep #default: and add a setting. -- View this message in context: http://forum.world.st/Having-a-shared-package-cache-Re-MCDirectoryRepository... Sent from the Pharo Smalltalk mailing list archive at Nabble.com.
On Wed, Dec 7, 2011 at 7:08 PM, Sean P. DeNigris <sean@clipperadams.com>wrote:
Mariano Martinez Peck wrote
I have no idea :(
Probably not worth wading through to find out. I'll just keep #default: and add a setting.
+1
-- View this message in context: http://forum.world.st/Having-a-shared-package-cache-Re-MCDirectoryRepository... Sent from the Pharo Smalltalk mailing list archive at Nabble.com.
-- Mariano http://marianopeck.wordpress.com
participants (5)
-
Lukas Renggli -
Mariano Martinez Peck -
Sean P. DeNigris -
Stéphane Ducasse -
Sven Van Caekenberghe