bug#34626: pack: Construct inferior package names correctly.

Message ID 87h8c322re.fsf@gnu.org
State Accepted
Headers show
Series bug#34626: pack: Construct inferior package names correctly. | expand

Checks

Context Check Description
cbaines/applying patch fail Apply failed
cbaines/applying patch fail Apply failed
cbaines/applying patch fail Apply failed
cbaines/applying patch fail Apply failed

Commit Message

Ludovic Courtès March 15, 2019, 10:26 p.m. UTC
Hello,

Shyam <shyam@sykloid.org> skribis:

> This patch fixes a bug where inferior packages' names were not being
> constructed correctly when calling `guix pack --relocatable`.

Good catch!

>>From dd2171ce0d074cb6003afdaec353df572ed784a8 Mon Sep 17 00:00:00 2001
> From: "P.C. Shyamshankar" <shyam@sykloid.org>
> Date: Fri, 22 Feb 2019 22:38:47 -0500
> Subject: [PATCH] pack: Construct inferior package names correctly.
>
> * guix/scripts/pack.scm: 'wrapped-package' now correctly constructs full
>   names of inferior packages, allowing relocatable packs.

Applied with the minor change below.

Thank you, and sorry for the delay!

Ludo’.

Patch

diff --git a/guix/scripts/pack.scm b/guix/scripts/pack.scm
index e40c2085f7..17a166d9d7 100644
--- a/guix/scripts/pack.scm
+++ b/guix/scripts/pack.scm
@@ -28,7 +28,7 @@ 
   #:use-module (guix store)
   #:use-module ((guix status) #:select (with-status-verbosity))
   #:use-module (guix grafts)
-  #:use-module (guix inferior)
+  #:autoload   (guix inferior) (inferior-package?)
   #:use-module (guix monads)
   #:use-module (guix modules)
   #:use-module (guix packages)
@@ -593,7 +593,8 @@  please email '~a'~%")
                         ((inferior-package? package)
                          (string-append (inferior-package-name package)
                                         "-"
-                                        (inferior-package-version package))))
+                                        (inferior-package-version package)))
+                        (else "wrapper"))
                   "R")
                  build))