From unknown Sat Jun 21 03:11:03 2025 X-Loop: help-debbugs@gnu.org Subject: [bug#41183] [PATCH 0/1] guix package, show: Support multiple queries. Resent-From: zimoun Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Sun, 10 May 2020 23:39:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 41183 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 41183@debbugs.gnu.org Cc: zimoun X-Debbugs-Original-To: guix-patches@gnu.org Received: via spool by submit@debbugs.gnu.org id=B.158915388329082 (code B ref -1); Sun, 10 May 2020 23:39:02 +0000 Received: (at submit) by debbugs.gnu.org; 10 May 2020 23:38:03 +0000 Received: from localhost ([127.0.0.1]:50687 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jXvWF-0007Z0-CG for submit@debbugs.gnu.org; Sun, 10 May 2020 19:38:03 -0400 Received: from lists.gnu.org ([209.51.188.17]:59606) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jXvWD-0007Yb-Dt for submit@debbugs.gnu.org; Sun, 10 May 2020 19:38:01 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:47462) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jXvWD-0007OS-6G for guix-patches@gnu.org; Sun, 10 May 2020 19:38:01 -0400 Received: from mail-wm1-x336.google.com ([2a00:1450:4864:20::336]:36393) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1jXvWC-0006dq-Cy for guix-patches@gnu.org; Sun, 10 May 2020 19:38:00 -0400 Received: by mail-wm1-x336.google.com with SMTP id w19so2405625wmc.1 for ; Sun, 10 May 2020 16:37:59 -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:mime-version :content-transfer-encoding; bh=yb1K7nDRy6znIFAdTjL+rjiSaofJp8egdNFXtigW5LM=; b=Zr6ib8ApCEKrm9KsRNhavgeG+/kDicIVDu+oCZGl8GnKvzC/662L3G7o6s4ls1A6Va jTA8+LDZCRQ4AGYpK65zUGpsvAmOSO33AJSWnkDuS3ygcxkl/ggIrPdrBj3xL6d/3Huq jfFjFS/Gcm/solC4gfJZUdL9hxWualzt3ArvcPhhqgnqX6M32JzwzNm7Jn+EGH2ZgUto jg69yUfMGPXTGiZ7cRL3H4s0FLMGLa2JIfzlQ81hUIO+2xzp2PEXjKouPRN9W9n/Xybs FvTqPX15WS3PkzmCEG2Y5MHQAbNe2DqfEQYlq0SVvhR6WdQXcxp3B0T/hBFX92vuR8oa b3lA== 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:mime-version :content-transfer-encoding; bh=yb1K7nDRy6znIFAdTjL+rjiSaofJp8egdNFXtigW5LM=; b=PXh4T779k8xdMAjT5Me/ZW3PNViL7/tnW3N/in9UTZNwD8D1qyENz5S11LEx8mIByC PBulMmmfMslJpH6vcG0nZkfX/e2NJCJIpAjV5FPcHfmqjHZX4NigcTTRYXvZWtgk7jGh 6Jt/UjL6IARE1uxwcWSbMiFJjlwwzF9r6coZICCEsHPU8BXrDKjeqPPoB4n9kH7ZB47Q JNcVZ0x7p4mw+8PsFpvt98zGSTI3i94S2FrDudUnr0KaEzmSjtW/Zu2BvVzfi+MPGnAn bLmRhWCWZIHGmSr0INJR8bkrfubGE6khudyYxFREvRlZFXjCH+IUaigOkDnigqmxtzDS QQlg== X-Gm-Message-State: AGi0PuZ2hvRfE2InG/Pb60xJGlWFqgkx5HaVBvARe3Z7/fAGMQnrvWoJ ucc7zvpLlGaMa3l+yF+RPcRp9L7L X-Google-Smtp-Source: APiQypLuPD/Xi7cA2Bwpao+Tts4kIYYG10u9xNwuzuGkAD3PACxKP2RRRH6qUKCWm3YBt3L1PFuYwQ== X-Received: by 2002:a7b:cc8e:: with SMTP id p14mr27721303wma.70.1589153878579; Sun, 10 May 2020 16:37:58 -0700 (PDT) Received: from localhost.localdomain (57.246.195.77.rev.sfr.net. [77.195.246.57]) by smtp.gmail.com with ESMTPSA id k17sm23933105wmi.10.2020.05.10.16.37.57 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 10 May 2020 16:37:57 -0700 (PDT) From: zimoun Date: Mon, 11 May 2020 01:37:47 +0200 Message-Id: <20200510233747.13155-1-zimon.toutoune@gmail.com> X-Mailer: git-send-email 2.26.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Received-SPF: pass client-ip=2a00:1450:4864:20::336; envelope-from=zimon.toutoune@gmail.com; helo=mail-wm1-x336.google.com X-detected-operating-system: by eggs.gnu.org: No matching host in p0f cache. That's all we know. X-Spam_score_int: 3 X-Spam_score: 0.3 X-Spam_bar: / X-Spam_report: (0.3 / 5.0 requ) BAYES_00=-1.9, DEAR_NOBODY=2.442, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_PASS=-0.001 autolearn=_AUTOLEARN X-Spam_action: no action X-Spam-Score: 0.6 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -2.3 (--) Dear, This patch adds the feature: guix package --show=emacs --show=hello and therefore, it allows to pipe: guix graph emacs --path libffi | xargs guix show Note that: 1. "guix package" processes from right to left. 2. "guix show" processes from left to right. It is how "guix packages" is implemented. However, it appears more natural to display in order; that's why "guix show" reverses the order. 3. Because dealing with multiple different queries does not seems "keep it simple", "guix package" starts with the last query (the most of left) and then processes all the queries corresponding to this one. For example, a) guix package --show=emacs --search=hello --show=libffi will show the packages 'emacs' and 'libffi', skipping 'search'. b) guix package --show=emacs --show=libffi --search=hello will search the package 'hello', skipping 'show'. It is already how '--search' works and has been extended to '--show'. Does it need to be documented in the manua? All the best, simon zimoun (1): guix package, show: Support multiple queries. guix/scripts/package.scm | 7 ++++++- guix/scripts/show.scm | 2 +- 2 files changed, 7 insertions(+), 2 deletions(-) -- 2.26.1 From unknown Sat Jun 21 03:11:03 2025 X-Loop: help-debbugs@gnu.org Subject: [bug#41183] [PATCH] guix package, show: Support multiple queries. References: <20200510233747.13155-1-zimon.toutoune@gmail.com> In-Reply-To: <20200510233747.13155-1-zimon.toutoune@gmail.com> Resent-From: zimoun Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Sun, 10 May 2020 23:41:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 41183 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 41183@debbugs.gnu.org Cc: zimoun Received: via spool by 41183-submit@debbugs.gnu.org id=B41183.158915405629426 (code B ref 41183); Sun, 10 May 2020 23:41:01 +0000 Received: (at 41183) by debbugs.gnu.org; 10 May 2020 23:40:56 +0000 Received: from localhost ([127.0.0.1]:50692 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jXvZ1-0007eY-RI for submit@debbugs.gnu.org; Sun, 10 May 2020 19:40:56 -0400 Received: from mail-wm1-f53.google.com ([209.85.128.53]:36720) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jXvZ0-0007eF-AK for 41183@debbugs.gnu.org; Sun, 10 May 2020 19:40:54 -0400 Received: by mail-wm1-f53.google.com with SMTP id w19so2409177wmc.1 for <41183@debbugs.gnu.org>; Sun, 10 May 2020 16:40:54 -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:mime-version :content-transfer-encoding; bh=dGRipeoljf4yxBBNjrwW4OeS7HvRzcCGGcMsVUxgQSY=; b=KxVrHxGlHl49tBSI6vQ1WmqNO6L3TpWKQ6yDV/EMuWRrJRlM4J49jZsC5puHxLI4zy 0YLoxLeDc8oTb7aL9b6GIx39FrAxeqcbli6ktWI2PqwUgx+tOIIVTC0eMMEGQJ0RUSom q/aWUX27zDl9YxjsDiQwUcO7ylrdD/Kwzk/dNwF1nQynGjh6/ghmnbCJdNfExlklPcuJ RSzKoV4jsJZP+foBbCnOSk2xtl4NOHSBsI+GQqiwpEBg3QILqIdo6jptPbDfBoTP+/zg Efn1M23TLPsleaVuveOD/8SyrsWmNLqOtop1ugo80pJV/9VBHDGHFctYbVAAV3RIAegc 3/+g== 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:mime-version :content-transfer-encoding; bh=dGRipeoljf4yxBBNjrwW4OeS7HvRzcCGGcMsVUxgQSY=; b=jK8S/18JKjdATovxfKUXSAftZ+3n76Hl/x4v+iUqf5FZCbROVq4mOS4snOZ8mbt3oZ YHQND4VzUBwlD9N4lQTLGqlB8YONgmDfzP9VtG7njDgBP+xnbY9a/r2Lg6yrQdOVDguW 0EugAiKllWBmRZ74lG9gSs268xXQ4dlfv9GSFD+q4RX9uILhMK+P4dE61xViZIe1mUv5 WZ4V3hZ9zYR+1wZAlxxoEmQ21B9PC7PetjlQHQBm2rswEvqnprjz1i8xS1iFG23Qy1ep 25/IxgvTsp4xRr5ZkvUmXh0g0gruBbte3fSidiwCDGiq1wx8DRQ6XslcXozHgtGTZC4T kXpA== X-Gm-Message-State: AGi0PuZEvo11fsIM485NLhVEWNDuw+YnSC3ExK0B1uI1FXHJulN1SVZe NTDDSgZuoK380RtF8+llDwL5x67X X-Google-Smtp-Source: APiQypKIetumfJQ6wIP43CpI/cTE2isdkk4TsmivrOrsRrw5/a04M/sLoTwZQ5P/PD3SkaLgjAApSg== X-Received: by 2002:a1c:dc05:: with SMTP id t5mr11796wmg.112.1589154048122; Sun, 10 May 2020 16:40:48 -0700 (PDT) Received: from localhost.localdomain (57.246.195.77.rev.sfr.net. [77.195.246.57]) by smtp.gmail.com with ESMTPSA id n7sm5859990wro.94.2020.05.10.16.40.47 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 10 May 2020 16:40:47 -0700 (PDT) From: zimoun Date: Mon, 11 May 2020 01:40:44 +0200 Message-Id: <20200510234044.14251-1-zimon.toutoune@gmail.com> X-Mailer: git-send-email 2.26.1 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Spam-Score: 0.0 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) * guix/scripts/package.scm (process-query): Show multiple queries. * guix/scripts/show.scm (guix-show): Reverse to display in order. --- guix/scripts/package.scm | 33 +++++++++++++++++++++------------ guix/scripts/show.scm | 2 +- 2 files changed, 22 insertions(+), 13 deletions(-) diff --git a/guix/scripts/package.scm b/guix/scripts/package.scm index dce9256bf5..a69efa365e 100644 --- a/guix/scripts/package.scm +++ b/guix/scripts/package.scm @@ -8,6 +8,7 @@ ;;; Copyright © 2016 Chris Marusich ;;; Copyright © 2019 Tobias Geerinckx-Rice ;;; Copyright © 2020 Ricardo Wurmus +;;; Copyright © 2020 Simon Tournier ;;; ;;; This file is part of GNU Guix. ;;; @@ -787,18 +788,26 @@ processed, #f otherwise." (display-search-results matches (current-output-port))) #t)) - (('show requested-name) - (let-values (((name version) - (package-name->name+version requested-name))) - (match (remove package-superseded - (find-packages-by-name name version)) - (() - (leave (G_ "~a~@[@~a~]: package not found~%") name version)) - (packages - (leave-on-EPIPE - (for-each (cute package->recutils <> (current-output-port)) - packages)))) - #t)) + (('show _) + (let ((requested-names + (filter-map (match-lambda + (('query 'show requested-name) requested-name) + (_ #f)) + opts))) + (for-each + (lambda (requested-name) + (let-values (((name version) + (package-name->name+version requested-name))) + (match (remove package-superseded + (find-packages-by-name name version)) + (() + (leave (G_ "~a~@[@~a~]: package not found~%") name version)) + (packages + (leave-on-EPIPE + (for-each (cute package->recutils <> (current-output-port)) + packages)))))) + requested-names)) + #t) (('search-paths kind) (let* ((manifests (map profile-manifest profiles)) diff --git a/guix/scripts/show.scm b/guix/scripts/show.scm index ef64b5755b..a2b0030a63 100644 --- a/guix/scripts/show.scm +++ b/guix/scripts/show.scm @@ -73,4 +73,4 @@ This is an alias for 'guix package --show='.\n")) (unless (assoc-ref opts 'query) (leave (G_ "missing arguments: no package to show~%"))) - (guix-package* opts)) + (guix-package* (reverse opts))) -- 2.26.1 From unknown Sat Jun 21 03:11:03 2025 MIME-Version: 1.0 X-Mailer: MIME-tools 5.505 (Entity 5.505) X-Loop: help-debbugs@gnu.org From: help-debbugs@gnu.org (GNU bug Tracking System) To: zimoun Subject: bug#41183: closed (Re: [bug#41183] [PATCH] guix package, show: Support multiple queries.) Message-ID: References: <87ftc6fcc6.fsf@gnu.org> <20200510233747.13155-1-zimon.toutoune@gmail.com> X-Gnu-PR-Message: they-closed 41183 X-Gnu-PR-Package: guix-patches X-Gnu-PR-Keywords: patch Reply-To: 41183@debbugs.gnu.org Date: Mon, 11 May 2020 20:26:02 +0000 Content-Type: multipart/mixed; boundary="----------=_1589228762-828-1" This is a multi-part message in MIME format... ------------=_1589228762-828-1 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" Your bug report #41183: [PATCH 0/1] guix package, show: Support multiple queries. which was filed against the guix-patches package, has been closed. The explanation is attached below, along with your original report. If you require more details, please reply to 41183@debbugs.gnu.org. --=20 41183: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=3D41183 GNU Bug Tracking System Contact help-debbugs@gnu.org with problems ------------=_1589228762-828-1 Content-Type: message/rfc822 Content-Disposition: inline Content-Transfer-Encoding: 7bit Received: (at 41183-done) by debbugs.gnu.org; 11 May 2020 20:25:53 +0000 Received: from localhost ([127.0.0.1]:53442 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jYEzp-0000D2-EH for submit@debbugs.gnu.org; Mon, 11 May 2020 16:25:53 -0400 Received: from eggs.gnu.org ([209.51.188.92]:58096) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jYEzo-0000Cp-LY for 41183-done@debbugs.gnu.org; Mon, 11 May 2020 16:25:52 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]:46628) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jYEzj-0007TO-EX; Mon, 11 May 2020 16:25:47 -0400 Received: from [2a01:e0a:1d:7270:af76:b9b:ca24:c465] (port=39058 helo=ribbon) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1jYEzi-0002Xh-QR; Mon, 11 May 2020 16:25:47 -0400 From: =?utf-8?Q?Ludovic_Court=C3=A8s?= To: zimoun Subject: Re: [bug#41183] [PATCH] guix package, show: Support multiple queries. References: <20200510233747.13155-1-zimon.toutoune@gmail.com> <20200510234044.14251-1-zimon.toutoune@gmail.com> Date: Mon, 11 May 2020 22:25:45 +0200 In-Reply-To: <20200510234044.14251-1-zimon.toutoune@gmail.com> (zimoun's message of "Mon, 11 May 2020 01:40:44 +0200") Message-ID: <87ftc6fcc6.fsf@gnu.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.3 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 41183-done Cc: 41183-done@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) Hello, zimoun skribis: > * guix/scripts/package.scm (process-query): Show multiple queries. > * guix/scripts/show.scm (guix-show): Reverse to display in order. Yay, applied! > Note that: > > 1. "guix package" processes from right to left. > 2. "guix show" processes from left to right. > > It is how "guix packages" is implemented. However, it appears more natur= al to > display in order; that's why "guix show" reverses the order. > > 3. Because dealing with multiple different queries does not seems "keep = it > simple", "guix package" starts with the last query (the most of left) and > then processes all the queries corresponding to this one. > > > For example, > > a) guix package --show=3Demacs --search=3Dhello --show=3Dlibffi > will show the packages 'emacs' and 'libffi', skipping 'search'. > > b) guix package --show=3Demacs --show=3Dlibffi --search=3Dhello > will search the package 'hello', skipping 'show'. > > It is already how '--search' works and has been extended to '--show'. Do= es it > need to be documented in the manua? Weirdness. I think we should improve all that rather than document it, addressing also some of the issues raised in . Thanks, Ludo=E2=80=99. ------------=_1589228762-828-1 Content-Type: message/rfc822 Content-Disposition: inline Content-Transfer-Encoding: 7bit Received: (at submit) by debbugs.gnu.org; 10 May 2020 23:38:03 +0000 Received: from localhost ([127.0.0.1]:50687 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jXvWF-0007Z0-CG for submit@debbugs.gnu.org; Sun, 10 May 2020 19:38:03 -0400 Received: from lists.gnu.org ([209.51.188.17]:59606) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jXvWD-0007Yb-Dt for submit@debbugs.gnu.org; Sun, 10 May 2020 19:38:01 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:47462) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jXvWD-0007OS-6G for guix-patches@gnu.org; Sun, 10 May 2020 19:38:01 -0400 Received: from mail-wm1-x336.google.com ([2a00:1450:4864:20::336]:36393) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1jXvWC-0006dq-Cy for guix-patches@gnu.org; Sun, 10 May 2020 19:38:00 -0400 Received: by mail-wm1-x336.google.com with SMTP id w19so2405625wmc.1 for ; Sun, 10 May 2020 16:37:59 -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:mime-version :content-transfer-encoding; bh=yb1K7nDRy6znIFAdTjL+rjiSaofJp8egdNFXtigW5LM=; b=Zr6ib8ApCEKrm9KsRNhavgeG+/kDicIVDu+oCZGl8GnKvzC/662L3G7o6s4ls1A6Va jTA8+LDZCRQ4AGYpK65zUGpsvAmOSO33AJSWnkDuS3ygcxkl/ggIrPdrBj3xL6d/3Huq jfFjFS/Gcm/solC4gfJZUdL9hxWualzt3ArvcPhhqgnqX6M32JzwzNm7Jn+EGH2ZgUto jg69yUfMGPXTGiZ7cRL3H4s0FLMGLa2JIfzlQ81hUIO+2xzp2PEXjKouPRN9W9n/Xybs FvTqPX15WS3PkzmCEG2Y5MHQAbNe2DqfEQYlq0SVvhR6WdQXcxp3B0T/hBFX92vuR8oa b3lA== 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:mime-version :content-transfer-encoding; bh=yb1K7nDRy6znIFAdTjL+rjiSaofJp8egdNFXtigW5LM=; b=PXh4T779k8xdMAjT5Me/ZW3PNViL7/tnW3N/in9UTZNwD8D1qyENz5S11LEx8mIByC PBulMmmfMslJpH6vcG0nZkfX/e2NJCJIpAjV5FPcHfmqjHZX4NigcTTRYXvZWtgk7jGh 6Jt/UjL6IARE1uxwcWSbMiFJjlwwzF9r6coZICCEsHPU8BXrDKjeqPPoB4n9kH7ZB47Q JNcVZ0x7p4mw+8PsFpvt98zGSTI3i94S2FrDudUnr0KaEzmSjtW/Zu2BvVzfi+MPGnAn bLmRhWCWZIHGmSr0INJR8bkrfubGE6khudyYxFREvRlZFXjCH+IUaigOkDnigqmxtzDS QQlg== X-Gm-Message-State: AGi0PuZ2hvRfE2InG/Pb60xJGlWFqgkx5HaVBvARe3Z7/fAGMQnrvWoJ ucc7zvpLlGaMa3l+yF+RPcRp9L7L X-Google-Smtp-Source: APiQypLuPD/Xi7cA2Bwpao+Tts4kIYYG10u9xNwuzuGkAD3PACxKP2RRRH6qUKCWm3YBt3L1PFuYwQ== X-Received: by 2002:a7b:cc8e:: with SMTP id p14mr27721303wma.70.1589153878579; Sun, 10 May 2020 16:37:58 -0700 (PDT) Received: from localhost.localdomain (57.246.195.77.rev.sfr.net. [77.195.246.57]) by smtp.gmail.com with ESMTPSA id k17sm23933105wmi.10.2020.05.10.16.37.57 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 10 May 2020 16:37:57 -0700 (PDT) From: zimoun To: guix-patches@gnu.org Subject: [PATCH 0/1] guix package, show: Support multiple queries. Date: Mon, 11 May 2020 01:37:47 +0200 Message-Id: <20200510233747.13155-1-zimon.toutoune@gmail.com> X-Mailer: git-send-email 2.26.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Received-SPF: pass client-ip=2a00:1450:4864:20::336; envelope-from=zimon.toutoune@gmail.com; helo=mail-wm1-x336.google.com X-detected-operating-system: by eggs.gnu.org: No matching host in p0f cache. That's all we know. X-Spam_score_int: 3 X-Spam_score: 0.3 X-Spam_bar: / X-Spam_report: (0.3 / 5.0 requ) BAYES_00=-1.9, DEAR_NOBODY=2.442, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_PASS=-0.001 autolearn=_AUTOLEARN X-Spam_action: no action X-Spam-Score: 0.6 (/) X-Debbugs-Envelope-To: submit Cc: zimoun X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -2.3 (--) Dear, This patch adds the feature: guix package --show=emacs --show=hello and therefore, it allows to pipe: guix graph emacs --path libffi | xargs guix show Note that: 1. "guix package" processes from right to left. 2. "guix show" processes from left to right. It is how "guix packages" is implemented. However, it appears more natural to display in order; that's why "guix show" reverses the order. 3. Because dealing with multiple different queries does not seems "keep it simple", "guix package" starts with the last query (the most of left) and then processes all the queries corresponding to this one. For example, a) guix package --show=emacs --search=hello --show=libffi will show the packages 'emacs' and 'libffi', skipping 'search'. b) guix package --show=emacs --show=libffi --search=hello will search the package 'hello', skipping 'show'. It is already how '--search' works and has been extended to '--show'. Does it need to be documented in the manua? All the best, simon zimoun (1): guix package, show: Support multiple queries. guix/scripts/package.scm | 7 ++++++- guix/scripts/show.scm | 2 +- 2 files changed, 7 insertions(+), 2 deletions(-) -- 2.26.1 ------------=_1589228762-828-1-- From unknown Sat Jun 21 03:11:03 2025 X-Loop: help-debbugs@gnu.org Subject: [bug#41183] [PATCH] guix package, show: Support multiple queries. Resent-From: zimoun Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Mon, 11 May 2020 21:49:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 41183 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: Ludovic =?UTF-8?Q?Court=C3=A8s?= Cc: 41183-done@debbugs.gnu.org Received: via spool by 41183-done@debbugs.gnu.org id=D41183.158923372716926 (code D ref 41183); Mon, 11 May 2020 21:49:02 +0000 Received: (at 41183-done) by debbugs.gnu.org; 11 May 2020 21:48:47 +0000 Received: from localhost ([127.0.0.1]:53544 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jYGI3-0004Ow-0G for submit@debbugs.gnu.org; Mon, 11 May 2020 17:48:47 -0400 Received: from mail-qv1-f67.google.com ([209.85.219.67]:39376) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jYGI1-0004Oh-Nr for 41183-done@debbugs.gnu.org; Mon, 11 May 2020 17:48:46 -0400 Received: by mail-qv1-f67.google.com with SMTP id d1so859094qvl.6 for <41183-done@debbugs.gnu.org>; Mon, 11 May 2020 14:48:45 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc:content-transfer-encoding; bh=0WUiAZS6B6bidZW+srAtYvukSbimIDdNrjfM6jiLfdE=; b=Ybh5/Clwb0hRbm0YtyqsX6tX6elpdDsov7it6f8iRKH+3i6QkfAbb1YAwaTpf2Ck1o qxXP566c1PN/HWntvjBHu55vvxB90XTc7QD2KsftCaumjziECMdR+vazvZ0plufICHFD wiua7sivTWvJnYM4MkS5IqMPTWf79G7dbZtRDYHVSk92+AuGFlzNtPaV8ZK0LT8dxQz6 3YhoHGWeGPGhEkJ/Y5BdF9KLMrZGMdGWEXU3ePVW8scRlMaO37IvMRKntm1ooT8/I8ct GpwS7HcTs71vR4ORxdMaFa9R5sIoraOzSkrhE+GKAWFzWdbC3fuYRnJqPC0PJZnEWW++ oMuw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc:content-transfer-encoding; bh=0WUiAZS6B6bidZW+srAtYvukSbimIDdNrjfM6jiLfdE=; b=Uj5eWl8e4FuHfRSS9B/KDmjmKN95zTNpozb0cesP0XmOB0j/DEihdIatKuAgtoB8BN 8HXVth7ygjsK14kUp7laXozKlEd+rZO1Oek7r2oIzZkJ7bKS7Bkxfn8cn8MpnVhBhIvI YoRLdB4+JiXXxNJ9gsO1h79sCcu3G9BbXUWtnBxLsHqMF2DJjtkdMD4vp1X9lpOcyd8G pgYM9pCVGpbqQISIswtUAjtAG2/U7NbMsyhpvN4Uz2jYAQdFhb8WbriPRAJt46SE8N77 U8VVVRaKkDOaeqVkB66ALhYbJE/j7DFQ8iIOSAcuHyuM3xKB5SxwL+vAfHAgPbb5NlaA jf9A== X-Gm-Message-State: AOAM532+Pu+PSDfEHahPNCYySHguWcEPnLMWcOcxp/R4kp9GT1KgxuMA q/iC/1msgkScwvIDlEwABckSOI/MpWDKqakL9kE0Zw== X-Google-Smtp-Source: ABdhPJxoVH6NSw2f8dB8l26cgM9mvX4NJLLABcQ8MbQukLoI87OujuiyK/K2R9lmDhfum1UQ/LvQYGcveYlS9Fioq/I= X-Received: by 2002:a0c:ee64:: with SMTP id n4mr374094qvs.246.1589233719924; Mon, 11 May 2020 14:48:39 -0700 (PDT) MIME-Version: 1.0 References: <20200510233747.13155-1-zimon.toutoune@gmail.com> <20200510234044.14251-1-zimon.toutoune@gmail.com> <87ftc6fcc6.fsf@gnu.org> In-Reply-To: <87ftc6fcc6.fsf@gnu.org> From: zimoun Date: Mon, 11 May 2020 23:48:28 +0200 Message-ID: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Spam-Score: 0.0 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) Hi Ludo, On Mon, 11 May 2020 at 22:25, Ludovic Court=C3=A8s wrote: > Yay, applied! Thank you! > > It is already how '--search' works and has been extended to '--show'. = Does it > > need to be documented in the manua? > > Weirdness. I think we should improve all that rather than document it, > addressing also some of the issues raised in > . Expected weirdness. :-) It is because of the use of 'assoc-ref' on 'opts' which returns the first match, so the first in the alist, so the last in the command-line. This behaviour is a feature. ;-) Well, thanks for the reminder on #40549. Now I have a better understanding (e.g., query vs action), I am going to revisit it. Cheers, simon