guix-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

11/12: import/print: Don't factorize URI if there's no version match.


From: guix-commits
Subject: 11/12: import/print: Don't factorize URI if there's no version match.
Date: Thu, 16 Apr 2020 17:43:22 -0400 (EDT)

rekado pushed a commit to branch master
in repository guix.

commit 3c0422b9be649e0a09caa0b893713a9f07855cd3
Author: Ricardo Wurmus <address@hidden>
AuthorDate: Thu Apr 16 22:09:41 2020 +0200

    import/print: Don't factorize URI if there's no version match.
    
    * guix/import/print.scm (package->code): If FACTORIZE-URI returns just the
    unmodified string use that as the URI.
---
 guix/import/print.scm | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/guix/import/print.scm b/guix/import/print.scm
index 471687c..11cc218 100644
--- a/guix/import/print.scm
+++ b/guix/import/print.scm
@@ -79,7 +79,9 @@ when evaluated."
           (patches   (origin-patches source)))
       `(origin
          (method ,(procedure-name method))
-         (uri (string-append ,@(factorize-uri uri version)))
+         (uri (string-append ,@(match (factorize-uri uri version)
+                                 ((? string? uri) (list uri))
+                                 (factorized factorized))))
          (sha256
           (base32
            ,(format #f "~a" (bytevector->nix-base32-string sha256))))



reply via email to

[Prev in Thread] Current Thread [Next in Thread]