On Mon, May 9, 2011 at 4:48 PM, Ondrej Certik <ond...@certik.cz> wrote:
> On Mon, May 9, 2011 at 4:01 PM, Robert Bradshaw
> <rober...@math.washington.edu> wrote:
>> On Mon, May 9, 2011 at 2:57 PM, Ondrej Certik <ond...@certik.cz> wrote:
> [...]
>>> I was thinking about this a lot yesterday, and there are a lot more
>>> issues to resolve, than it seems at first sight. In particular, some
>>> packages like Python is doing some recompiling of modules (I think,
>>> but maybe I am wrong) and some other stuff to the place where it is
>>> installed. Some other packages (setuptools?) are modifying some stuff
>>> as well (at least I read it somewhere).
>>>
>>> Pretty much, as long as the "installation" is just copying of files,
>>> then it should work. But if you also need to modify some stuff after
>>> installing it (post install script in Debian/Ubuntu), then things
>>> become more complex.
>>>
>>> With our current approach, one is free to do any kind of necessary
>>> tweaks in $SPKG_LOCAL (=SAGE_LOCAL) to make things work. Usually by
>>> the build system of the package itself.
>>
>> True, but I can't think of anything in Sage where one needs to modify
>> the environment any more than put a file somewhere that it's
>> accessible (though such a thing could be possible).
>>
>> I agree a general solution is much more subtle.
>
> One would have to try and see. Nice thing about the current SPKG
> format is that it is extremely simple, and although it doesn't allow
> uninstall, in my opinion it is completely general in terms of making
> sure the result works.
>
> My point is that in terms of both simplicity (=understandability,
> maintenance, time for people to learn it, use it, reuse it, ....) and
> functionality (=getting any package to work) together, it might not be
> possible to beat the current system.
>
> However, one should always try, that's for sure.

It just occurred to me, that it should be possible to keep the current
SPKG format, and implement uninstall. One just needs to keep track of
all files in SPKG_LOCAL, then see what new files were added + which
files have changed.

If a file has changed, then a warning should be produced, and we would
look at each case manually. Maybe it's possible to make the whole Sage
(or Qsnake in my case) to build without changing any files, just keep
adding them.

If the file was just added, we'll keep track of it. And when the
package is uninstalled, it will simply be removed. Currently we remove
the old files in the spkg-install for some packages, and that's a
hack.

I'll try to implement this, I think that this feature would be really
cool. With this, one can also (trivially) create a binary package, and
store it in let's say spkg/binary in the local install.

Wow, this is exciting!

Ondrej

-- 
To post to this group, send an email to sage-devel@googlegroups.com
To unsubscribe from this group, send an email to 
sage-devel+unsubscr...@googlegroups.com
For more options, visit this group at http://groups.google.com/group/sage-devel
URL: http://www.sagemath.org

Reply via email to