From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:47497) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fcL27-0003u4-5j for guix-patches@gnu.org; Sun, 08 Jul 2018 21:32:08 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1fcL22-0003pr-UG for guix-patches@gnu.org; Sun, 08 Jul 2018 21:32:07 -0400 Received: from debbugs.gnu.org ([208.118.235.43]:43675) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1fcL22-0003pk-QH for guix-patches@gnu.org; Sun, 08 Jul 2018 21:32:02 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1fcL22-0002GG-Ja for guix-patches@gnu.org; Sun, 08 Jul 2018 21:32:02 -0400 Subject: [bug#32102] [PATCH] utils: Fix wrap-program filename generation. Resent-Message-ID: Received: from eggs.gnu.org ([2001:4830:134:3::10]:47408) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fcL1U-0003sx-4j for guix-patches@gnu.org; Sun, 08 Jul 2018 21:31:29 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1fcL1Q-0003ea-1n for guix-patches@gnu.org; Sun, 08 Jul 2018 21:31:28 -0400 Received: from [2001:19f0:5:274f:351:616f:fec3:2694] (port=55924 helo=vultr.systemreboot.net) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1fcL1P-0003dG-Eh for guix-patches@gnu.org; Sun, 08 Jul 2018 21:31:23 -0400 From: Arun Isaac Date: Mon, 9 Jul 2018 07:01:03 +0530 Message-Id: <20180709013103.26091-1-arunisaac@systemreboot.net> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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: 32102@debbugs.gnu.org * guix/build/utils.scm (wrap-program): While generating a new filename for the wrapped program, trim dots from the left of the basename. This prevents already wrapped files being wrapped again with two or more dots prepended to them. --- guix/build/utils.scm | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/guix/build/utils.scm b/guix/build/utils.scm index c58a1afd1..0794c658f 100644 --- a/guix/build/utils.scm +++ b/guix/build/utils.scm @@ -3,6 +3,7 @@ ;;; Copyright © 2013 Andreas Enge ;;; Copyright © 2013 Nikita Karetnikov ;;; Copyright © 2015, 2018 Mark H Weaver +;;; Copyright © 2018 Arun Isaac ;;; ;;; This file is part of GNU Guix. ;;; @@ -1032,7 +1033,8 @@ modules in $GUILE_LOAD_PATH, etc. If PROG has previously been wrapped by 'wrap-program', the wrapper is extended with definitions for VARS." (define wrapped-file - (string-append (dirname prog) "/." (basename prog) "-real")) + (string-append + (dirname prog) "/." (string-trim (basename prog) #\.) "-real")) (define already-wrapped? (file-exists? wrapped-file)) -- 2.15.1