GNU bug report logs - #74997
[PATCH 1/5] import: utils: Rename guix-name to downstream-package-name.

Previous Next

Package: guix-patches;

Reported by: Herman Rimm <herman <at> rimm.ee>

Date: Fri, 20 Dec 2024 17:34:01 UTC

Severity: normal

Tags: patch

Done: Ludovic Courtès <ludo <at> gnu.org>

Bug is archived. No further changes may be made.

Full log


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

From: Herman Rimm <herman <at> rimm.ee>
To: 74997 <at> debbugs.gnu.org
Subject: [PATCH 2/5] import: texlive: Remove guix-name.
Date: Fri, 20 Dec 2024 18:35:02 +0100
* guix/import/texlive.scm (guix-name): Remove.
(list-upstream-inputs, tlpdb->package): Use downstream-package-name.

Change-Id: I8f04d27a42f762c5604cb8874042fabbbe1e9873
---
 guix/import/texlive.scm | 14 +++-----------
 1 file changed, 3 insertions(+), 11 deletions(-)

diff --git a/guix/import/texlive.scm b/guix/import/texlive.scm
index 6d04cc25ee..8ce22a1d59 100644
--- a/guix/import/texlive.scm
+++ b/guix/import/texlive.scm
@@ -334,15 +334,6 @@ (define string->license
     ((lst ...) `(list ,@(map string->license lst)))
     (x `(error unknown-license ,x))))
 
-(define (guix-name name)
-  "Return a Guix package name for a given Texlive package NAME."
-  (string-append "texlive-"
-                 (string-map (match-lambda
-                               (#\_ #\-)
-                               (#\. #\-)
-                               (chr (char-downcase chr)))
-                             name)))
-
 (define* (filter-depends depends #:optional texlive-only)
   "Filter upstream package names DEPENDS to include only their equivalent Guix
 package names, without \"texlive-\" prefix.  When TEXLIVE-ONLY is true, ignore
@@ -578,7 +569,8 @@ (define (list-upstream-inputs upstream-name version database)
        (map (lambda (input-name)
               (upstream-input
                (name input-name)
-               (downstream-name (guix-name input-name))
+               (downstream-name (downstream-package-name "texlive-"
+                                                         input-name))
                (type 'propagated)))
             (sort (append
                    (filter-depends (or (assoc-ref package-data 'depend) '()))
@@ -655,7 +647,7 @@ (define (texlive->svn-multi-reference upstream-name version database)
 
 (define (tlpdb->package upstream-name version database)
   (and-let* ((data (assoc-ref database upstream-name))
-             (name (guix-name upstream-name))
+             (name (downstream-package-name "texlive-" upstream-name))
              (reference
               (texlive->svn-multi-reference upstream-name version database))
              (source (with-store store
-- 
2.45.2





This bug report was last modified 123 days ago.

Previous Next


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