From patchwork Fri Jul 30 03:54:58 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Sarah Morgensen X-Patchwork-Id: 31649 Return-Path: X-Original-To: patchwork@mira.cbaines.net Delivered-To: patchwork@mira.cbaines.net Received: by mira.cbaines.net (Postfix, from userid 113) id E3D3F27BC78; Fri, 30 Jul 2021 04:56:11 +0100 (BST) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on mira.cbaines.net X-Spam-Level: X-Spam-Status: No, score=-2.8 required=5.0 tests=BAYES_00,DKIM_SIGNED, MAILING_LIST_MULTI,RCVD_IN_MSPIKE_H4,RCVD_IN_MSPIKE_WL,SPF_HELO_PASS, T_DKIM_INVALID,URIBL_BLOCKED autolearn=unavailable autolearn_force=no version=3.4.2 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mira.cbaines.net (Postfix) with ESMTPS id 7CA9627BC84 for ; Fri, 30 Jul 2021 04:56:11 +0100 (BST) Received: from localhost ([::1]:42728 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1m9Jd4-0006oO-HP for patchwork@mira.cbaines.net; Thu, 29 Jul 2021 23:56:10 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:59426) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1m9Jcw-0006lU-54 for guix-patches@gnu.org; Thu, 29 Jul 2021 23:56:02 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:47148) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1m9Jcv-00068y-U2 for guix-patches@gnu.org; Thu, 29 Jul 2021 23:56:01 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1m9Jcv-0003uu-UD for guix-patches@gnu.org; Thu, 29 Jul 2021 23:56:01 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#49780] [PATCH 02/14] import: egg: Use PARSE-COMMAND-LINE for options. Resent-From: Sarah Morgensen Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Fri, 30 Jul 2021 03:56:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 49780 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 49780@debbugs.gnu.org Received: via spool by 49780-submit@debbugs.gnu.org id=B49780.162761731814841 (code B ref 49780); Fri, 30 Jul 2021 03:56:01 +0000 Received: (at 49780) by debbugs.gnu.org; 30 Jul 2021 03:55:18 +0000 Received: from localhost ([127.0.0.1]:58657 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1m9JcE-0003rI-6e for submit@debbugs.gnu.org; Thu, 29 Jul 2021 23:55:18 -0400 Received: from out0.migadu.com ([94.23.1.103]:28407) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1m9JcC-0003r3-NC for 49780@debbugs.gnu.org; Thu, 29 Jul 2021 23:55:17 -0400 X-Report-Abuse: Please report any abuse attempt to abuse@migadu.com and include these headers. DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=mgsn.dev; s=key1; t=1627617314; h=from:from: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: in-reply-to:in-reply-to:references:references; bh=m5BV66pUOEW6f8G2bNqZuFoJmOaPBm44iap7Jy8qQV8=; b=Z1Yz7fshH6FfHbeEqq2VHdV6eFqnMco9xTTmreSyo234iPI9QxCG1EumEKMdoYK+qJlVSl kr1kpYekIi3JBkC5oyOQwdur/EBzlR6LpZqkmw/bE6tj/nfoLMZbuHoUtdA4iwhjpJ+LFE C5uHtlv/cEGx9HQlT6IxLer7UZdkrcE= From: Sarah Morgensen Date: Thu, 29 Jul 2021 20:54:58 -0700 Message-Id: <5a19dcc9709dcacc09e08bfc7db6fb2c872ba596.1627617006.git.iskarian@mgsn.dev> In-Reply-To: References: MIME-Version: 1.0 X-Migadu-Flow: FLOW_OUT X-Migadu-Auth-User: iskarian@mgsn.dev 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+patchwork=mira.cbaines.net@gnu.org Sender: "Guix-patches" X-getmail-retrieved-from-mailbox: Patches guix/scripts/import/egg.scm (guix-import-egg)[parse-options]: Use PARSE-COMMAND-LINE instead of ARGS-FOLD*. --- guix/scripts/import/egg.scm | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/guix/scripts/import/egg.scm b/guix/scripts/import/egg.scm index 7dbd6fcd5a..829cdc2ca0 100644 --- a/guix/scripts/import/egg.scm +++ b/guix/scripts/import/egg.scm @@ -1,5 +1,6 @@ ;;; GNU Guix --- Functional package management for GNU ;;; Copyright © 2021 Xinglu Chen +;;; Copyright © 2021 Sarah Morgensen ;;; ;;; This file is part of GNU Guix. ;;; @@ -71,12 +72,8 @@ Import and convert the egg package for PACKAGE-NAME.\n")) (define (guix-import-egg . args) (define (parse-options) ;; Return the alist of option values. - (args-fold* args %options - (lambda (opt name arg result) - (leave (G_ "~A: unrecognized option~%") name)) - (lambda (arg result) - (alist-cons 'argument arg result)) - %default-options)) + (parse-command-line args %options (list %default-options) + #:build-options? #f)) (let* ((opts (parse-options)) (repo (and=> (assoc-ref opts 'repo) string->symbol))