From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:45852) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gJhiV-0004nc-DH for guix-patches@gnu.org; Mon, 05 Nov 2018 11:27:08 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1gJhiS-0000ma-4y for guix-patches@gnu.org; Mon, 05 Nov 2018 11:27:07 -0500 Received: from debbugs.gnu.org ([208.118.235.43]:59467) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1gJhiQ-0000ik-Eg for guix-patches@gnu.org; Mon, 05 Nov 2018 11:27:04 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1gJhiQ-0004x0-8z for guix-patches@gnu.org; Mon, 05 Nov 2018 11:27:02 -0500 Subject: [bug#32984] [PATCH] gnu: filtlong: update path in aux script. Resent-Message-ID: References: <20181008091741.31531-1-madalinionel.patrascu@mdc-berlin.de> <20181009162239.17415-1-madalinionel.patrascu@mdc-berlin.de> <20181011205550.GF7201@jasmine.lan> From: mpatras Message-ID: <92b28f6e-4a68-5b5f-dcb7-40c376774f22@mdc-berlin.de> Date: Mon, 5 Nov 2018 17:26:12 +0100 MIME-Version: 1.0 In-Reply-To: <20181011205550.GF7201@jasmine.lan> Content-Type: multipart/alternative; boundary="------------895769D193349799FF362945" Content-Language: en-US List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+kyle=kyleam.com@gnu.org Sender: "Guix-patches" To: Leo Famulari Cc: 32984@debbugs.gnu.org --------------895769D193349799FF362945 Content-Type: text/plain; charset="UTF-8"; format=flowed Content-Transfer-Encoding: 8bit Hello Leo, I am sorry for this delayed response! In the initial version of this description, I have put the auxiliary scripts in /scripts/. I didn't know that all auxiliary scripts should be put in /share/name_of_package/scripts. The script loads the package using a relative path. Ludo corrected my description and changed my substitute lines to this, - (wrap-program (string-append out "/scripts/histogram.py") + (wrap-program (string-append out + "/share/filtlong/scripts/histogram.py") Now the script is on the right place (/share/filtlong/scripts/histogram.py), but it does not contain the right relative path. So, this patch is needed to correct the relative path. + (substitute* "scripts/read_info_histograms.sh" + (("/../") "/../../../")) Sorry, from the beginning was my mistake! On 11.10.2018 22:55, Leo Famulari wrote: > On Tue, Oct 09, 2018 at 06:22:39PM +0200, pimi wrote: >> * gnu/packages/bioinformatics.scm (filtlong)[extra scritps]: corrected >> the loading path for the filtlong in the script read_info_histograms.sh. > [...] > >> (lambda _ >> (substitute* "scripts/read_info_histograms.sh" >> (("awk") (which "gawk"))) >> + (substitute* "scripts/read_info_histograms.sh" >> + (("/../") "/../../../")) >> #t))))) > Can you add a code comment explaining the effect of this change? It's > rather cryptic! :) -- All the best! Mădălin Ionel Patrașcu System Administrator The Berlin Institute for Medical Systems Biology (BIMSB) Max Delbrück Center (MDC) Robert-Rössle-Straße 10 House 87, room 1.10 13125 Berlin, Germany --------------895769D193349799FF362945 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: 8bit Hello Leo,

I am sorry for this delayed response!

In the initial version of this description, I have put the auxiliary scripts in /scripts/.

I didn't know that all auxiliary scripts should be put in /share/name_of_package/scripts.

The script loads the package using a relative path.

Ludo corrected my description and changed my substitute lines to this,

-                 (wrap-program (string-append out "/scripts/histogram.py")
+                 (wrap-program (string-append out
+                                              "/share/filtlong/scripts/histogram.py")

Now the script is on the right place (/share/filtlong/scripts/histogram.py), but it does not contain the right relative path. So, this patch is needed to correct the relative path.

+               (substitute* "scripts/read_info_histograms.sh"
+                (("/../") "/../../../"))
Sorry, from the beginning was my mistake!
On 11.10.2018 22:55, Leo Famulari wrote:
On Tue, Oct 09, 2018 at 06:22:39PM +0200, pimi wrote:
* gnu/packages/bioinformatics.scm (filtlong)[extra scritps]: corrected
the loading path for the filtlong in the script read_info_histograms.sh.
[...]

              (lambda _
                (substitute* "scripts/read_info_histograms.sh"
                  (("awk") (which "gawk")))
+               (substitute* "scripts/read_info_histograms.sh"
+                (("/../") "/../../../"))
                #t)))))
Can you add a code comment explaining the effect of this change? It's
rather cryptic! :)
-- 
All the best!

Mădălin Ionel Patrașcu

System Administrator
The Berlin Institute for Medical Systems Biology (BIMSB)
Max Delbrück Center (MDC)
Robert-Rössle-Straße 10
House 87, room 1.10
13125 Berlin, Germany
--------------895769D193349799FF362945--