From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id 7AB791382C5 for ; Sun, 1 Apr 2018 13:47:39 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 6A6C5E0A10; Sun, 1 Apr 2018 13:47:38 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id 30BE3E0A03 for ; Sun, 1 Apr 2018 13:47:38 +0000 (UTC) Received: from oystercatcher.gentoo.org (oystercatcher.gentoo.org [148.251.78.52]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id A158C335DAA for ; Sun, 1 Apr 2018 13:47:36 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id 19AC9273 for ; Sun, 1 Apr 2018 13:47:35 +0000 (UTC) From: "Fabian Groffen" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Fabian Groffen" Message-ID: <1522590430.3b1cb130c9d20ef0d1190d7b7baf25a910765167.grobian@gentoo> Subject: [gentoo-commits] proj/portage-utils:master commit in: man/, man/include/ X-VCS-Repository: proj/portage-utils X-VCS-Files: man/include/qdepends-05-examples.include man/include/qdepends.desc man/include/qdepends.optdesc.yaml man/qdepends.1 X-VCS-Directories: man/include/ man/ X-VCS-Committer: grobian X-VCS-Committer-Name: Fabian Groffen X-VCS-Revision: 3b1cb130c9d20ef0d1190d7b7baf25a910765167 X-VCS-Branch: master Date: Sun, 1 Apr 2018 13:47:35 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org X-Archives-Salt: b0d36a55-cbef-4da1-95ef-f08074a11613 X-Archives-Hash: ccc9840070ee63017b1d6c7b7b97986a commit: 3b1cb130c9d20ef0d1190d7b7baf25a910765167 Author: Fabian Groffen gentoo org> AuthorDate: Sun Apr 1 13:47:10 2018 +0000 Commit: Fabian Groffen gentoo org> CommitDate: Sun Apr 1 13:47:10 2018 +0000 URL: https://gitweb.gentoo.org/proj/portage-utils.git/commit/?id=3b1cb130 man/qdepends: improve manpage Bug https://bugs.gentoo.org/645554 man/include/qdepends-05-examples.include | 17 +++++++ man/include/qdepends.desc | 10 +++-- man/include/qdepends.optdesc.yaml | 29 ++++++++++++ man/qdepends.1 | 77 ++++++++++++++++++++++++-------- 4 files changed, 111 insertions(+), 22 deletions(-) diff --git a/man/include/qdepends-05-examples.include b/man/include/qdepends-05-examples.include index d4779ea..04fb92f 100644 --- a/man/include/qdepends-05-examples.include +++ b/man/include/qdepends-05-examples.include @@ -6,3 +6,20 @@ For finding out what a particular package depends on for building, you could do: .fi This tells us that we have \fIapp-editors/nano-2.3.2\fR installed and it depends on ncurses (among other things). + +Searching for packages that actually have nano in their RDEPEND: +.nf + $ \fIqdepends -rQ nano\fR + virtual/editor-0 +.fi +Tells us that \fIvirtual/editor\fR depends on nano. However, if we +wanted to know in what way a package specifically depends on another +package, one can use \fB\-v\fR. +.nf + $ \fIqdepends -vrQ logrotate\fR + sys-apps/portage-2.3.18: >=app-admin/logrotate-3.8.0 +.fi +This way we can see there is a specific dependency expressed here. If +the above had used \fI\fR can be + any key from Portage's VDB, e.g.\ any file from + var/db/pkg///. +query: | + Query reverse deps. This basically reverses the search to any + package that references \fI\fR in DEPEND, RDEPEND or PDEPEND. + This can be useful to find consumers of a given package, e.g.\ to + search for packages that have \fIlogwatch\fR in their DEPEND. +name-only: | + Only show category/package, instead of category/package-version. +format: | + Pretty-print DEPEND declaration to be used in an ebuild. This + option initiates a very different mode of operation. Instead of + printing searching through packages, it constructs a multi-line + statement in with shell syntax, to be used in an ebuild. Each + argument is turned into a separate DEPEND variable declaration. You + need to quote dependency strings in order for them to be printed as + a single dependency declaration. When used with the \fB\-q\fR + option, only the pretty-printed dependency declaration is printed, + e.g.\ the DEPEND= part is skipped. +verbose: | + When in reverse dep mode, print the package or packages that matched + the query from the dependency line being searched. This includes + specifiers and versions. +quiet: Suppress DEPEND= output for \fB\-f\fR. diff --git a/man/qdepends.1 b/man/qdepends.1 index a0cac5b..c51a02d 100644 --- a/man/qdepends.1 +++ b/man/qdepends.1 @@ -1,64 +1,85 @@ -.TH qdepends "1" "Mar 2016" "Gentoo Foundation" "qdepends" +.\" generated by mkman.py, please do NOT edit! +.TH qdepends "1" "Apr 2018" "Gentoo Foundation" "qdepends" .SH NAME qdepends \- show dependency info .SH SYNOPSIS .B qdepends \fI[opts] \fR .SH DESCRIPTION -The qdepends applet has a couple different modes. Normally it is geared towards +The +.I qdepends +applet has a couple different modes. Normally it is geared towards answering the queries "what does package X depend on" and "what packages depend on X". Both can further be classified into build, run, and post dependencies. By default, it will tell you the build time dependencies only (DEPEND). -Currently, qdepends will only query installed packages. There is no support for -querying packages not yet installed (the \fBequery\fR(1) tool can do that). +Currently, +.I qdepends +will only query installed packages. There is no support for +querying packages not yet installed (see \fBequery\fR(1) for that). If there is no answer to your query (i.e. you've asked for a package that is not installed, or a version that does not match), then you will get back no output. .SH OPTIONS .TP \fB\-d\fR, \fB\-\-depend\fR -Show DEPEND info (default) +Show DEPEND info (default). .TP \fB\-r\fR, \fB\-\-rdepend\fR -Show RDEPEND info +Show RDEPEND info. .TP \fB\-p\fR, \fB\-\-pdepend\fR -Show PDEPEND info +Show PDEPEND info. .TP \fB\-k\fR \fI\fR, \fB\-\-key\fR \fI\fR -User defined vdb key +Advanced option to allow querying the VDB. This option overrides +\fB\-d\fR, \fB\-r\fR, \fB\-p\fR or \fB\-a\fR. \fI\fR can be +any key from Portage's VDB, e.g.\ any file from +var/db/pkg///. .TP \fB\-Q\fR \fI\fR, \fB\-\-query\fR \fI\fR -Query reverse deps +Query reverse deps. This basically reverses the search to any +package that references \fI\fR in DEPEND, RDEPEND or PDEPEND. +This can be useful to find consumers of a given package, e.g.\ to +search for packages that have \fIlogwatch\fR in their DEPEND. .TP \fB\-N\fR, \fB\-\-name\-only\fR -Only show package name +Only show category/package, instead of category/package-version. .TP \fB\-a\fR, \fB\-\-all\fR -Show all DEPEND info +Show *DEPEND, alias for \fB\-drp\fR. .TP \fB\-f\fR, \fB\-\-format\fR -Pretty format specified depend strings +Pretty-print DEPEND declaration to be used in an ebuild. This +option initiates a very different mode of operation. Instead of +printing searching through packages, it constructs a multi-line +statement in with shell syntax, to be used in an ebuild. Each +argument is turned into a separate DEPEND variable declaration. You +need to quote dependency strings in order for them to be printed as +a single dependency declaration. When used with the \fB\-q\fR +option, only the pretty-printed dependency declaration is printed, +e.g.\ the DEPEND= part is skipped. .TP \fB\-\-root\fR \fI\fR -Set the ROOT env var +Set the ROOT env var. .TP \fB\-v\fR, \fB\-\-verbose\fR -Make a lot of noise +When in reverse dep mode, print the package or packages that matched +the query from the dependency line being searched. This includes +specifiers and versions. .TP \fB\-q\fR, \fB\-\-quiet\fR -Tighter output; suppress warnings +Suppress DEPEND= output for \fB\-f\fR. .TP \fB\-C\fR, \fB\-\-nocolor\fR -Don't output color +Don't output color. .TP \fB\-h\fR, \fB\-\-help\fR -Print this help and exit +Print this help and exit. .TP \fB\-V\fR, \fB\-\-version\fR -Print version and exit +Print version and exit. .SH "EXAMPLES" For finding out what a particular package depends on for building, you could do: .nf @@ -67,10 +88,28 @@ For finding out what a particular package depends on for building, you could do: .fi This tells us that we have \fIapp-editors/nano-2.3.2\fR installed and it depends on ncurses (among other things). + +Searching for packages that actually have nano in their RDEPEND: +.nf + $ \fIqdepends -rQ nano\fR + virtual/editor-0 +.fi +Tells us that \fIvirtual/editor\fR depends on nano. However, if we +wanted to know in what way a package specifically depends on another +package, one can use \fB\-v\fR. +.nf + $ \fIqdepends -vrQ logrotate\fR + sys-apps/portage-2.3.18: >=app-admin/logrotate-3.8.0 +.fi +This way we can see there is a specific dependency expressed here. If +the above had used \fI