On Jul 2, 8:01 am, David Kirkby <david.kir...@onetel.net> wrote:
> On 1 July 2010 20:25, Mike Hansen <mhan...@gmail.com> wrote:
>
>
>
> > On Thu, Jul 1, 2010 at 12:05 PM, David Kirkby <david.kir...@onetel.net> 
> > wrote:
> >> I don't understand your proposal. Would it need the patch command
> >> added to Sage? I don't understand your method, so can't comment
> >> really.
>
> > William's proposal is to
>
> > 1) Standardize the filenames of patches so that the only file which
> > patches ./src/foo/bar/xyz.py is ./patches/foo/bar/xyz.py.patch
>
> > 2) Only the .patch file is checked into the repository.
>
> > 3) When doing "sage -spkg" to create an spkg, it goes through all of
> > the patches under ./patches/ and uses the patch command to make the
> > patched file which is copied over.  In the above example, the "sage
> > -spkg" script would automatically make ./patches/foo/bar/xyz.py  from
> > ./src/foo/bar/xyz.py and ./patches/foo/bar/xyz.py.patch.  Thus, only
> > patch needs to be installed on the machine which creates the original
> > spkg.
>
> Many patches are currently applied conditionally - usually dependent
> on the operating system of the system to which the Sage source will be
> installed. One I can think of is applied only on the newer sun4v
> systems like 't2' but not on older SPARC systems. But whether it gets
> applied or not also depends on an environment variable.
>
> Whilst applying patch as a result of an environment variable is not
> common, applying them by operating system is very common.
>
> I don't see how that situation could be handled by this method unless
> we distribute a source for OS X, another for Linux, another for
> Solaris ... etc etc.
>
> Dave

I felt that the important part of the proposal was the use of patches.
I don't know if there will really be a lot of space saved but I think
that is less important. The advantage of patches as I see it is that
it is a well known and used method of making changes to source code.
Having the original source and applying patches is the logical thing
to do.

The question seems to be when to apply the patches. Can the patches be
applied when the spkgs are made? Are there patches which are applied
conditionally at install time?

My personal preference is to patch as late as possible. When I get the
spkg I want the original source and not a patched version. Then I
still have the option of adding/removing/changing patches as needed
for my system. If I understand the proposal.
1. the diffs are made and included in the patches directory (details
of naming aside)
2. when sage -pkg is used the patched files are created
   2b. conditional patches for specific systems and OS's could also
made (do we expect a lot of these?)
3. When the package is installed the patched files are copied over as
they are now

The bigger changes would be in the sage -pkg mechanism. The spkg-
install would also have to have conditions to copy the correct patches
for a specific system or OS but that is already the case.

The question then is if it is a burden to carry around the patches for
different systems. However, isn't this already the case?

Adam

-- 
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