From mboxrd@z Thu Jan 1 00:00:00 1970 From: Ben Woodcroft Subject: Re: [PATCH] Add fraggenescan. Date: Mon, 28 Dec 2015 10:56:51 +1000 Message-ID: <568088D3.4060108@uq.edu.au> References: <5676A0C1.4000004@uq.edu.au> <87egehl1ai.fsf@elephly.net> <56805DD7.8010900@uq.edu.au> <20151228003800.GA14384@jasmine> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: quoted-printable Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:43949) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aDM7a-0001e2-Ay for guix-devel@gnu.org; Sun, 27 Dec 2015 19:57:11 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1aDM7V-0002dZ-An for guix-devel@gnu.org; Sun, 27 Dec 2015 19:57:10 -0500 Received: from mailhub1.soe.uq.edu.au ([130.102.132.208]:59304 helo=newmailhub.uq.edu.au) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aDM7U-0002d7-Na for guix-devel@gnu.org; Sun, 27 Dec 2015 19:57:05 -0500 In-Reply-To: <20151228003800.GA14384@jasmine> List-Id: "Development of GNU Guix and the GNU System distribution." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-devel-bounces+gcggd-guix-devel=m.gmane.org@gnu.org Sender: guix-devel-bounces+gcggd-guix-devel=m.gmane.org@gnu.org To: Leo Famulari Cc: "guix-devel@gnu.org" On 28/12/15 10:38, Leo Famulari wrote: > On Mon, Dec 28, 2015 at 07:53:27AM +1000, Ben Woodcroft wrote: >> On 20/12/15 23:03, Ricardo Wurmus wrote: > [...] > >>>> + (substitute* "run_hmm.c" >>>> + (("^ strcat\\(train_dir, \\\"train/\\\"\\);") >>>> + (string-append " strcpy(train_dir, \"" share "/t= rain/\");"))) >>> Why do you replace =E2=80=9Cstrcat=E2=80=9D with =E2=80=9Cstrcpy=E2=80= =9D here? >> The line above does a strcpy we don't want, so strcat would keep that.= I >> could remove the line above if you want, but this effectively makes no >> difference to the running of the program. > It looks like this substition has two parts: > 1) Provide the correct path to some resources ("train files") for the > program. > 2) Change a function call from strcat() to strcpy(). > > Can you elaborate more on part 2? > > I undertand that the intended effect is to discard a value assigned to > 'train_dir' [0] in the previous function call. This discarded value is > 'argv[0]' minus 12 bytes [1]. The reason for this is that the program i= s > looking for the "train files" in the same directory as 'argv[0]', but w= e > have installed the "train files" somewhere else. Is that right? Yes that is right. As is often the case for bioinformatics programs, it=20 isn't intended to be 'installed', you are just expected to add the=20 directory where compilation happens to your $PATH. So they don't mind=20 stretching the conventions. > You mention in a comment in the patch that this program and other > programs expect the "train files" to be in one place, but we are > patching this line to account for the fact that we have installed them > in another location. Will the other programs have to be patched as > well? Yep, and I believe I have done so. Did I miss something? If you mean other programs that use fraggenescan, they would most likely=20 only call "run_FragGeneScan.pl" so I don't see an issue there. > If so, do you think it would be better to let the files be > installed in the unusual location chosen by upstream? Not after the work I did trying to do the 'right' thing.. I would=20 imagine this program will not likely be updated with much, and if there=20 was major updates I would guess that they would require substantive=20 changes to the package definition anyway. [..] Thanks for the thoughts. I hope there wasn't too much gut feeling in my=20 reply. ben