From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp1.migadu.com ([2001:41d0:303:e16b::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms13.migadu.com with LMTPS id aHcFFimrZWdcCAAA62LTzQ:P1 (envelope-from ) for ; Fri, 20 Dec 2024 17:36:41 +0000 Received: from aspmx1.migadu.com ([2001:41d0:303:e16b::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp1.migadu.com with LMTPS id aHcFFimrZWdcCAAA62LTzQ (envelope-from ) for ; Fri, 20 Dec 2024 18:36:41 +0100 X-Envelope-To: larch@yhetil.org Authentication-Results: aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=debbugs.gnu.org header.s=debbugs-gnu-org header.b=k2W9Qt8V; dkim=fail ("headers rsa verify failed") header.d=rimm.ee header.s=herman header.b=TmpZgGbd; 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=1734716200; 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:in-reply-to:in-reply-to: references:references:list-id:list-help:list-unsubscribe: list-subscribe:list-post:dkim-signature; bh=FNiZV16DVl+v9tOWOXt1Jg/qFHHhOrF/yWnRsJTDfCU=; b=b0wGNIOA9bxsgWrEgrwZR5d+X82SV0rlabVv4wdtauEGzZrzDKLgelFlRwEVrN4QJUm20+ 0LnVn4iMkKFhnQShQ+LgPLO55TCfFRIW7PWCTLE079e/HS8w0OBxHUr/Y5kkMPO6gF/T7o TZ75adfDLE4ncTH4LVXn+wA+K8WnG3JJbywzgZydVtR2jeyrgSNsvGZPruMAOa+zZA4aXV 6MTeM3Fj+wWb+ZvGfc/5YVOVsRq4l5ZKH09zx+58Uzoq3yfW5OtpdW9OK5Bwmxl/Gfy/9f TLB9YfvhLdZd64vF1ZZeIprKug7DkVj89GQFknkwtXnrM7febZmPvSGe2GY7pA== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=debbugs.gnu.org header.s=debbugs-gnu-org header.b=k2W9Qt8V; dkim=fail ("headers rsa verify failed") header.d=rimm.ee header.s=herman header.b=TmpZgGbd; 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=1734716200; a=rsa-sha256; cv=none; b=ZrGQ0jcAtpTuiYptAnAp8qZjKsBnJXlbaPyso276i/qDImwJs+zCRcGFRGNo1I7JmXyim0 ekaxx6mXC9FXYVgJJKakvxbdXTw7ixk/G8AcJ+4Ip3HAqYY9V7mlcGMnDc8QBXQ5e2zDsd m6et1OPg5cAegXEVa11TCx856YeAFQ7y6xAVO0xYkmuclzMHb6ROz3nJPkXBTJxazuhchD 9DMqjY328ODvUYjWl9SSUW02Uu/7zjD5W2Z1pr6lV3UGyXYnEd/2SPCiRY/bTWl4X8pfA0 ywKY1emvGRES0TxvXMgrS1mVNUioM9y3F92ePqWB1e9Pt9OHyY1iFSdW5cATYQ== 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 24427401A3 for ; Fri, 20 Dec 2024 18:36:40 +0100 (CET) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1tOgv9-00071M-I0; Fri, 20 Dec 2024 12:36:15 -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 1tOgv6-00070X-A0 for guix-patches@gnu.org; Fri, 20 Dec 2024 12:36:12 -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 1tOgv6-00076w-0J; Fri, 20 Dec 2024 12:36:12 -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:References:In-Reply-To:Date:From:To:Subject; bh=FNiZV16DVl+v9tOWOXt1Jg/qFHHhOrF/yWnRsJTDfCU=; b=k2W9Qt8VKIrrortSAcnHgovnONHOlFmlf/F2eRni12wJSPW1atM4cDrkYuni3qx5LNZ6XQVcXsGF8oxOgXWP7P4uGD8CdASnP9mBbzrGUFqZk0MbhA+Q0fNeVVxKMJY2+POBwYQwqCrOYj/vYJJiP1n9OqB/V6KTWKGY9cdvngj4ELBtNSiOOsEd/wk0pIgbWw2QzFklr4jlv3DzIm8TGdMhKXb1niyjucPSOd+Wwn5+d1rW+2o5sWtNpBuHz5Zr3xav+Q5swwEakb+oy4ESZzzCzPneVCm2Vi7G2BJnQyXcbRgh2yySldemoH8vEt0xfN3xn8NSnxLHc4RQGYwkWw==; Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1tOguw-0004nj-NV; Fri, 20 Dec 2024 12:36:02 -0500 X-Loop: help-debbugs@gnu.org Subject: [bug#74997] [PATCH 3/5] import: utils: Move downstream-package-name to (guix utils). Resent-From: Herman Rimm Original-Sender: "Debbugs-submit" Resent-CC: andreas@enge.fr, andrew@trop.in, guix@cbaines.net, dev@jpoiret.xyz, cox.katherine.e+guix@gmail.com, liliana.prikler@gmail.com, ludo@gnu.org, othacehe@gnu.org, guix@nicolasgoaziou.fr, zimon.toutoune@gmail.com, me@tobias.gr, guix-patches@gnu.org Resent-Date: Fri, 20 Dec 2024 17:36:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 74997 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 74997@debbugs.gnu.org Cc: Andreas Enge , Andrew Tropin , Christopher Baines , Josselin Poiret , Katherine Cox-Buday , Liliana Marie Prikler , Ludovic =?UTF-8?Q?Court=C3=A8s?= , Mathieu Othacehe , Nicolas Goaziou , Simon Tournier , Tobias Geerinckx-Rice X-Debbugs-Original-Xcc: Andreas Enge , Andrew Tropin , Christopher Baines , Josselin Poiret , Katherine Cox-Buday , Liliana Marie Prikler , Ludovic =?UTF-8?Q?Court=C3=A8s?= , Mathieu Othacehe , Nicolas Goaziou , Simon Tournier , Tobias Geerinckx-Rice Received: via spool by 74997-submit@debbugs.gnu.org id=B74997.173471615818422 (code B ref 74997); Fri, 20 Dec 2024 17:36:02 +0000 Received: (at 74997) by debbugs.gnu.org; 20 Dec 2024 17:35:58 +0000 Received: from localhost ([127.0.0.1]:43919 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) 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 ) 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) 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: References: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 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-Country: US X-Migadu-Flow: FLOW_IN X-Migadu-Scanner: mx13.migadu.com X-Migadu-Spam-Score: -0.94 X-Spam-Score: -0.94 X-Migadu-Queue-Id: 24427401A3 X-TUID: MdYkXFomQDPQ * 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