GNU bug report logs

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

PackageSource(s)Maintainer(s)
guix-patches PTS Buildd Popcon
Full log

Message #11 received at 74997@debbugs.gnu.org (full text, mbox, reply):

Received: (at 74997) by debbugs.gnu.org; 20 Dec 2024 17:35:58 +0000
From debbugs-submit-bounces@debbugs.gnu.org Fri Dec 20 12:35:58 2024
Received: from localhost ([127.0.0.1]:43919 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces@debbugs.gnu.org>)
	id 1tOgur-0004n3-Pt
	for submit@debbugs.gnu.org; Fri, 20 Dec 2024 12:35:58 -0500
Received: from 81-205-150-117.fixed.kpn.net ([81.205.150.117]:46013
 helo=email.rimm.ee) by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <herman@rimm.ee>) id 1tOgun-0004mD-FY
 for 74997@debbugs.gnu.org; Fri, 20 Dec 2024 12:35:54 -0500
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=rimm.ee; s=herman;
 t=1734716146;
 h=from:from:reply-to:subject:subject:date:date:message-id:message-id:
 to:to:cc:mime-version:mime-version:
 content-transfer-encoding:content-transfer-encoding:
 in-reply-to:in-reply-to:references:references;
 bh=FNiZV16DVl+v9tOWOXt1Jg/qFHHhOrF/yWnRsJTDfCU=;
 b=TmpZgGbdg/MG2p2wrI9r8cN1oRlQGEJ9vaclmcvbMbsrjuEL/AJk0TWjBu05ESkPs2z0nQ
 fgVaz3ZVNKq/zekyUXURrSMCl5TeV/9h3RjEI9URDO7OBVTmeZt3tgFzfAXQ03sZY9g0Nu
 OkhLkGi9phJ6Bxy5xOIO9pfJsoNKA+2e/WUGHeopa/+2pA4Ppla9P1tcNfW+kgCSGD7P46
 76hRGwpIWQDE5qv22FLLSvLj+2rEVut5Nli+D03H51unpqGi4LuSXBr3u98Spcrqdrll4+
 6DuKOr43/Gkl96X5lJ9b2Xjdm+URtlzBjjXBsPkM1tuy4266t83A6Wn0o0EmPw==
Received: by 81-205-150-117.fixed.kpn.net (OpenSMTPD) with ESMTPSA id 9f20b1a0
 (TLSv1.3:TLS_CHACHA20_POLY1305_SHA256:256:NO)
 for <74997@debbugs.gnu.org>; Fri, 20 Dec 2024 17:35:46 +0000 (UTC)
From: Herman Rimm <herman@rimm.ee>
To: 74997@debbugs.gnu.org
Subject: [PATCH 3/5] import: utils: Move downstream-package-name to (guix
 utils).
Date: Fri, 20 Dec 2024 18:35:03 +0100
Message-ID: <22e9c6d15adb7a3dca3afb76ba2407c076b94af2.1734715617.git.herman@rimm.ee>
X-Mailer: git-send-email 2.45.2
In-Reply-To: <e8e619647cf325c69d274e0ff0b49ed9115327ac.1734715617.git.herman@rimm.ee>
References: <e8e619647cf325c69d274e0ff0b49ed9115327ac.1734715617.git.herman@rimm.ee>
MIME-Version: 1.0
X-Debbugs-Cc: Andreas Enge <andreas@enge.fr>, Andrew Tropin <andrew@trop.in>, Christopher Baines <guix@cbaines.net>, Josselin Poiret <dev@jpoiret.xyz>, Katherine Cox-Buday <cox.katherine.e+guix@gmail.com>, Liliana Marie Prikler <liliana.prikler@gmail.com>, Ludovic Courtès <ludo@gnu.org>, Mathieu Othacehe <othacehe@gnu.org>, Nicolas Goaziou <guix@nicolasgoaziou.fr>, Simon Tournier <zimon.toutoune@gmail.com>, Tobias Geerinckx-Rice <me@tobias.gr>
Content-Transfer-Encoding: 8bit
X-Spam-Score: 0.0 (/)
X-Debbugs-Envelope-To: 74997
X-BeenThere: debbugs-submit@debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request@debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit@debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request@debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request@debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces@debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces@debbugs.gnu.org>
X-Spam-Score: -1.0 (-)
* guix/import/elpa.scm: Import (guix utils).
* guix/import/texlive.scm: Import (guix utils).
* guix/import/utils.scm (downstream-package-name): Move to ...
* guix/utils.scm (downstream-package-name): ... here.

