On 2010-Jun-25 18:55:24 +0100, "Dr. David Kirkby" <david.kir...@onetel.net> wrote: >On 06/25/10 08:11 AM, Adam Webb wrote: >> I would not rule out any unexpected side-effects of some old patch >> though. It is probably a good idea to review the patches to remove >> anything that is no longer needed. > >I do wonder if there should be a different method of applying patches in Sage >to >.spkg files. One option is that a checksum is computed of the file being >overwritten, and the patch will only apply if the checksum is the same. That >way, if the upstream source gets updated, the patch can't be applied without >someone manually doing things with it.
IMHO, the current approach of having 'original' sources under src, then having patches and patched files in a second directory and 'manually' copying the patched files over the original files is a sure-fire way to ensure that things go wrong: Either the "original" file plus patches does not produce the patched file (eg "original" file has been updated or the patch has been mis-applied) or the copy script doesn't copy the updated file to the correct location (either missing it or copying it to an incorrect location). My suggestion would be to place the entire spkg under configuration control and patch files in-place. You then remove the need to manually copy files around and can rely on hg to warn you of local patches when importing upgrades. The downside is a significant increase in the size of the hg repository. This doesn't affect end-user who only download a binary distribution. The impact on source distributions could be ameliorated somewhat by splitting the source distribution into two pieces: Pure sources (needed to build Sage) and the associated hg files (needed to create an updated spkg). -- Peter Jeremy
pgpK7lKtrMP6Q.pgp
Description: PGP signature