From mboxrd@z Thu Jan 1 00:00:00 1970 From: Ricardo Wurmus Subject: [PATCH 1/7] import cran: Remove more invalid characters from package names. Date: Mon, 23 May 2016 17:32:13 +0200 Message-ID: <1464017539-1478-1-git-send-email-ricardo.wurmus@mdc-berlin.de> Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:43219) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1b4rqL-0005Rb-Eo for guix-devel@gnu.org; Mon, 23 May 2016 11:32:34 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1b4rqG-0001XG-Dq for guix-devel@gnu.org; Mon, 23 May 2016 11:32:33 -0400 Received: from venus.bbbm.mdc-berlin.de ([141.80.25.30]:58576) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1b4rqG-0001WU-2T for guix-devel@gnu.org; Mon, 23 May 2016 11:32:28 -0400 Received: from localhost (localhost [127.0.0.1]) by venus.bbbm.mdc-berlin.de (Postfix) with ESMTP id 17D66380847 for ; Mon, 23 May 2016 17:32:26 +0200 (CEST) Received: from venus.bbbm.mdc-berlin.de ([127.0.0.1]) by localhost (venus.bbbm.mdc-berlin.de [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id io8YgcTVYm8X for ; Mon, 23 May 2016 17:32:20 +0200 (CEST) Received: from HTCAONE.mdc-berlin.net (puck.citx.mdc-berlin.de [141.80.36.101]) (using TLSv1 with cipher ECDHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by venus.bbbm.mdc-berlin.de (Postfix) with ESMTPS for ; Mon, 23 May 2016 17:32:20 +0200 (CEST) List-Id: "Development of GNU Guix and the GNU System distribution." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-devel-bounces+gcggd-guix-devel=m.gmane.org@gnu.org Sender: "Guix-devel" To: guix-devel@gnu.org * guix/import/cran.scm (guix-name): Replace period and underscore with dash; always prepend package names with "r-". --- guix/import/cran.scm | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/guix/import/cran.scm b/guix/import/cran.scm index c1a9e8e..8b368af 100644 --- a/guix/import/cran.scm +++ b/guix/import/cran.scm @@ -151,9 +151,9 @@ empty list when the FIELD cannot be found." "Return the `package' s-expression for an R package published on REPOSITORY from the alist META, which was derived from the R package's DESCRIPTION file." (define (guix-name name) - (if (string-prefix? "r-" name) - (string-downcase name) - (string-append "r-" (string-downcase name)))) + (string-append "r-" (string-downcase + (regexp-substitute/global #f "(_|\\.)" name + 'pre "-" 'post)))) (let* ((base-url (case repository ((cran) %cran-url) -- 2.7.3