GNU bug report logs - #32102
[PATCH] utils: Fix wrap-program filename generation.

Previous Next

Package: guix-patches;

Reported by: Arun Isaac <arunisaac <at> systemreboot.net>

Date: Mon, 9 Jul 2018 01:32:02 UTC

Severity: normal

Tags: patch

Done: Arun Isaac <arunisaac <at> systemreboot.net>

Bug is archived. No further changes may be made.

Full log


Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Arun Isaac <arunisaac <at> systemreboot.net>
To: guix-patches <at> gnu.org
Cc: Arun Isaac <arunisaac <at> systemreboot.net>
Subject: [PATCH] utils: Fix wrap-program filename generation.
Date: Mon,  9 Jul 2018 07:01:03 +0530
* 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 <andreas <at> enge.fr>
 ;;; Copyright © 2013 Nikita Karetnikov <nikita <at> karetnikov.org>
 ;;; Copyright © 2015, 2018 Mark H Weaver <mhw <at> netris.org>
+;;; Copyright © 2018 Arun Isaac <arunisaac <at> systemreboot.net>
 ;;;
 ;;; 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





This bug report was last modified 6 years and 256 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.