From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp0.migadu.com ([2001:41d0:303:e224::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms13.migadu.com with LMTPS id INs3J0m/ZWf3FAEAqHPOHw:P1 (envelope-from ) for ; Fri, 20 Dec 2024 19:02:33 +0000 Received: from aspmx1.migadu.com ([2001:41d0:303:e224::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp0.migadu.com with LMTPS id INs3J0m/ZWf3FAEAqHPOHw (envelope-from ) for ; Fri, 20 Dec 2024 20:02:33 +0100 X-Envelope-To: larch@yhetil.org Authentication-Results: aspmx1.migadu.com; dkim=fail ("body hash did not verify") header.d=debbugs.gnu.org header.s=debbugs-gnu-org header.b=OUSG5p8C; dkim=fail ("headers rsa verify failed") header.d=rimm.ee header.s=herman header.b=KcxuCcG9; spf=pass (aspmx1.migadu.com: domain of "guix-patches-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="guix-patches-bounces+larch=yhetil.org@gnu.org"; dmarc=pass (policy=none) header.from=gnu.org ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1734721353; h=from:from:sender:sender:reply-to:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding:resent-cc: resent-from:resent-sender:resent-message-id:list-id:list-help: list-unsubscribe:list-subscribe:list-post:dkim-signature; bh=omTJOqC55pPW78GSKunJkwx4C8V8fprVyTeIAE6IbX4=; b=FsXkYXBJRnIczclAxMeVEqI3fRFFXh7TWXZkvsURPfGu37W/SkurtocQ7NFu+Mh9SAKgbO Om43ojX6Nay9ET4My2qQtqz4GWkHTcIHbTiivol2YnS9vlnred39RwfhknD4p7HDP88ZLx wNF+kKTMq2PqWaJj1uDnbgDT6Kjaax5DneFr60iUZwGLzyvzT/JfowrfoH84bauHTd4yNz /1hiPrQ6qQdOMy+MlWlYi4nt9umdH1mLwnPA4m/dGOXJMDaJhVnSPmjLKkV9mqWTawipju q4aMfFsfbnqke5iTqStkKBepErbaCOf+1O45u5qv67Et/ouX3V/yP0oCfNJ4rw== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("body hash did not verify") header.d=debbugs.gnu.org header.s=debbugs-gnu-org header.b=OUSG5p8C; dkim=fail ("headers rsa verify failed") header.d=rimm.ee header.s=herman header.b=KcxuCcG9; spf=pass (aspmx1.migadu.com: domain of "guix-patches-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="guix-patches-bounces+larch=yhetil.org@gnu.org"; dmarc=pass (policy=none) header.from=gnu.org ARC-Seal: i=1; s=key1; d=yhetil.org; t=1734721353; a=rsa-sha256; cv=none; b=ihTYApc3M54vAi0CBWK25faxkEOdfBQiTFGRgxnqBFe6J/19IQe3VORcF1Lm9LIeTScOG9 IJ8OMct3ubSAnSh3Cm84P56ReRSD3Hg9azQHevuZfUb3gJexVV1PaNp7qzskJJ4gIxd76B MLj8qxvRtLfsCH4SVDx6x1DkepFTcuO1WwLTOV1MR83AkmcRr7KJhQ3Gf7aY0nT363dPs4 BY17R8y5amnbEHZ6McdaLHD1T/eExt+L5NuR+drkD3MDIN9v/3BSdtmXKeMMK7vK5M9mX7 fD75hVdCR1NHsJg/dS0oDIXfvOuGlg97LHNS7JiWlKbgItw/ukNj8AD0jJYBgw== Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id 333A84335 for ; Fri, 20 Dec 2024 20:02:33 +0100 (CET) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1tOgt5-0006iE-CL; Fri, 20 Dec 2024 12:34:08 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1tOgt3-0006i4-DS for guix-patches@gnu.org; Fri, 20 Dec 2024 12:34:05 -0500 Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1tOgt3-0004dZ-4Y for guix-patches@gnu.org; Fri, 20 Dec 2024 12:34:05 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=debbugs.gnu.org; s=debbugs-gnu-org; h=MIME-Version:Date:From:To:Subject; bh=6D9Sm+SrxlSo12mu/e0uN2GQyHaIODKg8RJfdY/tH/I=; b=OUSG5p8Cpd8gg9xdikK0JYMPHwo8+6H9TFjVSMcocoLZkGFGKnsGpnATefcvW5OAlK1wsxOzCVw54ZXRFwfxUonzMKDOTsdeSCY3GqcZ+0uxVyl0+bOSCvvZ2+dcjiPQef+EZlEX8yZ49LeteuBrhAMjFOcCSfi+7o4kAmWEHEscTSlOTNXWFqTH1VyNGgWrBgMOnLFIwYgmknp+MaUl6GiBGRiO1bvf0GNLdAycT3NfUoqjK9QRPdw9REf5mXEHgJ/+0MTUazvsl9mUadG17eiJbM+5jJ1YKqgS4RVnQttJGHEXOHdkoUvdNZmC5qz3cJ6KaXoQr/HBXCC2L3/rfQ==; Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1tOgsz-0004cS-P9; Fri, 20 Dec 2024 12:34:01 -0500 X-Loop: help-debbugs@gnu.org Subject: [bug#74997] [PATCH 1/5] import: utils: Rename guix-name to downstream-package-name. Resent-From: Herman Rimm Original-Sender: "Debbugs-submit" Resent-CC: andrew@trop.in, efraim@flashner.co.il, cox.katherine.e+guix@gmail.com, laurent.gatto@gmail.com, liliana.prikler@gmail.com, rekado@elephly.net, zimon.toutoune@gmail.com, guix-patches@gnu.org Resent-Date: Fri, 20 Dec 2024 17:34:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 74997 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 74997@debbugs.gnu.org Cc: Andrew Tropin , Efraim Flashner , Katherine Cox-Buday , Laurent Gatto , Liliana Marie Prikler , Ricardo Wurmus , Simon Tournier X-Debbugs-Original-To: guix-patches@gnu.org X-Debbugs-Original-Xcc: Andrew Tropin , Efraim Flashner , Katherine Cox-Buday , Laurent Gatto , Liliana Marie Prikler , Ricardo Wurmus , Simon Tournier Received: via spool by submit@debbugs.gnu.org id=B.173471600717667 (code B ref -1); Fri, 20 Dec 2024 17:34:01 +0000 Received: (at submit) by debbugs.gnu.org; 20 Dec 2024 17:33:27 +0000 Received: from localhost ([127.0.0.1]:43894 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tOgsQ-0004as-UF for submit@debbugs.gnu.org; Fri, 20 Dec 2024 12:33:27 -0500 Received: from lists.gnu.org ([209.51.188.17]:37846) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tOgsO-0004ai-9r for submit@debbugs.gnu.org; Fri, 20 Dec 2024 12:33:25 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1tOgsN-0006Q0-R7 for guix-patches@gnu.org; Fri, 20 Dec 2024 12:33:24 -0500 Received: from 81-205-150-117.fixed.kpn.net ([81.205.150.117] helo=email.rimm.ee) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_CHACHA20_POLY1305:256) (Exim 4.90_1) (envelope-from ) id 1tOgsL-0004WE-89 for guix-patches@gnu.org; Fri, 20 Dec 2024 12:33:23 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=rimm.ee; s=herman; t=1734715994; 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; bh=omTJOqC55pPW78GSKunJkwx4C8V8fprVyTeIAE6IbX4=; b=KcxuCcG9ctw8DFU+3n+7Fw6SxamfsakGj0ZZ/GfZEIBPost3Nq3IHjcAap9jQm9WWr4Bum ELma7uryXqASSK42iY3to6XEEGNjs8cHX1GNi8YkWVH+Ah7BvtbSmSsIUHGslF+hMiO0AT 8sskZ5mK3SfVSFHgjGdvQTT+xzSyKy4m9fGL0etKh4pB0Fa8GwsIY1W1R/AYnk1ok2Jtdv 4eyu9CN69Nv8ujVhJ42+goDlbONWOpro46qkTHBLZNyFwczdaCYmpQj/htVGyvb3Rk+U3R 2a2vNRMarrF4HEVexeLmlHgjFX9QE0KAQlzbrINUzfXxtjiQA/l3Q7L+fmFIFg== Received: by 81-205-150-117.fixed.kpn.net (OpenSMTPD) with ESMTPSA id 07d1142e (TLSv1.3:TLS_CHACHA20_POLY1305_SHA256:256:NO) for ; Fri, 20 Dec 2024 17:33:14 +0000 (UTC) Date: Fri, 20 Dec 2024 18:32:32 +0100 Message-ID: X-Mailer: git-send-email 2.45.2 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Received-SPF: pass client-ip=81.205.150.117; envelope-from=herman@rimm.ee; helo=email.rimm.ee X-Spam_score_int: -16 X-Spam_score: -1.7 X-Spam_bar: - X-Spam_report: (-1.7 / 5.0 requ) BAYES_00=-1.9, DKIM_INVALID=0.1, DKIM_SIGNED=0.1, RCVD_IN_VALIDITY_RPBL_BLOCKED=0.001, RCVD_IN_VALIDITY_SAFE_BLOCKED=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, TVD_RCVD_IP=0.001, T_FILL_THIS_FORM_SHORT=0.01 autolearn=no autolearn_force=no X-Spam_action: no action X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: guix-patches@gnu.org List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-to: Herman Rimm X-ACL-Warn: , Herman Rimm via Guix-patches From: Herman Rimm via Guix-patches via Errors-To: guix-patches-bounces+larch=yhetil.org@gnu.org Sender: guix-patches-bounces+larch=yhetil.org@gnu.org X-Migadu-Flow: FLOW_IN X-Migadu-Country: US X-Migadu-Scanner: mx12.migadu.com X-Migadu-Spam-Score: 0.87 X-Spam-Score: 0.87 X-Migadu-Queue-Id: 333A84335 X-TUID: zPFzoaVYTAzb * guix/import/cran.scm (cran-guix-name): Adjust. * guix/import/crate.scm (crate-name->package-name): Adjust. * guix/import/elpa.scm (elpa-guix-name): Adjust. * guix/import/npm-binary.scm (npm-name->name): Adjust. * guix/import/utils.scm (downstream-package-name): Add procedure. [description]: Use definite article, uppercase 'name' argument. (guix-name): Deprecate. Change-Id: I374892be18fbeaae1bc051b8d0c79ca4c33ed8c4 --- guix/import/cran.scm | 2 +- guix/import/crate.scm | 2 +- guix/import/elpa.scm | 2 +- guix/import/npm-binary.scm | 2 +- guix/import/utils.scm | 8 ++++++-- 5 files changed, 10 insertions(+), 6 deletions(-) diff --git a/guix/import/cran.scm b/guix/import/cran.scm index fe69cb87f7..3bea9439e1 100644 --- a/guix/import/cran.scm +++ b/guix/import/cran.scm @@ -478,7 +478,7 @@ (define (transform-sysname sysname) ("zlib1g-dev" "zlib") (_ sysname))) -(define cran-guix-name (cut guix-name "r-" <>)) +(define cran-guix-name (cut downstream-package-name "r-" <>)) (define (directory-needs-fortran? dir) "Check if the directory DIR contains Fortran source files." diff --git a/guix/import/crate.scm b/guix/import/crate.scm index 5996571cda..c50f0a8415 100644 --- a/guix/import/crate.scm +++ b/guix/import/crate.scm @@ -467,7 +467,7 @@ (define (guix-package->crate-name package) ((name _ ...) name)))) (define (crate-name->package-name name) - (guix-name "rust-" name)) + (downstream-package-name "rust-" name)) diff --git a/guix/import/elpa.scm b/guix/import/elpa.scm index 46b6dc98a2..b86a6a546b 100644 --- a/guix/import/elpa.scm +++ b/guix/import/elpa.scm @@ -481,7 +481,7 @@ (define %elpa-updater (pred package-from-elpa-repository?) (import latest-release))) -(define elpa-guix-name (cut guix-name "emacs-" <>)) +(define elpa-guix-name (cut downstream-package-name "emacs-" <>)) (define* (elpa-recursive-import package-name #:optional (repo 'gnu)) (recursive-import package-name diff --git a/guix/import/npm-binary.scm b/guix/import/npm-binary.scm index 6dfedc4910..92ac7d338e 100644 --- a/guix/import/npm-binary.scm +++ b/guix/import/npm-binary.scm @@ -178,7 +178,7 @@ (define (npm-name->name npm-name) (define (clean name) (string-map (lambda (chr) (if (char=? chr #\/) #\- chr)) (string-filter (negate (cut char=? <> #\@)) name))) - (guix-name "node-" (clean npm-name))) + (downstream-package-name "node-" (clean npm-name))) (define (name+version->symbol name version) (string->symbol (string-append name "-" version))) diff --git a/guix/import/utils.scm b/guix/import/utils.scm index e45c8dfb20..0b1b3b3298 100644 --- a/guix/import/utils.scm +++ b/guix/import/utils.scm @@ -37,6 +37,7 @@ (define-module (guix import utils) #:use-module ((guix licenses) #:prefix license:) #:use-module (guix utils) #:use-module (guix packages) + #:use-module (guix deprecation) #:use-module (guix discovery) #:use-module (guix build-system) #:use-module ((guix i18n) #:select (G_)) @@ -82,6 +83,7 @@ (define-module (guix import utils) read-lines chunk-lines + downstream-package-name guix-name recursive-import)) @@ -612,14 +614,16 @@ (define* (chunk-lines lines #:optional (pred string-null?)) (reverse res) (loop (cdr after) res)))))) -(define (guix-name prefix name) - "Return a Guix package name for a given package name." +(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 node-dependencies node-name) base-commit: 7f91b12fe31baa0838ae2e942d4515911e71b137 -- 2.45.2