From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp0 ([2001:41d0:8:6d80::]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) by ms0.migadu.com with LMTPS id 4L26H7SpYWDpKwAAgWs5BA (envelope-from ) for ; Mon, 29 Mar 2021 12:19:32 +0200 Received: from aspmx1.migadu.com ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp0 with LMTPS id mDy3GbSpYWDCAwAA1q6Kng (envelope-from ) for ; Mon, 29 Mar 2021 10:19:32 +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 2B7BC294BF for ; Mon, 29 Mar 2021 12:19:32 +0200 (CEST) Received: from localhost ([::1]:59434 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lQozb-0006qH-9y for larch@yhetil.org; Mon, 29 Mar 2021 06:19:31 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:34284) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lQozK-0006ow-Dx for guix-patches@gnu.org; Mon, 29 Mar 2021 06:19:14 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:36372) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1lQoz9-0003mC-6S for guix-patches@gnu.org; Mon, 29 Mar 2021 06:19:05 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1lQoz9-0008LN-1u for guix-patches@gnu.org; Mon, 29 Mar 2021 06:19:03 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#47464] [PATCH 3/8] scripts: download: Replace 'args-fold*' by 'parse-command-line'. Resent-From: zimoun Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Mon, 29 Mar 2021 10:19:03 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 47464 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 47464@debbugs.gnu.org Cc: zimoun Received: via spool by 47464-submit@debbugs.gnu.org id=B47464.161701310331964 (code B ref 47464); Mon, 29 Mar 2021 10:19:03 +0000 Received: (at 47464) by debbugs.gnu.org; 29 Mar 2021 10:18:23 +0000 Received: from localhost ([127.0.0.1]:47903 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lQoyU-0008J9-1L for submit@debbugs.gnu.org; Mon, 29 Mar 2021 06:18:22 -0400 Received: from mail-wr1-f47.google.com ([209.85.221.47]:38469) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lQoyS-0008IZ-By for 47464@debbugs.gnu.org; Mon, 29 Mar 2021 06:18:20 -0400 Received: by mail-wr1-f47.google.com with SMTP id z2so12261051wrl.5 for <47464@debbugs.gnu.org>; Mon, 29 Mar 2021 03:18:20 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=WMJItAO62WcgOht21ZJa0fOHMrkc+rz+OtoZQg9uO2g=; b=XlRxK/Gsmm22ABfP3Ox3ybnUnDHWoQwm8UzJMmwuWkE4xkmaDOZ6J1JmtBHQQVyrz3 7zArnR0QJ9+4DLx+zG7cn36fJvRl8IMTj8vO7n1iKYAfzyKufSyyRz2etbQlHi4gwVv6 Uwic+yhvACx6zJPnRDB9KlEDps5XCdnTCVHfna9Evi1z7viQyjXdJiBVRzN4IXr3UbaG rYPCeYmyHhaJLY7iLtq1Fs3gJwjqIeEZ3Phi9ibrnmP7bIXoKQhbkai5r5HqXEMYM9t8 sGnO4RrcBgrdgIltcu58EVDCFj8IqHzKv4nlV348VLQc3kDHL/6UL2BijHB7ympfA/zq pGZg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=WMJItAO62WcgOht21ZJa0fOHMrkc+rz+OtoZQg9uO2g=; b=XBqevuRdfDS65CvgQxsbHmPivkzqVFF1a+AxpEUH0ML1SNslqPEBg5bOlxYmobInaC Pxi9nhjDT3ikQmeCFeyLwvE5OG0+RaEyBTJ3PbDBcdNrgcyLPOXrXhtgEktx/Bu4RNaD eEB2e0Rxmu4zhziExnP754vliFfI98SmU9xzhLVS2K3iQNNwXVaVN5Tou+xOa35c7INr 6Q9uRku7o8T0khq+PWkIEcjmZ0TmEZaKdDb8eHMZdoRnMszzjyyXuCeGw7LsD2Oaj4n8 50T7gIazxEcSGtNsC+gNAAPEMn8MGBBQsmksMS/eMDWDDIBJla5r2K4cybtJ4949PpJF bV/w== X-Gm-Message-State: AOAM530H/yMJ3G76FT6cTL99bwCUdl9IvEbV3brbIBhWyJ74JMxvAVce 22jDCkR9UTmXrEsb8XRXrlHNDP7hg1c= X-Google-Smtp-Source: ABdhPJywU1qoQT55HidSikJ6Pm1YgekFbcNAlqsLd5KirpOMizxYp9WoIuJxhFUdhtE3LabEuLfJKw== X-Received: by 2002:adf:c70b:: with SMTP id k11mr28299654wrg.165.1617013094862; Mon, 29 Mar 2021 03:18:14 -0700 (PDT) Received: from localhost.localdomain ([193.48.40.110]) by smtp.gmail.com with ESMTPSA id 135sm25291792wma.44.2021.03.29.03.18.14 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 29 Mar 2021 03:18:14 -0700 (PDT) From: zimoun Date: Mon, 29 Mar 2021 12:18:01 +0200 Message-Id: <20210329101806.54004-3-zimon.toutoune@gmail.com> X-Mailer: git-send-email 2.30.1 In-Reply-To: <20210329101806.54004-1-zimon.toutoune@gmail.com> References: <20210329101806.54004-1-zimon.toutoune@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 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: , 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=1617013172; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: 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=WMJItAO62WcgOht21ZJa0fOHMrkc+rz+OtoZQg9uO2g=; b=OvMKhgAkxH2+ejNfqBl2i5rCircd69BbQC2Os6p8hlGV/10lAdyjLdZYJQrgOa+uN8SbQK v45mrytNW+AVT/EHTjU/JIZ1y56ueIRGSamiVzkd1jl94tWtNICDO+0Ccfvmrk90fBwuDX v2jy1bqGr6rZk7j8i6bLw/628Im7c6Rj101+GHh4ucOt005ctmsFoXH3jQuPLTzor2rZzk 1mIi4m0ypox5IGlglCacBHqDAv6m3MZ9HFG/Kd3pYU38F/Gw32/ieXVZcnT0NURDXJDxzk fAgPygkIEI/1v2pWdBsF/fUh6pNR4zsSH81zVXlgkJUrnrOK0Nc9K7t3A84rqg== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1617013172; a=rsa-sha256; cv=none; b=NvMhaEksEpRy3lNN/fBZkB5K19GNmHe+DAmEIPHhDKYfEwnskn6F0Zi2XJJRU+4IeD+Nyi B+SwOEfIrpQmT5zUKDe6FmfFEIQt0Mx6TBcmvqONUK3igA13pjkcws4yYpezfVIJHEUJzu SYP2MtkBkUce6vehgqYQuH8WoH/ZyLToBxRHDJStq1tRIllN50sNl/7+zytxx5QRVCXCPO Q9aeBwTOUXzeP9xQVgLBKGEEol4pi23dL0Xn7/UhBtoCN3EiCzJmiM6jUMAdHvGtjVln6w 02OIbtUkVoDxbRbTsQ8d7yD2XgpUYH89mgRhlJLd8JZqGyaZRYi8gQFF7TVDHg== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=gmail.com header.s=20161025 header.b="XlRxK/Gs"; 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: -1.32 Authentication-Results: aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=gmail.com header.s=20161025 header.b="XlRxK/Gs"; dmarc=fail reason="SPF not aligned (relaxed)" header.from=gmail.com (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: 2B7BC294BF X-Spam-Score: -1.32 X-Migadu-Scanner: scn0.migadu.com X-TUID: FtSQ4Eg/K3KI * guix/scripts/download.scm (define-command): Replace 'args-fold*' by 'parse-command-line'. --- guix/scripts/download.scm | 17 ++++++++--------- 1 file changed, 8 insertions(+), 9 deletions(-) diff --git a/guix/scripts/download.scm b/guix/scripts/download.scm index ce8dd8b02c..5a91390358 100644 --- a/guix/scripts/download.scm +++ b/guix/scripts/download.scm @@ -1,5 +1,6 @@ ;;; GNU Guix --- Functional package management for GNU ;;; Copyright © 2012, 2013, 2015, 2016, 2017, 2020 Ludovic Courtès +;;; Copyright © 2021 Simon Tournier ;;; ;;; This file is part of GNU Guix. ;;; @@ -162,15 +163,13 @@ and 'base16' ('hex' and 'hexadecimal' can be used as well).\n")) (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) - (when (assq 'argument result) - (leave (G_ "~A: extraneous argument~%") arg)) - - (alist-cons 'argument arg result)) - %default-options)) + (parse-command-line args %options (list %default-options) + #:build-options? #f + #:argument-handler + (lambda (arg result) + (when (assq 'argument result) + (leave (G_ "~A: extraneous argument~%") arg)) + (alist-cons 'argument arg result)))) (with-error-handling (let* ((opts (parse-options)) -- 2.30.1