Re: [AMBER-Developers] Website patches

From: Ben Roberts <roberts.qtp.ufl.edu>
Date: Mon, 12 Jul 2010 13:16:28 -0400

Hi Dave,

On 12/7/2010, at 12:48 p.m., case wrote:

> On Mon, Jul 12, 2010, Ben Roberts wrote:
>>
>> I think some of the paths given in patch files for Amber 11 (bugfixes 1
>> through 5) may need to be tweaked.
>
> Patches in bugfix.all should be set up to run from the $AMBERHOME directory:
> that is, the first part of the directory path should be something that is
> directly under $AMBERHOME.
>
>> Second, the files to be patched by bugfixes 3 to 5 have wrong paths.
>>
>> bugfix.3 tries to patch amber11/src/pmemd/mdin_ctrl_dat.fpp; the path
>> should, I think, be src/pmemd/src/mdin_ctrl_dat.fpp.
>
>> bugfixes 4 and 5 try to patch amber11/src/pmemd/src/gpu.cpp; should the
>> path be src/pmemd/src/cuda/gpu.cpp?
>
> I don't see these errors. Apparently, you are talking about not the patch
> itself, but the comments at the top of the patch. This is the same format
> we have been using for many years, but I guess it is confusing to you. The
> comments are meant for someone manually applying a single patch, and it seems
> to me to be straightforward in telling a human user which file is being
> changed. Unlike the case with the bugfix.all files, the individual files
> don't have a convention of needing to be run from $AMBERHOME.
>
> I guess we are assuming that people applying individual patches know what
> they are doing, which may be wrong. But it would be helpful to know *exactly*
> what change you propose to make things clearer.

You're right, I was talking about the comments in the patch headers.

I guess I had thought that bugfix.all was simply a concatenation of individual
bugfixes, in which I now see I was mistaken. However, when I applied the smaller
bugfixes,

$ patch -p0 -N < bugfix.1

I got messages about how the files couldn't be found, and my version of the patch
utility printed out the top of the patch file. Which I suppose is normal behaviour.
But I looked to the comments, which helpfully told me what files were supposed to
be patched, but unhelpfully those paths weren't always correct, which is what I
was alluding to in my email. Even a user who "knows what he's doing" could get a
little confused if it looks as though he's supposed to be patching a nonexistent
file. For example, does it mean that the path is wrong, or that the patch is
supposed to create the file in question?

I guess what I was proposing was therefore a change to the comments in the bugfixes:

* Make the paths relative to $AMBERHOME, not one level further up - since the
instructions for bugfix.all suggest it's to be run in $AMBERHOME, wouldn't the typical
user try to do the same for bugfix.[1-n]?

* Edit the paths to mdin_ctrl_dat.fpp and gpu.cpp - again, in the comments, which
are shown to the user when the patch fails

I hope that clarifies things a bit. What do you think, though?

Ben
_______________________________________________
AMBER-Developers mailing list
AMBER-Developers.ambermd.org
http://lists.ambermd.org/mailman/listinfo/amber-developers
Received on Mon Jul 12 2010 - 10:30:04 PDT
Custom Search