From patchwork Tue Apr 7 20:44:23 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ivy Foster X-Patchwork-Id: 1578 Return-Path: Delivered-To: patchwork@archlinux.org Received: from apollo.archlinux.org (localhost [127.0.0.1]) by apollo.archlinux.org (Postfix) with ESMTP id 0639918120817 for ; Tue, 7 Apr 2020 20:44:55 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on apollo.archlinux.org X-Spam-Level: X-Spam-Status: No, score=0.5 required=5.0 tests=DKIM_ADSP_ALL=1.1, DKIM_INVALID=1,DKIM_SIGNED=0.1,MAILING_LIST_MULTI=-1, RCVD_IN_DNSWL_LOW=-0.7,SPF_HELO_NONE=0.001,T_DMARC_POLICY_NONE=0.01 autolearn=no autolearn_force=no version=3.4.4 X-Spam-BL-Results: [127.0.9.1] Received: from orion.archlinux.org (orion.archlinux.org [IPv6:2a01:4f8:160:6087::1]) by apollo.archlinux.org (Postfix) with ESMTPS for ; Tue, 7 Apr 2020 20:44:54 +0000 (UTC) Received: from orion.archlinux.org (localhost [127.0.0.1]) by orion.archlinux.org (Postfix) with ESMTP id E79421ACFD70E9; Tue, 7 Apr 2020 20:44:51 +0000 (UTC) Received: from luna.archlinux.org (luna.archlinux.org [5.9.250.164]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-384) server-signature RSA-PSS (4096 bits)) (No client certificate requested) (Authenticated sender: luna) by orion.archlinux.org (Postfix) with ESMTPSA id A34E71ACFD70E2; Tue, 7 Apr 2020 20:44:51 +0000 (UTC) Authentication-Results: orion.archlinux.org; dkim=fail reason="signature verification failed" (2048-bit key) header.d=iff.ink header.i=@iff.ink header.b=QlQlfSrX Received: from luna.archlinux.org (luna.archlinux.org [127.0.0.1]) by luna.archlinux.org (Postfix) with ESMTP id 5ADF62B2A2; Tue, 7 Apr 2020 20:44:51 +0000 (UTC) Authentication-Results: luna.archlinux.org; dkim=fail reason="signature verification failed" (2048-bit key) header.d=iff.ink header.i=@iff.ink header.b=QlQlfSrX Received: from luna.archlinux.org (luna.archlinux.org [127.0.0.1]) by luna.archlinux.org (Postfix) with ESMTP id 3498A2B2A2 for ; Tue, 7 Apr 2020 20:44:48 +0000 (UTC) Received: from orion.archlinux.org (orion.archlinux.org [IPv6:2a01:4f8:160:6087::1]) by luna.archlinux.org (Postfix) with ESMTPS for ; Tue, 7 Apr 2020 20:44:48 +0000 (UTC) Received: from orion.archlinux.org (localhost [127.0.0.1]) by orion.archlinux.org (Postfix) with ESMTP id 21D5C1ACFD70DD for ; Tue, 7 Apr 2020 20:44:46 +0000 (UTC) Received: from iff.ink (iff.ink [198.58.102.79]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-384) server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by orion.archlinux.org (Postfix) with ESMTPS for ; Tue, 7 Apr 2020 20:44:46 +0000 (UTC) From: escondida@iff.ink DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=iff.ink; s=mail; t=1586292284; bh=J2weAawS7lYdETJ0rRkavZQHr7tozso4awyGthQKfiw=; h=From:To:Cc:Subject:Date; b=QlQlfSrX360Iu/uJMGr/yx1P8zQo7jbgDktCHCkJCWHg+/qV5nuLGQWa6r22J9aQE tp9dWSkmW2jizgJPZd4iPw/bgE9IEdIkyF2MMcNfyQdgoPU3xs1NdqsOMlSr4Puc3D X+KXwfIaSoq2PTRfOy5H4E4sWgVnhzgmiyZSM1QKjVDorfZPCLIPALJKZjsgtOfMo7 rdnqXLQFuUCg84rq0RuYcZfjbziVr0v3LaQKwu1bjO1Sa7NWAR9Pnx70F6bQqPQO5s QfDDX5dfppWkDFCQQr4EUfRbNL5+DmTgo/LcK0+t+HqpBDX9XYgYEkEIcKwpn3sEQD YZ2fl1ebBO+aw== To: pacman-dev@archlinux.org Date: Tue, 7 Apr 2020 15:44:23 -0500 Message-Id: <20200407204423.51263-1-escondida@iff.ink> X-Mailer: git-send-email 2.26.0 MIME-Version: 1.0 Subject: [pacman-dev] [PATCH] Add NoProgressbar to pacman.conf options X-BeenThere: pacman-dev@archlinux.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Discussion list for pacman development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: Discussion list for pacman development Errors-To: pacman-dev-bounces@archlinux.org Sender: "pacman-dev" From: Ivy Foster Signed-off-by: Ivy Foster --- doc/pacman.conf.5.asciidoc | 3 +++ etc/pacman.conf.in | 1 + src/pacman/conf.c | 2 ++ src/pacman/pacman-conf.c | 3 +++ 4 files changed, 9 insertions(+) -- 2.26.0 diff --git a/doc/pacman.conf.5.asciidoc b/doc/pacman.conf.5.asciidoc index b297e332..73f57eeb 100644 --- a/doc/pacman.conf.5.asciidoc +++ b/doc/pacman.conf.5.asciidoc @@ -186,6 +186,9 @@ Options *Color*:: Automatically enable colors only when pacman's output is on a tty. +*NoProgressbar*:: + Disables progressbars. + *TotalDownload*:: When downloading, display the amount downloaded, download rate, ETA, and completed percentage of the entire download list rather diff --git a/etc/pacman.conf.in b/etc/pacman.conf.in index 7446944f..fb473fe9 100644 --- a/etc/pacman.conf.in +++ b/etc/pacman.conf.in @@ -31,6 +31,7 @@ Architecture = auto # Misc options #UseSyslog #Color +#NoProgressbar #TotalDownload CheckSpace #VerbosePkgLists diff --git a/src/pacman/conf.c b/src/pacman/conf.c index f9de386f..92614860 100644 --- a/src/pacman/conf.c +++ b/src/pacman/conf.c @@ -579,6 +579,8 @@ static int _parse_options(const char *key, char *value, config->color = isatty(fileno(stdout)) ? PM_COLOR_ON : PM_COLOR_OFF; enable_colors(config->color); } + } else if(strcmp(key, "NoProgressbar") == 0) { + config->noprogressbar = 1; } else if(strcmp(key, "DisableDownloadTimeout") == 0) { config->disable_dl_timeout = 1; } else { diff --git a/src/pacman/pacman-conf.c b/src/pacman/pacman-conf.c index 6e25d243..48152697 100644 --- a/src/pacman/pacman-conf.c +++ b/src/pacman/pacman-conf.c @@ -259,6 +259,7 @@ static void dump_config(void) show_bool("VerbosePkgLists", config->verbosepkglists); show_bool("DisableDownloadTimeout", config->disable_dl_timeout); show_bool("ILoveCandy", config->chomp); + show_bool("NoProgressbar", config->noprogressbar); show_cleanmethod("CleanMethod", config->cleanmethod); @@ -368,6 +369,8 @@ static int list_directives(void) show_bool("VerbosePkgLists", config->verbosepkglists); } else if(strcasecmp(i->data, "DisableDownloadTimeout") == 0) { show_bool("DisableDownloadTimeout", config->disable_dl_timeout); + } else if(strcasecmp(i->data, "NoProgressbar") == 0) { + show_bool("NoProgressbar", config->noprogressbar); } else if(strcasecmp(i->data, "CleanMethod") == 0) { show_cleanmethod("CleanMethod", config->cleanmethod);