Change-Id: If56a452f64ed06c8bb06a96a283a5067cb54d602
---
 guix/import/elpa.scm    | 1 +
 guix/import/texlive.scm | 1 +
 guix/import/utils.scm   | 9 ---------
 guix/utils.scm          | 9 +++++++++
 4 files changed, 11 insertions(+), 9 deletions(-)

diff --git a/guix/import/elpa.scm b/guix/import/elpa.scm
index b86a6a546b..62b1d645ac 100644
--- a/guix/import/elpa.scm
+++ b/guix/import/elpa.scm
@@ -44,6 +44,7 @@ (define-module (guix import elpa)
   #:use-module (guix git)
   #:use-module (guix hash)
   #:use-module (guix store)
+  #:use-module ((guix utils) #:select (downstream-package-name))
   #:use-module (guix base32)
   #:use-module (guix upstream)
   #:use-module (guix packages)
diff --git a/guix/import/texlive.scm b/guix/import/texlive.scm
index 8ce22a1d59..8e67d11c69 100644
--- a/guix/import/texlive.scm
+++ b/guix/import/texlive.scm
@@ -35,6 +35,7 @@ (define-module (guix import texlive)
   #:use-module (guix store)
   #:use-module (guix svn-download)
   #:use-module (guix upstream)
+  #:use-module ((guix utils) #:select (downstream-package-name))
   #:use-module (ice-9 ftw)
   #:use-module (ice-9 match)
   #:use-module (ice-9 popen)
diff --git a/guix/import/utils.scm b/guix/import/utils.scm
index 0b1b3b3298..6f5efa790e 100644
--- a/guix/import/utils.scm
+++ b/guix/import/utils.scm
@@ -83,7 +83,6 @@ (define-module (guix import utils)
             read-lines
             chunk-lines
 
-            downstream-package-name
             guix-name
 
             recursive-import))
@@ -614,14 +613,6 @@ (define* (chunk-lines lines #:optional (pred string-null?))
             (reverse res)
             (loop (cdr after) res))))))
 
-(define (downstream-package-name prefix name)
-  "Return the Guix package name for a given package NAME."
-  (string-append prefix (string-map (match-lambda
-                                      (#\_ #\-)
-                                      (#\. #\-)
-                                      (chr (char-downcase chr)))
-                                    name)))
-
 (define-deprecated/alias guix-name downstream-package-name)
 
 (define (topological-sort nodes
diff --git a/guix/utils.scm b/guix/utils.scm
index 537d0490e0..2d82329cb7 100644
--- a/guix/utils.scm
+++ b/guix/utils.scm
@@ -91,6 +91,7 @@ (define-module (guix utils)
             %current-system
             %current-target-system
             package-name->name+version
+            downstream-package-name
             target-linux?
             target-hurd?
             system-hurd?
@@ -706,6 +707,14 @@ (define* (package-name->name+version spec
     (idx (values (substring spec 0 idx)
                  (substring spec (1+ idx))))))
 
+(define (downstream-package-name prefix name)
+  "Return the Guix package name for a given package NAME."
+  (string-append prefix (string-map (match-lambda
+                                      (#\_ #\-)
+                                      (#\. #\-)
+                                      (chr (char-downcase chr)))
+                                    name)))
+
 (define* (target-linux? #:optional (target (or (%current-target-system)
                                                (%current-system))))
   "Does the operating system of TARGET use the Linux kernel?"
-- 
2.45.2





Send a report that this bug log contains spam.


debbugs.gnu.org maintainers <help-debbugs@gnu.org>. Last modified: Sun Dec 22 10:23:54 2024; Machine Name: wallace-server

GNU bug tracking system

Debbugs is free software and licensed under the terms of the GNU Public License version 2. The current version can be obtained from https://bugs.debian.org/debbugs-source/.

Copyright © 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson, 2005-2017 Don Armstrong, and many other contributors.