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 B588B138334 for ; Tue, 5 Feb 2019 13:51:15 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 7F65FE0D1C; Tue, 5 Feb 2019 13:51:14 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [IPv6:2001:470:ea4a:1:5054:ff:fec7:86e4]) (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 403FFE0D1C for ; Tue, 5 Feb 2019 13:51:14 +0000 (UTC) Received: from oystercatcher.gentoo.org (unknown [IPv6:2a01:4f8:202:4333:225:90ff:fed9:fc84]) (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 34715335D28 for ; Tue, 5 Feb 2019 13:51:12 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id 05FFB520 for ; Tue, 5 Feb 2019 13:51:10 +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: <1549374623.5674671e9d7e0e1251561d81a1154dd5d92e60ec.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.optdesc.yaml man/qdepends.1 qdepends.c X-VCS-Directories: / man/include/ man/ X-VCS-Committer: grobian X-VCS-Committer-Name: Fabian Groffen X-VCS-Revision: 5674671e9d7e0e1251561d81a1154dd5d92e60ec X-VCS-Branch: master Date: Tue, 5 Feb 2019 13:51:10 +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-Auto-Response-Suppress: DR, RN, NRN, OOF, AutoReply X-Archives-Salt: 728c66b0-d11e-40b0-920f-5d79900c30ee X-Archives-Hash: e9f253e4d18a1f296bfd64294f13fb2e commit: 5674671e9d7e0e1251561d81a1154dd5d92e60ec Author: Fabian Groffen gentoo org> AuthorDate: Tue Feb 5 13:47:59 2019 +0000 Commit: Fabian Groffen gentoo org> CommitDate: Tue Feb 5 13:50:23 2019 +0000 URL: https://gitweb.gentoo.org/proj/portage-utils.git/commit/?id=5674671e qdepends: add support for BDEPEND Bug: https://bugs.gentoo.org/674936 Signed-off-by: Fabian Groffen gentoo.org> man/include/qdepends.optdesc.yaml | 8 ++++---- man/qdepends.1 | 13 ++++++++----- qdepends.c | 15 ++++++++++++--- 3 files changed, 24 insertions(+), 12 deletions(-) diff --git a/man/include/qdepends.optdesc.yaml b/man/include/qdepends.optdesc.yaml index 51b1cc7..5d786f3 100644 --- a/man/include/qdepends.optdesc.yaml +++ b/man/include/qdepends.optdesc.yaml @@ -1,13 +1,13 @@ all: | - Show *DEPEND, alias for \fB\-drp\fR. + Show *DEPEND, alias for \fB\-drpb\fR. 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 + \fB\-d\fR, \fB\-r\fR, \fB\-p\fR, \fB\-b\fR or \fB\-a\fR. + \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. + package that references \fI\fR in DEPEND, RDEPEND, PDEPEND or BDEPEND. 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: | diff --git a/man/qdepends.1 b/man/qdepends.1 index 2e1aab2..0273999 100644 --- a/man/qdepends.1 +++ b/man/qdepends.1 @@ -1,5 +1,5 @@ .\" generated by mkman.py, please do NOT edit! -.TH qdepends "1" "May 2018" "Gentoo Foundation" "qdepends" +.TH qdepends "1" "Feb 2019" "Gentoo Foundation" "qdepends" .SH NAME qdepends \- show dependency info .SH SYNOPSIS @@ -32,15 +32,18 @@ Show RDEPEND info. \fB\-p\fR, \fB\-\-pdepend\fR Show PDEPEND info. .TP +\fB\-b\fR, \fB\-\-bdepend\fR +Show BDEPEND info. +.TP \fB\-k\fR \fI\fR, \fB\-\-key\fR \fI\fR 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 +\fB\-d\fR, \fB\-r\fR, \fB\-p\fR, \fB\-b\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. This basically reverses the search to any -package that references \fI\fR in DEPEND, RDEPEND or PDEPEND. +package that references \fI\fR in DEPEND, RDEPEND, PDEPEND or BDEPEND. 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 @@ -48,7 +51,7 @@ search for packages that have \fIlogwatch\fR in their DEPEND. Only show category/package, instead of category/package-version. .TP \fB\-a\fR, \fB\-\-all\fR -Show *DEPEND, alias for \fB\-drp\fR. +Show *DEPEND, alias for \fB\-drpb\fR. .TP \fB\-f\fR, \fB\-\-format\fR Pretty-print DEPEND declaration to be used in an ebuild. This diff --git a/qdepends.c b/qdepends.c index e6b9bcf..92ae57b 100644 --- a/qdepends.c +++ b/qdepends.c @@ -1,5 +1,5 @@ /* - * Copyright 2005-2018 Gentoo Authors + * Copyright 2005-2019 Gentoo Authors * Distributed under the terms of the GNU General Public License v2 * * Copyright 2005-2010 Ned Ludd - @@ -9,11 +9,12 @@ #ifdef APPLET_qdepends -#define QDEPENDS_FLAGS "drpafNk:Q:" COMMON_FLAGS +#define QDEPENDS_FLAGS "drpbafNk:Q:" COMMON_FLAGS static struct option const qdepends_long_opts[] = { {"depend", no_argument, NULL, 'd'}, {"rdepend", no_argument, NULL, 'r'}, {"pdepend", no_argument, NULL, 'p'}, + {"bdepend", no_argument, NULL, 'b'}, {"key", a_argument, NULL, 'k'}, {"query", a_argument, NULL, 'Q'}, {"name-only", no_argument, NULL, 'N'}, @@ -25,6 +26,7 @@ static const char * const qdepends_opts_help[] = { "Show DEPEND info (default)", "Show RDEPEND info", "Show PDEPEND info", + "Show BDEPEND info", "User defined vdb key", "Query reverse deps", "Only show package name", @@ -639,7 +641,13 @@ int qdepends_main(int argc, char **argv) bool do_format = false; const char *query = NULL; const char *depend_file; - const char *depend_files[] = { "DEPEND", "RDEPEND", "PDEPEND", NULL, NULL }; + const char *depend_files[] = { + /* 0 */ "DEPEND", + /* 1 */ "RDEPEND", + /* 2 */ "PDEPEND", + /* 3 */ "BDEPEND", + /* 4 */ NULL + }; depend_file = depend_files[0]; @@ -650,6 +658,7 @@ int qdepends_main(int argc, char **argv) case 'd': depend_file = depend_files[0]; break; case 'r': depend_file = depend_files[1]; break; case 'p': depend_file = depend_files[2]; break; + case 'b': depend_file = depend_files[3]; break; case 'k': depend_file = optarg; break; case 'a': depend_file = NULL; break; case 'Q': query = optarg; break;