From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp2 ([2001:41d0:2:4a6f::]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) by ms0.migadu.com with LMTPS id wfMiENiNaWBg3QAAgWs5BA (envelope-from ) for ; Sun, 04 Apr 2021 11:58:48 +0200 Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp2 with LMTPS id QGXoCNiNaWD5dwAAB5/wlQ (envelope-from ) for ; Sun, 04 Apr 2021 09:58:48 +0000 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 B094B182D1 for ; Sun, 4 Apr 2021 11:58:47 +0200 (CEST) Received: from localhost ([::1]:57428 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lSzWo-00057q-S9 for larch@yhetil.org; Sun, 04 Apr 2021 05:58:46 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:55964) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lSzRH-0003oT-EJ for guix-patches@gnu.org; Sun, 04 Apr 2021 05:53:03 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:51573) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1lSzRG-0000Ng-Ht for guix-patches@gnu.org; Sun, 04 Apr 2021 05:53:03 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1lSzRG-00032V-GO for guix-patches@gnu.org; Sun, 04 Apr 2021 05:53:02 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#47591] [PATCH] import: go: Replace underscores with hyphens in package names. Resent-From: Xinglu Chen Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Sun, 04 Apr 2021 09:53:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 47591 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 47591@debbugs.gnu.org X-Debbugs-Original-To: guix-patches@gnu.org Received: via spool by submit@debbugs.gnu.org id=B.161752993411618 (code B ref -1); Sun, 04 Apr 2021 09:53:02 +0000 Received: (at submit) by debbugs.gnu.org; 4 Apr 2021 09:52:14 +0000 Received: from localhost ([127.0.0.1]:34886 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lSzQT-00031K-Uz for submit@debbugs.gnu.org; Sun, 04 Apr 2021 05:52:14 -0400 Received: from lists.gnu.org ([209.51.188.17]:56246) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lSzQR-00031C-Rl for submit@debbugs.gnu.org; Sun, 04 Apr 2021 05:52:12 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:55908) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lSzQR-0003Yw-I3 for guix-patches@gnu.org; Sun, 04 Apr 2021 05:52:11 -0400 Received: from h87-96-130-155.cust.a3fiber.se ([87.96.130.155]:52340 helo=mail.yoctocell.xyz) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lSzQP-0008Fi-M5 for guix-patches@gnu.org; Sun, 04 Apr 2021 05:52:11 -0400 From: Xinglu Chen DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=yoctocell.xyz; s=mail; t=1617529924; bh=M/wrnEA///f8Hb/vp0HyAeK9M8hPlCbjbjl7xxtCQ2c=; h=From:To:Subject:Date; b=NFKvEcZkxEPASRxj3EoFogXqRXozzlCkHM0lnTKSOaZ5WTcTjcZEszLAs0KYJPfAW Un/5NEL9ABwEEbPZOgpyRJEzXURKGhIzOwkaTMOdwVieP9NijtGRwduOODd5QiYX1E AHnKT79QiidQM/K6+jBO7m+aQbQbPoP8APHao8Uc= Message-Id: Date: Sun, 04 Apr 2021 11:52:03 +0200 MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Received-SPF: pass client-ip=87.96.130.155; envelope-from=public@yoctocell.xyz; helo=mail.yoctocell.xyz X-Spam_score_int: 14 X-Spam_score: 1.4 X-Spam_bar: + X-Spam_report: (1.4 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FROM_SUSPICIOUS_NTLD=0.5, FROM_SUSPICIOUS_NTLD_FP=0.001, PDS_OTHER_BAD_TLD=1.999, RDNS_DYNAMIC=0.982, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 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: , Errors-To: guix-patches-bounces+larch=yhetil.org@gnu.org Sender: "Guix-patches" X-Migadu-Flow: FLOW_IN ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1617530328; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:mime-version:mime-version: content-type:content-type: 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=WHufJ0+FhtCnQzhSGdy23Tgd9biZCiu8VQMPHXjgNqQ=; b=d87mJXnKERyvLQfcmlkKXFbkpnj1E+l6f1vj+WCy1E/7AwDiAmErdYteeBzVlOhqmM4VZy omybe5cjGvCfzGWagwK6nJHBb+ttLDstyhUxgbEm0C+NHH/zjHwMvzcgDbb1t1nNdlV7vk 5Gwm6/nZVqaT8VO/R3qD8CAidnBc9GKIq/g+cBYxtk6jPQoVB3LesBhN8Li1X33dBu1+5l l8O3lTve4HuNrH3J5EP7x4DX9BJXSPZHmHWlDINHwhYBpX0xbZ1Yvtk96jrCFZ6wXpoxoh sJjRpt3nK3mXKSzaVou8ZBqh0MH9/7gko0C+W5zqYGq8PmviWWieGFafRRXrOA== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1617530328; a=rsa-sha256; cv=none; b=NEQe2+ZO8GikhbfLoo8fiTXmLPi8kENLgMEMxnvkmKL7fL21E8UwnUy9oc3oeZrftm5HA6 N+xwy7PZE89nwRVwmicGfLWXZ88ihV7GLxwSL9yS0fpP/tDPZDVH5eoELeUGcTrakw+HXM huqR5VBMRoQS6C4jEgpEAbG+49aZmmJHRvAejQdl21Fd17Da80eVNHHK8jwpAZ7Yt7y6Fj 1pLZ6fF55lZZ7ud6FYm1qTpMezG7O6Cdp3SJdAdOwwlX2lzUbP5Tx7Kqo8h0KFQ9z+fc4L 4LTqUxacJ943HD7lKkmPyJlhvOfIErW0MOaDCxoNLRVjamAvjEw1KNVqQMUwXw== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=yoctocell.xyz header.s=mail header.b=NFKvEcZk; dmarc=fail reason="SPF not aligned (relaxed)" header.from=yoctocell.xyz (policy=none); spf=pass (aspmx1.migadu.com: domain of guix-patches-bounces@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=guix-patches-bounces@gnu.org X-Migadu-Spam-Score: -0.34 Authentication-Results: aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=yoctocell.xyz header.s=mail header.b=NFKvEcZk; dmarc=fail reason="SPF not aligned (relaxed)" header.from=yoctocell.xyz (policy=none); spf=pass (aspmx1.migadu.com: domain of guix-patches-bounces@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=guix-patches-bounces@gnu.org X-Migadu-Queue-Id: B094B182D1 X-Spam-Score: -0.34 X-Migadu-Scanner: scn0.migadu.com X-TUID: bmo28LWhWV6X As per section '16.4.2 Package Naming' in the manual, use hypens instead of underscores in package names. * guix/import/go.scm (go-module->guix-package-name): Replace underscores with hyphens. --- Maybe we should also make the linter check for underscores in package names, and give a warning if it finds any underscores? guix/import/go.scm | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/guix/import/go.scm b/guix/import/go.scm index 7452b4c903..6c0231e113 100644 --- a/guix/import/go.scm +++ b/guix/import/go.scm @@ -4,6 +4,7 @@ ;;; Copyright =C2=A9 2021 Fran=C3=A7ois Joulaud ;;; Copyright =C2=A9 2021 Maxim Cournoyer ;;; Copyright =C2=A9 2021 Ludovic Court=C3=A8s +;;; Copyright =C2=A9 2021 Xinglu Chen ;;; ;;; This file is part of GNU Guix. ;;; @@ -380,9 +381,11 @@ hence the need to derive this information." "Converts a module's path to the canonical Guix format for Go packages." (string-downcase (string-append "go-" (string-replace-substring (string-replace-substring - module-path - "." "-") - "/" "-")))) + (string-replace-substring + module-path + "." "-") + "/" "-") + "_" "-")))) =20 (define-record-type (make-module-meta import-prefix vcs repo-root) base-commit: 86617c92c6a795668b2eca3d3c3b285cb742cb24 --=20 2.31.1