[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Help-smalltalk] Package installation
From: |
Paolo Bonzini |
Subject: |
Re: [Help-smalltalk] Package installation |
Date: |
Thu, 07 Jul 2011 08:37:34 +0200 |
User-agent: |
Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.2.17) Gecko/20110428 Fedora/3.1.10-1.fc15 Mnenhy/0.8.3 Thunderbird/3.1.10 |
On 07/06/2011 11:45 PM, Gwenael Casaccio wrote:
In VisualGST when playing with packages, I've seen a strange behavior:
The source code of methods was not correctly displayed. It can happens
when you've re-installed a package but not reload it. Because the source
code position (FileSegment) is not correctly set and no more correct
(the method is maybe removed). I've made a small fix, when installing a
package I decompress it in a temporary directory (in ~\.st\...) and when
leaving the vm I remove all the files.
That cannot work. If you load a package with gst-load, the image exits
and there is no source code anymore. Much worse than the case you are
solving.
A possible solution could be to add a version tag to the packages, and
storing source under /var/lib/smalltalk/sources/PACKAGE/VERSION. Or
under /var/lib/smalltalk/sources/SHA1-OF-STAR-FILE perhaps. And also,
if you move the image to another computer, right now all that is needed
to see the source is a download of the package (I think); with this
additional tweak, you would need to expand the package sources. All
this can be done automatically using VFS, but it is not so easy.
You have the problem of GCing the sources too. If extraction is done
automatically, however, that's not a problem as you can just rm -rf
/var/lib/smalltalk/sources/*.
The idea is for all gst create a session directory where all the
packages will be loaded. Thus I've added a new primitive which call
tempnam for creating a temporary dir. After I create a session directory
for the current GST. And when we leave the vm it's destroyed (when
calling update:) #aboutToQuit all the files and the directory are
removed too.
There is already Directory class>>#createTemporary:.
Paolo