[gentoo-commits] proj/portage-utils:master commit in: man/, man/include/
commit: 3a525dc69bf6c74d901da80f13af689b0198557c Author: Emanuele Torre gmail com> AuthorDate: Wed Sep 4 08:59:57 2024 + Commit: Fabian Groffen gentoo org> CommitDate: Thu Sep 5 11:28:38 2024 + URL:https://gitweb.gentoo.org/proj/portage-utils.git/commit/?id=3a525dc6 man: fix -S/--slots option description in qlist.1 I noticed that the qlist(1) man page did not mention that -S implies -I, so I wanted to fix that. The man page was actually supposed to mention it, but man/include/qlist.optdesc.yaml was incorrectly using the "slot" key to define --slots's long description, so the man page ended up using the short description from q list --help instead of the longer description that contains "This flag implies -I.". Renaming the key in the yaml file from "slot" to "slots" fixed the problem. I have regenerated the man pages with man/mkman.py, but only included the new version of qlist.1 in this commit. Signed-off-by: Emanuele Torre gmail.com> Signed-off-by: Fabian Groffen gentoo.org> man/include/qlist.optdesc.yaml | 2 +- man/qlist.1| 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/man/include/qlist.optdesc.yaml b/man/include/qlist.optdesc.yaml index 1145fa9..0ae0700 100644 --- a/man/include/qlist.optdesc.yaml +++ b/man/include/qlist.optdesc.yaml @@ -8,7 +8,7 @@ tree: | umap: | List USE-flags enabled when the package was installed. This flag implies \fB\-I\fR. -slot: | +slots: | Display installed packages with slots (use twice for subslots). This flag implies \fB\-I\fR. repo: | diff --git a/man/qlist.1 b/man/qlist.1 index 9fe7194..e0e9e81 100644 --- a/man/qlist.1 +++ b/man/qlist.1 @@ -1,5 +1,5 @@ .\" generated by mkman.py, please do NOT edit! -.TH qlist "1" "Jan 2024" "Gentoo Foundation" "qlist" +.TH qlist "1" "Sep 2024" "Gentoo Foundation" "qlist" .SH NAME qlist \- list files owned by pkgname .SH SYNOPSIS @@ -27,6 +27,7 @@ Used with \fB\-I\fR to list packages available in the tree. .TP \fB\-S\fR, \fB\-\-slots\fR Display installed packages with slots (use twice for subslots). +This flag implies \fB\-I\fR. .TP \fB\-R\fR, \fB\-\-repo\fR Display installed packages with repository the ebuild originated from.
[gentoo-commits] proj/portage-utils:master commit in: man/
commit: 9420acbcc4cc0a9800bd6c602ea20e572e357f64 Author: Fabian Groffen gentoo org> AuthorDate: Mon Jan 1 10:43:06 2024 + Commit: Fabian Groffen gentoo org> CommitDate: Mon Jan 1 10:43:06 2024 + URL:https://gitweb.gentoo.org/proj/portage-utils.git/commit/?id=9420acbc man: regen for updated footer Signed-off-by: Fabian Groffen gentoo.org> man/q.1 | 7 +-- man/qatom.1 | 7 +-- man/qcheck.1| 7 +-- man/qdepends.1 | 4 ++-- man/qfile.1 | 7 +-- man/qgrep.1 | 7 +-- man/qkeyword.1 | 4 ++-- man/qlist.1 | 7 +-- man/qlop.1 | 10 -- man/qmanifest.1 | 7 +-- man/qmerge.1| 7 +-- man/qpkg.1 | 7 +-- man/qsearch.1 | 7 +-- man/qsize.1 | 7 +-- man/qtbz2.1 | 7 +-- man/qtegrity.1 | 7 +-- man/quse.1 | 7 +-- man/qwhich.1| 7 +-- man/qxpak.1 | 7 +-- 19 files changed, 92 insertions(+), 38 deletions(-) diff --git a/man/q.1 b/man/q.1 index f43be6f..98d4cfe 100644 --- a/man/q.1 +++ b/man/q.1 @@ -1,5 +1,5 @@ .\" generated by mkman.py, please do NOT edit! -.TH q "1" "Mar 2021" "Gentoo Foundation" "q" +.TH q "1" "Jan 2024" "Gentoo Foundation" "q" .SH NAME q \- invoke a portage utility applet .SH SYNOPSIS @@ -51,6 +51,9 @@ Tighter output; suppress warnings. \fB\-C\fR, \fB\-\-nocolor\fR Don't output color. .TP +\fB\-\-color\fR +Force color in output. +.TP \fB\-h\fR, \fB\-\-help\fR Print this help and exit. .TP @@ -82,7 +85,7 @@ Print version and exit. .SH "REPORTING BUGS" Please report bugs via http://bugs.gentoo.org/ .br -Product: Portage Development; Component: Tools +Product: Gentoo Linux; Component: Current packages .SH AUTHORS .nf Ned Ludd diff --git a/man/qatom.1 b/man/qatom.1 index 99bf67a..cb1c972 100644 --- a/man/qatom.1 +++ b/man/qatom.1 @@ -1,5 +1,5 @@ .\" generated by mkman.py, please do NOT edit! -.TH qatom "1" "Feb 2021" "Gentoo Foundation" "qatom" +.TH qatom "1" "Jan 2024" "Gentoo Foundation" "qatom" .SH NAME qatom \- split atom strings .SH SYNOPSIS @@ -88,6 +88,9 @@ Ignored for compatibility with other qapplets. \fB\-C\fR, \fB\-\-nocolor\fR Ignored for compatibility with other qapplets. .TP +\fB\-\-color\fR +Force color in output. +.TP \fB\-h\fR, \fB\-\-help\fR Print this help and exit. .TP @@ -133,7 +136,7 @@ option: .SH "REPORTING BUGS" Please report bugs via http://bugs.gentoo.org/ .br -Product: Portage Development; Component: Tools +Product: Gentoo Linux; Component: Current packages .SH AUTHORS .nf Ned Ludd diff --git a/man/qcheck.1 b/man/qcheck.1 index 2d98408..2c7234c 100644 --- a/man/qcheck.1 +++ b/man/qcheck.1 @@ -1,5 +1,5 @@ .\" generated by mkman.py, please do NOT edit! -.TH qcheck "1" "Feb 2021" "Gentoo Foundation" "qcheck" +.TH qcheck "1" "Jan 2024" "Gentoo Foundation" "qcheck" .SH NAME qcheck \- verify integrity of installed packages .SH SYNOPSIS @@ -48,6 +48,9 @@ Tighter output; suppress warnings. \fB\-C\fR, \fB\-\-nocolor\fR Don't output color. .TP +\fB\-\-color\fR +Force color in output. +.TP \fB\-h\fR, \fB\-\-help\fR Print this help and exit. .TP @@ -57,7 +60,7 @@ Print version and exit. .SH "REPORTING BUGS" Please report bugs via http://bugs.gentoo.org/ .br -Product: Portage Development; Component: Tools +Product: Gentoo Linux; Component: Current packages .SH AUTHORS .nf Ned Ludd diff --git a/man/qdepends.1 b/man/qdepends.1 index 95e2b37..2f7ec83 100644 --- a/man/qdepends.1 +++ b/man/qdepends.1 @@ -1,5 +1,5 @@ .\" generated by mkman.py, please do NOT edit! -.TH qdepends "1" "Jan 2023" "Gentoo Foundation" "qdepends" +.TH qdepends "1" "Jan 2024" "Gentoo Foundation" "qdepends" .SH NAME qdepends \- show dependency info .SH SYNOPSIS @@ -154,7 +154,7 @@ the newly installed version of Perl. .SH "REPORTING BUGS" Please report bugs via http://bugs.gentoo.org/ .br -Product: Portage Development; Component: Tools +Product: Gentoo Linux; Component: Current packages .SH AUTHORS .nf Ned Ludd diff --git a/man/qfile.1 b/man/qfile.1 index 1f261d4..21aa77d 100644 --- a/man/qfile.1 +++ b/man/qfile.1 @@ -1,5 +1,5 @@ .\" generated by mkman.py, please do NOT edit! -.TH qfile "1" "Feb 2021" "Gentoo Foundation" "qfile" +.TH qfile "1" "Jan 2024" "Gentoo Foundation" "qfile" .SH NAME qfile \- list all pkgs owning files .SH SYNOPSIS @@ -73,6 +73,9 @@ report about orphan files. \fB\-C\fR, \fB\-\-nocolor\fR Don't output color. .TP +\fB\-\-color\fR +Force color in output. +.TP \fB\-h\fR, \fB\-\-help\fR Print this help and exit. .TP @@ -231,7 +234,7 @@ rm -rf "${tmpdir}" .SH "REPORTING BUGS" Please report bugs via http://bugs.gentoo.org/ .br -Product: Portage Development; Component: Tools +Product: Gentoo Linux; Component: Current packages .SH AUTHORS .nf Ned Ludd diff --git a/man/qgrep.1 b/man/qgrep.1 index 196a741..22b0858 100644 --- a/man/qgrep.1 +++ b/man/qgrep.1 @@ -1,5 +1,5 @@ .\" generated by mkman.py, please do NOT edit! -.TH qgrep "1" "Fe
[gentoo-commits] proj/portage-utils:master commit in: man/
commit: 0fdf76776377c707d06a4b2e85c9f8ec4abdc26a Author: Fabian Groffen gentoo org> AuthorDate: Mon Jan 1 10:41:09 2024 + Commit: Fabian Groffen gentoo org> CommitDate: Mon Jan 1 10:41:09 2024 + URL:https://gitweb.gentoo.org/proj/portage-utils.git/commit/?id=0fdf7677 man: fix product/component for reporting bugs Closes: https://bugs.gentoo.org/916949 Signed-off-by: Fabian Groffen gentoo.org> man/mkman.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/man/mkman.py b/man/mkman.py index 13cd1c9..0ebf774 100755 --- a/man/mkman.py +++ b/man/mkman.py @@ -49,7 +49,7 @@ TEMPLATE = r""".\" generated by mkman.py, please do NOT edit! .SH "REPORTING BUGS" Please report bugs via http://bugs.gentoo.org/ .br -Product: Portage Development; Component: Tools +Product: Gentoo Linux; Component: Current packages .SH AUTHORS .nf %(authors)s
[gentoo-commits] proj/portage-utils:master commit in: man/, /, man/include/
commit: 49da23ddba819dcf41bc3e5c1a2fb1c8801895d3 Author: Fabian Groffen gentoo org> AuthorDate: Mon Jan 30 14:14:11 2023 + Commit: Fabian Groffen gentoo org> CommitDate: Mon Jan 30 14:14:11 2023 + URL:https://gitweb.gentoo.org/proj/portage-utils.git/commit/?id=49da23dd qdepends: add support for IDEPEND, #892533 Bug: https://bugs.gentoo.org/892533 Signed-off-by: Fabian Groffen gentoo.org> man/include/qdepends.desc | 3 ++- man/qdepends.1| 8 ++-- qdepends.c| 38 +- 3 files changed, 33 insertions(+), 16 deletions(-) diff --git a/man/include/qdepends.desc b/man/include/qdepends.desc index 19000d0..70b27be 100644 --- a/man/include/qdepends.desc +++ b/man/include/qdepends.desc @@ -4,7 +4,8 @@ applet has two different modes, forward and reverse dependency querying. Default operation is forward mode, answering the queries "what does package X depend on", while reverse mode answers "what packages depend on X". Both modes can be further specified into build (DEPEND), run -(RDEPEND), post (PDEPEND) and EAPI7's BDEPEND dependencies. +(RDEPEND), post (PDEPEND), EAPI7's build (BDEPEND) and EAPI8's +install-time (IDEPEND) dependencies. .P By default, \fIqdepends\fR returns the unique set of atoms that match all dependency variables. To split this out per variable, use \fB-v\fR diff --git a/man/qdepends.1 b/man/qdepends.1 index 5e5b00a..95e2b37 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 2022" "Gentoo Foundation" "qdepends" +.TH qdepends "1" "Jan 2023" "Gentoo Foundation" "qdepends" .SH NAME qdepends \- show dependency info .SH SYNOPSIS @@ -12,7 +12,8 @@ applet has two different modes, forward and reverse dependency querying. Default operation is forward mode, answering the queries "what does package X depend on", while reverse mode answers "what packages depend on X". Both modes can be further specified into build (DEPEND), run -(RDEPEND), post (PDEPEND) and EAPI7's BDEPEND dependencies. +(RDEPEND), post (PDEPEND), EAPI7's build (BDEPEND) and EAPI8's +install-time (IDEPEND) dependencies. .P By default, \fIqdepends\fR returns the unique set of atoms that match all dependency variables. To split this out per variable, use \fB-v\fR @@ -52,6 +53,9 @@ Show PDEPEND info. \fB\-b\fR, \fB\-\-bdepend\fR Show BDEPEND info. .TP +\fB\-I\fR, \fB\-\-idepend\fR +Show IDEPEND info. +.TP \fB\-Q\fR, \fB\-\-query\fR Query reverse deps. This basically reverses the search to any package that references \fI\fR in DEPEND, RDEPEND, PDEPEND or BDEPEND. diff --git a/qdepends.c b/qdepends.c index f222011..1ecfab5 100644 --- a/qdepends.c +++ b/qdepends.c @@ -1,5 +1,5 @@ /* - * Copyright 2005-2022 Gentoo Authors + * Copyright 2005-2023 Gentoo Authors * Distributed under the terms of the GNU General Public License v2 * * Copyright 2005-2010 Ned Ludd- @@ -22,12 +22,13 @@ #include "xasprintf.h" #include "xregex.h" -#define QDEPENDS_FLAGS "drpbQitUF:SR" COMMON_FLAGS +#define QDEPENDS_FLAGS "drpbIQitUF:SR" 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'}, + {"idepend", no_argument, NULL, 'I'}, {"query", no_argument, NULL, 'Q'}, {"installed", no_argument, NULL, 'i'}, {"tree", no_argument, NULL, 't'}, @@ -42,6 +43,7 @@ static const char * const qdepends_opts_help[] = { "Show RDEPEND info", "Show PDEPEND info", "Show BDEPEND info", + "Show IDEPEND info", "Query reverse deps", "Search installed packages using VDB", "Search available ebuilds in the tree", @@ -71,17 +73,22 @@ struct qdepends_opt_state { #define QMODE_RDEPEND(1<<1) #define QMODE_PDEPEND(1<<2) #define QMODE_BDEPEND(1<<3) +#define QMODE_IDEPEND(1<<4) #define QMODE_INSTALLED (1<<5) #define QMODE_TREE (1<<6) #define QMODE_REVERSE(1<<7) #define QMODE_FILTERUSE (1<<8) +#define QMODE_DEP_FIRST QMODE_DEPEND +#define QMODE_DEP_LAST QMODE_IDEPEND + const char *depend_files[] = { /* keep *DEPEND aligned with above defines */ /* 0 */ "DEPEND", /* 1 */ "RDEPEND", /* 2 */ "PDEPEND", /* 3 */ "BDEPEND", - /* 4 */ NULL + /* 4 */ "IDEPEND", + /* 5 */ NULL }; static bool @@ -161,15 +168,19 @@ qdepends_results_cb(tree_pkg_ctx *pkg_ctx, void *priv) xarrayfree_int(state->deps); clear_set(state->udeps); +#define get_depstr(X) \ + i == QMODE_DEPEND ? tree_pkg_meta_get(pkg_ctx, DEPEND) : \ + i == QMODE_RDEPEND ? tree_pkg_meta_get(pkg_ctx, RDEPEND) : \ + i == QMODE_PDEPEND ? tree_pkg_meta_get(pkg_ctx, PDEPEND) : \ + i == QMODE_BDEPEND ? tree_pk
[gentoo-commits] proj/portage-utils:master commit in: man/, /
commit: 05e24fdd5fda7fdee37c7f48d398e15f3ba56514 Author: Fabian Groffen gentoo org> AuthorDate: Thu Dec 15 09:35:57 2022 + Commit: Fabian Groffen gentoo org> CommitDate: Thu Dec 15 09:35:57 2022 + URL:https://gitweb.gentoo.org/proj/portage-utils.git/commit/?id=05e24fdd qkeyword: add -A option to show the current arch Signed-off-by: Fabian Groffen gentoo.org> man/qkeyword.1 | 8 +++- qkeyword.c | 31 +++ 2 files changed, 26 insertions(+), 13 deletions(-) diff --git a/man/qkeyword.1 b/man/qkeyword.1 index 2c7eaf5..476a6fa 100644 --- a/man/qkeyword.1 +++ b/man/qkeyword.1 @@ -1,5 +1,5 @@ .\" generated by mkman.py, please do NOT edit! -.TH qkeyword "1" "Feb 2021" "Gentoo Foundation" "qkeyword" +.TH qkeyword "1" "Dec 2022" "Gentoo Foundation" "qkeyword" .SH NAME qkeyword \- list packages based on keywords .SH SYNOPSIS @@ -37,6 +37,9 @@ match catname. \fB\-m\fR \fI\fR, \fB\-\-matchmaint\fR \fI\fR match maintainer email from metadata.xml (slow). .TP +\fB\-A\fR, \fB\-\-showarch\fR +show selected arch from profile configuration. +.TP \fB\-i\fR, \fB\-\-imlate\fR list packages that can be marked stable for . .TP @@ -76,6 +79,9 @@ Tighter output; suppress warnings. \fB\-C\fR, \fB\-\-nocolor\fR Don't output color. .TP +\fB\-\-color\fR +Force color in output. +.TP \fB\-h\fR, \fB\-\-help\fR Print this help and exit. .TP diff --git a/qkeyword.c b/qkeyword.c index 0989e20..5bc1010 100644 --- a/qkeyword.c +++ b/qkeyword.c @@ -28,11 +28,12 @@ /* Required portage-utils stuff */ // -#define QKEYWORD_FLAGS "p:c:m:idtsanSTF:" COMMON_FLAGS +#define QKEYWORD_FLAGS "p:c:m:AidtsanSTF:" COMMON_FLAGS static struct option const qkeyword_long_opts[] = { {"matchpkg", a_argument, NULL, 'p'}, {"matchcat", a_argument, NULL, 'c'}, {"matchmaint", a_argument, NULL, 'm'}, + {"showarch",no_argument, NULL, 'A'}, {"imlate", no_argument, NULL, 'i'}, {"dropped", no_argument, NULL, 'd'}, {"needsstable", no_argument, NULL, 't'}, @@ -48,6 +49,7 @@ static const char * const qkeyword_opts_help[] = { "match pkgname", "match catname", "match maintainer email from metadata.xml (slow)", + "show selected arch from profile configuration", "list packages that can be marked stable for ", "list packages that have dropped keywords for ", "list packages that have ~arch versions, but no stable versions for ", @@ -818,19 +820,22 @@ qkeyword_traverse(tree_pkg_cb func, void *priv) int qkeyword_main(int argc, char **argv) { - int i; - char action = '\0'; + int i; + char action = '\0'; + char *pkg = NULL; + char *cat = NULL; + char *maint= NULL; + bool showarch = false; qkeyword_data data; - char *pkg = NULL; - char *cat = NULL; - char *maint = NULL; data.fmt = NULL; while ((i = GETOPT_LONG(QKEYWORD, qkeyword, "")) != -1) { switch (i) { - case 'p': pkg = optarg; break; - case 'c': cat = optarg; break; - case 'm': maint = optarg; break; + case 'p': pkg = optarg; break; + case 'c': cat = optarg; break; + case 'm': maint= optarg; break; + case 'A': showarch = true;break; + case 'F': data.fmt = optarg; break; case 'i': case 'd': case 't': @@ -844,9 +849,6 @@ int qkeyword_main(int argc, char **argv) qkeyword_usage(EXIT_FAILURE); action = i; break; - case 'F': - data.fmt = optarg; - break; COMMON_GETOPTS_CASES(qkeyword) } @@ -860,6 +862,11 @@ int qkeyword_main(int argc, char **argv) optind + 1 < argc) qkeyword_usage(EXIT_FAILURE); + if (showarch) { + printf("%s\n", data.arch); + return EXIT_SUCCESS; + } + if (cat != NULL) { data.qatom = atom_explode_cat(pkg == NULL ? "" : pkg, cat); if (data.qatom == NULL) {
[gentoo-commits] proj/portage-utils:master commit in: man/, /
commit: d301ed27e28417f185c374a044cfabeb32beb607 Author: Fabian Groffen gentoo org> AuthorDate: Thu May 26 14:32:32 2022 + Commit: Fabian Groffen gentoo org> CommitDate: Thu May 26 14:32:32 2022 + URL:https://gitweb.gentoo.org/proj/portage-utils.git/commit/?id=d301ed27 qdepends: add --resolve flag to lookup depstrings This doesn't respect keywords or masks, but with installed packages shows which packages currently match the deps as expressed Signed-off-by: Fabian Groffen gentoo.org> man/qdepends.1 | 11 ++- qdepends.c | 51 +++ 2 files changed, 45 insertions(+), 17 deletions(-) diff --git a/man/qdepends.1 b/man/qdepends.1 index 0690f16..5e5b00a 100644 --- a/man/qdepends.1 +++ b/man/qdepends.1 @@ -1,5 +1,5 @@ .\" generated by mkman.py, please do NOT edit! -.TH qdepends "1" "Feb 2021" "Gentoo Foundation" "qdepends" +.TH qdepends "1" "May 2022" "Gentoo Foundation" "qdepends" .SH NAME qdepends \- show dependency info .SH SYNOPSIS @@ -68,6 +68,9 @@ Search installed packages using VDB. \fB\-t\fR, \fB\-\-tree\fR Search available ebuilds in the tree. .TP +\fB\-U\fR, \fB\-\-use\fR +Apply profile USE-flags to conditional deps. +.TP \fB\-F\fR \fI\fR, \fB\-\-format\fR \fI\fR Pretty-print DEPEND declaration to be used in an ebuild. This option initiates a very different mode of operation. Instead of @@ -82,6 +85,9 @@ e.g.\ the DEPEND= part is skipped. \fB\-S\fR, \fB\-\-pretty\fR Pretty format specified depend strings. .TP +\fB\-R\fR, \fB\-\-resolve\fR +Resolve found dependencies to package versions. +.TP \fB\-\-root\fR \fI\fR Set the ROOT env var. .TP @@ -97,6 +103,9 @@ Suppress DEPEND= output for \fB\-f\fR. Only print the matching atom for \fB\-Q\ \fB\-C\fR, \fB\-\-nocolor\fR Don't output color. .TP +\fB\-\-color\fR +Force color in output. +.TP \fB\-h\fR, \fB\-\-help\fR Print this help and exit. .TP diff --git a/qdepends.c b/qdepends.c index f1bc3ad..bd7c379 100644 --- a/qdepends.c +++ b/qdepends.c @@ -22,7 +22,7 @@ #include "xasprintf.h" #include "xregex.h" -#define QDEPENDS_FLAGS "drpbQitUF:S" COMMON_FLAGS +#define QDEPENDS_FLAGS "drpbQitUF:SR" COMMON_FLAGS static struct option const qdepends_long_opts[] = { {"depend",no_argument, NULL, 'd'}, {"rdepend", no_argument, NULL, 'r'}, @@ -34,6 +34,7 @@ static struct option const qdepends_long_opts[] = { {"use", no_argument, NULL, 'U'}, {"format", a_argument, NULL, 'F'}, {"pretty",no_argument, NULL, 'S'}, + {"resolve", no_argument, NULL, 'R'}, COMMON_LONG_OPTS }; static const char * const qdepends_opts_help[] = { @@ -47,20 +48,23 @@ static const char * const qdepends_opts_help[] = { "Apply profile USE-flags to conditional deps", "Print matched atom using given format string", "Pretty format specified depend strings", + "Resolve found dependencies to package versions", COMMON_OPTS_HELP }; #define qdepends_usage(ret) usage(ret, QDEPENDS_FLAGS, qdepends_long_opts, qdepends_opts_help, NULL, lookup_applet_idx("qdepends")) /* structures / types / etc ... */ struct qdepends_opt_state { - unsigned int qmode; - array_t *atoms; - array_t *deps; - set *udeps; - char *depend; - size_t depend_len; - const char *format; - tree_ctx *vdb; + unsigned int qmode; + array_t *atoms; + array_t *deps; + set *udeps; + char *depend; + size_tdepend_len; + const char *format; + char resolve:1; + tree_ctx *vdb; + tree_ctx *rtree; }; #define QMODE_DEPEND (1<<0) @@ -174,6 +178,10 @@ qdepends_results_cb(tree_pkg_ctx *pkg_ctx, void *priv) continue; } + /* try and resolve expressions to real package atoms */ + if (state->resolve) + dep_resolve_tree(dep_tree, state->rtree); + if (state->qmode & QMODE_TREE && !(state->qmode & QMODE_REVERSE) && verbose) @@ -301,12 +309,14 @@ int qdepends_main(int argc, char **argv) DECLARE_ARRAY(atoms); DECLARE_ARRAY(deps); struct qdepends_opt_state state = { - .atoms = atoms, - .deps = deps, - .udeps = create_set(), - .qmode = 0, - .format = "%[CATEGORY]%[PF]", - .vdb = NULL, + .atoms = atoms, + .deps= deps, + .udeps = create_set(), + .qmode = 0, + .format = "%[CATEGORY]%[PF]", + .resolve = false, + .vdb = NULL, + .rtree = NULL, }; size_t i; int ret; @@ -328,6 +338,7 @@ int qdepends_main(int argc, char **argv) case 't': state.qmode
[gentoo-commits] proj/portage-utils:master commit in: /, man/, man/include/
commit: 7dc2cc4bfaf2bbb943c45bc8171843a523cea7e5 Author: Fabian Groffen gentoo org> AuthorDate: Sat Mar 13 20:30:48 2021 + Commit: Fabian Groffen gentoo org> CommitDate: Sat Mar 13 20:30:48 2021 + URL:https://gitweb.gentoo.org/proj/portage-utils.git/commit/?id=7dc2cc4b q: show masking reason from comments when using -vv with -m Signed-off-by: Fabian Groffen gentoo.org> main.c | 1 - man/include/q.optdesc.yaml | 5 ++-- man/q.1| 7 +++--- q.c| 58 +++--- 4 files changed, 62 insertions(+), 9 deletions(-) diff --git a/main.c b/main.c index a68af63..ceab587 100644 --- a/main.c +++ b/main.c @@ -677,7 +677,6 @@ read_one_repos_conf(const char *repos_conf, char **primary) main_repo = NULL; repo = NULL; - line = 0; for (p = strtok_r(buf, "\n", &s); p != NULL; p = strtok_r(NULL, "\n", &s)) { /* trim trailing whitespace, remove comments, locate = */ diff --git a/man/include/q.optdesc.yaml b/man/include/q.optdesc.yaml index cde6eed..468ffa9 100644 --- a/man/include/q.optdesc.yaml +++ b/man/include/q.optdesc.yaml @@ -10,5 +10,6 @@ envvar: | variable name and the value is printed as a shell-style declaration. masks: | Print the masks from package.mask files found. Use \fI-v\fR to see -the source (file) where the mask was declared. Additional arguments -are treated as atom selectors which must match the masks. +the source (file) where the mask was declared. Use multiple +\fI-v\fR to print the comment right before the mask. Additional +arguments are treated as atom selectors which must match the masks. diff --git a/man/q.1 b/man/q.1 index 2979cab..f43be6f 100644 --- a/man/q.1 +++ b/man/q.1 @@ -1,5 +1,5 @@ .\" generated by mkman.py, please do NOT edit! -.TH q "1" "Feb 2021" "Gentoo Foundation" "q" +.TH q "1" "Mar 2021" "Gentoo Foundation" "q" .SH NAME q \- invoke a portage utility applet .SH SYNOPSIS @@ -35,8 +35,9 @@ variable name and the value is printed as a shell-style declaration. .TP \fB\-m\fR, \fB\-\-masks\fR Print the masks from package.mask files found. Use \fI-v\fR to see -the source (file) where the mask was declared. Additional arguments -are treated as atom selectors which must match the masks. +the source (file) where the mask was declared. Use multiple +\fI-v\fR to print the comment right before the mask. Additional +arguments are treated as atom selectors which must match the masks. .TP \fB\-\-root\fR \fI\fR Set the ROOT env var. diff --git a/q.c b/q.c index a6a9a0b..e514b0c 100644 --- a/q.c +++ b/q.c @@ -1,5 +1,5 @@ /* - * Copyright 2005-2019 Gentoo Foundation + * Copyright 2005-2021 Gentoo Foundation * Distributed under the terms of the GNU General Public License v2 * * Copyright 2005-2010 Ned Ludd- @@ -288,6 +288,11 @@ int q_main(int argc, char **argv) size_t n; int j; bool match; + char *lastmfile = NULL; + long lastcbeg = 0; + long lastcend = 0; + char *buf = NULL; + size_t buflen = 0; depend_atom *atom; depend_atom *qatom; @@ -313,16 +318,63 @@ int q_main(int argc, char **argv) if (!match) continue; + if (verbose > 1) { + char *mfile = (char *)array_get_elem(files, n); + char *l; + char *s = NULL; + long line = 0; + long cbeg = 0; + long cend = 0; + + s = l = strchr(mfile, ':'); + /* p cannot be NULL, just crash if something's wrong */ + (void)strtol(l + 1, &l, 10); + if (*l == ':') + cbeg = strtol(l + 1, &l, 10); + if (*l == '-') + cend = strtol(l + 1, &l, 10); + if (cend < cbeg) + cend = cbeg = 0; + + if (lastmfile == NULL || + strncmp(lastmfile, mfile, s - mfile + 1) != 0 || + lastcbeg != cbeg || lastcend != cend) + { + *s = '\0'; + if (buf != NULL) + *buf = '\0'; + eat_file(mfile, &buf, &buflen); + *s = ':'; + + line = 0; +
[gentoo-commits] proj/portage-utils:master commit in: man/include/, /, man/
commit: 08cdb5f41aa73580067e8668bc02c8e4be431a65 Author: Fabian Groffen gentoo org> AuthorDate: Sat Feb 20 12:23:26 2021 + Commit: Fabian Groffen gentoo org> CommitDate: Sat Feb 20 12:23:26 2021 + URL:https://gitweb.gentoo.org/proj/portage-utils.git/commit/?id=08cdb5f4 man: regen with new qwhich manpage Signed-off-by: Fabian Groffen gentoo.org> applets.h | 2 +- man/include/qwhich.desc | 15 +++ man/q.1 | 4 +++- man/qatom.1 | 3 ++- man/qcheck.1| 3 ++- man/qdepends.1 | 3 ++- man/qfile.1 | 3 ++- man/qgrep.1 | 3 ++- man/qkeyword.1 | 3 ++- man/qlist.1 | 3 ++- man/qlop.1 | 3 ++- man/qmanifest.1 | 3 ++- man/qmerge.1| 3 ++- man/qpkg.1 | 3 ++- man/qsearch.1 | 3 ++- man/qsize.1 | 3 ++- man/qtbz2.1 | 3 ++- man/qtegrity.1 | 3 ++- man/quse.1 | 3 ++- man/qwhich.1| 32 +--- man/qxpak.1 | 5 +++-- 21 files changed, 83 insertions(+), 23 deletions(-) diff --git a/applets.h b/applets.h index f37cb63..956ab67 100644 --- a/applets.h +++ b/applets.h @@ -91,7 +91,7 @@ static const struct applet_t { {"qtegrity", qtegrity_main, "", "verify files with IMA"}, #endif {"quse", quse_main, "", "find pkgs using useflags"}, - {"qwhich",qwhich_main,"", "find path to pkg"}, + {"qwhich",qwhich_main,"", "find path to pkg"}, {"qxpak", qxpak_main, "", "manipulate xpak archives"}, /* aliases for equery compatibility */ diff --git a/man/include/qwhich.desc b/man/include/qwhich.desc new file mode 100644 index 000..abef4e2 --- /dev/null +++ b/man/include/qwhich.desc @@ -0,0 +1,15 @@ +.I qwhich +returns the paths to the ebuilds matching the given atoms. Searching is +done by default over the main ebuild repository and all configured +overlays. When requested, a search can be made over the repository of +installed packages (VDB) or binpkg repos. +.P +The default action is to print the full path to the latest ebuild for +each package. This can be changed using \fB-d\fR to print the directory +the ebuild is in instead. E.g\. one could \fBcd\fR(1) to this +directory. Alternatively, one can request to stop searching after the +first match using \fB-f\fR, which means at most one match per repo is +returned. +.P +\fIqwhich\fR accepts atoms to search for, which can be any valid atom, +including e.g\. version specifications to narrow the search. diff --git a/man/q.1 b/man/q.1 index d98c3c3..2979cab 100644 --- a/man/q.1 +++ b/man/q.1 @@ -1,5 +1,5 @@ .\" generated by mkman.py, please do NOT edit! -.TH q "1" "Nov 2020" "Gentoo Foundation" "q" +.TH q "1" "Feb 2021" "Gentoo Foundation" "q" .SH NAME q \- invoke a portage utility applet .SH SYNOPSIS @@ -75,6 +75,7 @@ Print version and exit. qtbz2 : manipulate tbz2 packages qtegrity : verify files with IMA quse: find pkgs using useflags +qwhich: find path to pkg qxpak : manipulate xpak archives .fi .SH "REPORTING BUGS" @@ -104,4 +105,5 @@ Fabian Groffen .BR qtbz2 (1), .BR qtegrity (1), .BR quse (1), +.BR qwhich (1), .BR qxpak (1) diff --git a/man/qatom.1 b/man/qatom.1 index d8c7cd6..99bf67a 100644 --- a/man/qatom.1 +++ b/man/qatom.1 @@ -1,5 +1,5 @@ .\" generated by mkman.py, please do NOT edit! -.TH qatom "1" "Nov 2020" "Gentoo Foundation" "qatom" +.TH qatom "1" "Feb 2021" "Gentoo Foundation" "qatom" .SH NAME qatom \- split atom strings .SH SYNOPSIS @@ -157,4 +157,5 @@ Fabian Groffen .BR qtbz2 (1), .BR qtegrity (1), .BR quse (1), +.BR qwhich (1), .BR qxpak (1) diff --git a/man/qcheck.1 b/man/qcheck.1 index 2473513..2d98408 100644 --- a/man/qcheck.1 +++ b/man/qcheck.1 @@ -1,5 +1,5 @@ .\" generated by mkman.py, please do NOT edit! -.TH qcheck "1" "Nov 2020" "Gentoo Foundation" "qcheck" +.TH qcheck "1" "Feb 2021" "Gentoo Foundation" "qcheck" .SH NAME qcheck \- verify integrity of installed packages .SH SYNOPSIS @@ -81,4 +81,5 @@ Fabian Groffen .BR qtbz2 (1), .BR qtegrity (1), .BR quse (1), +.BR qwhich (1), .BR qxpak (1) diff --git a/man/qdepends.1 b/man/qdepends.1 index 0eb7ba3..0690f16 100644 --- a/man/qdepends.1 +++ b/man/qdepends.1 @@ -1,5 +1,5 @@ .\" generated by mkman.py, please do NOT edit! -.TH qdepends "1" "Nov 2020" "Gentoo Foundation" "qdepends" +.TH qdepends "1" "Feb 2021" "Gentoo Foundation" "qdepends" .SH NAME qdepends \- show dependency info .SH SYNOPSIS @@ -165,4 +165,5 @@ Fabian Groffen .BR qtbz2 (1), .BR qtegrity (1), .BR quse (1), +.BR qwhich (1), .BR qxpak (1) diff --git a/man/qfile.1 b/man/qfile.1 index ffe0968..1f261d4 100644 --- a/man/qfile.1 +++ b/man/qfile.1 @@ -1,5 +1,5 @@ .\" generated by mkman.py, please do NOT edit! -.TH qfile "1"
[gentoo-commits] proj/portage-utils:master commit in: man/, /
commit: 307939315330f631f9f526f8560a2ce09605fc9c Author: Fabian Groffen gentoo org> AuthorDate: Wed Feb 17 20:19:58 2021 + Commit: Fabian Groffen gentoo org> CommitDate: Wed Feb 17 20:19:58 2021 + URL:https://gitweb.gentoo.org/proj/portage-utils.git/commit/?id=30793931 qwhich: add applet to show paths to packages e.g. to find the ebuild dir of bash in thw tree: % qwhich -dt bash Signed-off-by: Fabian Groffen gentoo.org> Makefile.am | 3 + man/qwhich.1 | 79 + qwhich.c | 190 +++ 3 files changed, 272 insertions(+) diff --git a/Makefile.am b/Makefile.am index ceded24..cf578f4 100644 --- a/Makefile.am +++ b/Makefile.am @@ -23,6 +23,7 @@ APPLETS = \ qsize \ qtbz2 \ quse \ + qwhich \ qxpak \ $(NULL) @@ -42,6 +43,7 @@ dist_man_MANS = \ man/qsize.1 \ man/qtbz2.1 \ man/quse.1 \ + man/qwhich.1 \ man/qxpak.1 \ $(NULL) @@ -63,6 +65,7 @@ q_SOURCES = \ qsize.c \ qtbz2.c \ quse.c \ + qwhich.c \ qxpak.c \ $(NULL) q_CPPFLAGS = \ diff --git a/man/qwhich.1 b/man/qwhich.1 new file mode 100644 index 000..dce52c2 --- /dev/null +++ b/man/qwhich.1 @@ -0,0 +1,79 @@ +.\" generated by mkman.py, please do NOT edit! +.TH qwhich "1" "Feb 2021" "Gentoo Foundation" "qwhich" +.SH NAME +qwhich \- find path to pkg +.SH SYNOPSIS +.B qwhich +\fI[opts] \fR +.SH DESCRIPTION + +.SH OPTIONS +.TP +\fB\-I\fR, \fB\-\-vdb\fR +Look in VDB (installed packages). +.TP +\fB\-b\fR, \fB\-\-binpkg\fR +Look at binary packages. +.TP +\fB\-t\fR, \fB\-\-tree\fR +Look in main tree and overlays. +.TP +\fB\-p\fR, \fB\-\-pretty\fR +Print (pretty) atom instead of path for use with -F. +.TP +\fB\-d\fR, \fB\-\-dir\fR +Print directory instead of path. +.TP +\fB\-f\fR, \fB\-\-first\fR +Stop searching after first match. +.TP +\fB\-F\fR \fI\fR, \fB\-\-format\fR \fI\fR +Print matched using given format string. +.TP +\fB\-\-root\fR \fI\fR +Set the ROOT env var. +.TP +\fB\-v\fR, \fB\-\-verbose\fR +Report full package versions, emit more elaborate output. +.TP +\fB\-q\fR, \fB\-\-quiet\fR +Tighter output; suppress warnings. +.TP +\fB\-C\fR, \fB\-\-nocolor\fR +Don't output color. +.TP +\fB\-h\fR, \fB\-\-help\fR +Print this help and exit. +.TP +\fB\-V\fR, \fB\-\-version\fR +Print version and exit. + +.SH "REPORTING BUGS" +Please report bugs via http://bugs.gentoo.org/ +.br +Product: Portage Development; Component: Tools +.SH AUTHORS +.nf +Ned Ludd +Mike Frysinger +Fabian Groffen +.fi +.SH "SEE ALSO" +.BR q (1), +.BR qatom (1), +.BR qcheck (1), +.BR qdepends (1), +.BR qfile (1), +.BR qgrep (1), +.BR qkeyword (1), +.BR qlist (1), +.BR qlop (1), +.BR qmanifest (1), +.BR qmerge (1), +.BR qpkg (1), +.BR qsearch (1), +.BR qsize (1), +.BR qtbz2 (1), +.BR qtegrity (1), +.BR quse (1), +.BR qxpak (1) diff --git a/qwhich.c b/qwhich.c new file mode 100644 index 000..3a0c791 --- /dev/null +++ b/qwhich.c @@ -0,0 +1,190 @@ +/* + * Copyright 2021 Gentoo Foundation + * Distributed under the terms of the GNU General Public License v2 + * + * Copyright 2021- Fabian Groffen - + */ + +#include "main.h" +#include "applets.h" + +#include +#include +#include +#include +#include +#include +#include + +#include "atom.h" +#include "tree.h" + +#define QWHICH_FLAGS "IbtpdfF:" COMMON_FLAGS +static struct option const qwhich_long_opts[] = { + {"vdb", no_argument, NULL, 'I'}, + {"binpkg", no_argument, NULL, 'b'}, + {"tree", no_argument, NULL, 't'}, + {"pretty", no_argument, NULL, 'p'}, + {"dir", no_argument, NULL, 'd'}, + {"first",no_argument, NULL, 'f'}, + {"format",a_argument, NULL, 'F'}, + COMMON_LONG_OPTS +}; +static const char * const qwhich_opts_help[] = { + "Look in VDB (installed packages)", + "Look at binary packages", + "Look in main tree and overlays", + "Print (pretty) atom instead of path for use with -F", + "Print directory instead of path", + "Stop searching after first match", + "Print matched using given format string", + COMMON_OPTS_HELP +}; +static const char qwhich_desc[] = ""; +#define qwhich_usage(ret) \ + usage(ret, QWHICH_FLAGS, qwhich_long_opts, qwhich_opts_help, qwhich_desc, lookup_applet_idx("qwhich")) + +struct qwhich_mode { + char do_vdb:1; + char do_binpkg:1; + char do_tree:1; + char print_atom:1; + char print_path:1; + char match_first:1; + const char *fmt; +}; + +int qwhich_main(int argc, char **argv) +{ + depend_atom *atom; + DECLARE_ARRAY(atoms); + DECLARE_ARRAY(trees); + struct qwhich_mode m; + struct tree_match_ctx *tmc; + struct tree_match_ctx *tmcw; + size_t i; + size_t j; + char *overlay; + size_t n; + int ret; + tree_ctx *t; + int repol
[gentoo-commits] proj/portage-utils:master commit in: man/include/, man/, /
commit: 3ef45fa46d5a45a3f19806cf62aba8532b4e401f Author: Fabian Groffen gentoo org> AuthorDate: Sat Jan 30 10:35:55 2021 + Commit: Fabian Groffen gentoo org> CommitDate: Sat Jan 30 10:35:55 2021 + URL:https://gitweb.gentoo.org/proj/portage-utils.git/commit/?id=3ef45fa4 qlop: support -d 0 (or @0) Allow setting the zero date, to basically have a quick way to list everything, useful with -E, e.g. -Evd 0 to show the entire emerge history. Signed-off-by: Fabian Groffen gentoo.org> man/include/qlop.desc | 2 +- man/include/qlop.optdesc.yaml | 2 +- man/qlop.1| 6 +++--- qlop.c| 25 + 4 files changed, 22 insertions(+), 13 deletions(-) diff --git a/man/include/qlop.desc b/man/include/qlop.desc index e39f689..0f7fa7c 100644 --- a/man/include/qlop.desc +++ b/man/include/qlop.desc @@ -19,7 +19,7 @@ in further on specific packages. .P After version \fB0.74\fR of portage-utils, \fIqlop\fR was changed considerably to be more consistent and more advanced. Most notably, -this has changed default date output and commmand line flags. Instead +this has changed default date output and command line flags. Instead of reporting the time the operation finished, \fIqlop\fR now reports the time the operation started. The behaviour of the old \fB-g\fR flag is best matched by the new \fB-t\fR flag. Similar, the old \fB-t\fR flag diff --git a/man/include/qlop.optdesc.yaml b/man/include/qlop.optdesc.yaml index c6e0833..fc268d6 100644 --- a/man/include/qlop.optdesc.yaml +++ b/man/include/qlop.optdesc.yaml @@ -16,7 +16,7 @@ date: | .IP -MM-DDThh:mm:ss As before, but hours, minutes and seconds added. This is the same format qlop prints for timestamps. -.IP S +.IP "S or @S" Seconds since 1970-01-01 00:00:00 + (UTC), the UNIX epoch. .IP FORMAT|DATE Use \fIFORMAT\fR as input for \fBstrptime\fR(3) to parse \fIDATE\fR. diff --git a/man/qlop.1 b/man/qlop.1 index 5aafa82..a175332 100644 --- a/man/qlop.1 +++ b/man/qlop.1 @@ -1,5 +1,5 @@ .\" generated by mkman.py, please do NOT edit! -.TH qlop "1" "Nov 2020" "Gentoo Foundation" "qlop" +.TH qlop "1" "Jan 2021" "Gentoo Foundation" "qlop" .SH NAME qlop \- emerge log analyzer .SH SYNOPSIS @@ -27,7 +27,7 @@ in further on specific packages. .P After version \fB0.74\fR of portage-utils, \fIqlop\fR was changed considerably to be more consistent and more advanced. Most notably, -this has changed default date output and commmand line flags. Instead +this has changed default date output and command line flags. Instead of reporting the time the operation finished, \fIqlop\fR now reports the time the operation started. The behaviour of the old \fB-g\fR flag is best matched by the new \fB-t\fR flag. Similar, the old \fB-t\fR flag @@ -110,7 +110,7 @@ year, followed by month and day of month. .IP -MM-DDThh:mm:ss As before, but hours, minutes and seconds added. This is the same format qlop prints for timestamps. -.IP S +.IP "S or @S" Seconds since 1970-01-01 00:00:00 + (UTC), the UNIX epoch. .IP FORMAT|DATE Use \fIFORMAT\fR as input for \fBstrptime\fR(3) to parse \fIDATE\fR. diff --git a/qlop.c b/qlop.c index 5045d17..2d01689 100644 --- a/qlop.c +++ b/qlop.c @@ -1,5 +1,5 @@ /* - * Copyright 2005-2020 Gentoo Foundation + * Copyright 2005-2021 Gentoo Foundation * Distributed under the terms of the GNU General Public License v2 * * Copyright 2005-2010 Ned Ludd- @@ -116,14 +116,17 @@ parse_date(const char *sdate, time_t *t) } else { /* Handle automatic formats: * - "12315128"-> %s +* - "@12315128"-> %s * - "2015-12-24" -> %Y-%m-%d * - "2019-03-28T13:52:31" -> %Y-%m-%dT%H:%M:%s" * - human readable format (see below) */ - size_t len = strspn(sdate, "0123456789-:T"); + size_t len = strspn(sdate, "0123456789-:T@"); if (sdate[len] == '\0') { const char *fmt; - if (strchr(sdate, '-') == NULL) { + if (sdate[0] == '@') { + fmt = "@%s"; + } else if (strchr(sdate, '-') == NULL) { fmt = "%s"; } else if ((s = strchr(sdate, 'T')) == NULL) { fmt = "%Y-%m-%d"; @@ -1394,8 +1397,8 @@ int qlop_main(int argc, char **argv) DECLARE_ARRAY(atoms); int runningmode = 0; - start_time = 0; - end_time = LONG_MAX; + start_time = -1; + end_time = -1; m.do_time = 0; m.do_merge = 0; m.do_unmerge = 0; @@ -1435,10 +1438,10 @@ int qlop_main(int argc, char **argv) case 'l': m.show_lastmerge = 1;
[gentoo-commits] proj/portage-utils:master commit in: man/
commit: 5fd373fadbdf3f0bc2733f4c6fee4fab71f76e69 Author: Fabian Groffen gentoo org> AuthorDate: Sun Nov 29 09:28:40 2020 + Commit: Fabian Groffen gentoo org> CommitDate: Sun Nov 29 09:28:40 2020 + URL:https://gitweb.gentoo.org/proj/portage-utils.git/commit/?id=5fd373fa man: regenerate after alignment fix Signed-off-by: Fabian Groffen gentoo.org> man/q.1 | 36 ++-- man/qatom.1 | 2 +- man/qcheck.1| 2 +- man/qdepends.1 | 2 +- man/qfile.1 | 2 +- man/qgrep.1 | 2 +- man/qkeyword.1 | 2 +- man/qlist.1 | 2 +- man/qlop.1 | 15 +-- man/qmanifest.1 | 2 +- man/qmerge.1| 2 +- man/qpkg.1 | 2 +- man/qsearch.1 | 2 +- man/qsize.1 | 2 +- man/qtbz2.1 | 2 +- man/qtegrity.1 | 2 +- man/quse.1 | 2 +- man/qxpak.1 | 2 +- 18 files changed, 47 insertions(+), 36 deletions(-) diff --git a/man/q.1 b/man/q.1 index 21a09b3..d98c3c3 100644 --- a/man/q.1 +++ b/man/q.1 @@ -1,5 +1,5 @@ .\" generated by mkman.py, please do NOT edit! -.TH q "1" "Dec 2019" "Gentoo Foundation" "q" +.TH q "1" "Nov 2020" "Gentoo Foundation" "q" .SH NAME q \- invoke a portage utility applet .SH SYNOPSIS @@ -58,24 +58,24 @@ Print version and exit. .SH APPLETS .nf .B This applet also has sub applets: -q : virtual applet -qatom: split atom strings - qcheck: verify integrity of installed packages - qdepends: show dependency info -qfile : list all pkgs owning files -qgrep [pkg ...]: grep in ebuilds - qkeyword : list packages based on keywords -qlist: list files owned by pkgname - qlop: emerge log analyzer + q : virtual applet + qatom: split atom strings +qcheck: verify integrity of installed packages + qdepends: show dependency info + qfile : list all pkgs owning files + qgrep [pkg ...]: grep in ebuilds + qkeyword : list packages based on keywords + qlist: list files owned by pkgname + qlop: emerge log analyzer qmanifest : verify or generate thick Manifest files - qmerge : fetch and merge binary package - qpkg : create or manipulate Gentoo binpkgs - qsearch : search pkgname/desc -qsize: calculate size usage -qtbz2 : manipulate tbz2 packages - qtegrity : verify files with IMA - quse: find pkgs using useflags -qxpak : manipulate xpak archives +qmerge : fetch and merge binary package + qpkg : create or manipulate Gentoo binpkgs + qsearch : search pkgname/desc + qsize: calculate size usage + qtbz2 : manipulate tbz2 packages + qtegrity : verify files with IMA + quse: find pkgs using useflags + qxpak : manipulate xpak archives .fi .SH "REPORTING BUGS" Please report bugs via http://bugs.gentoo.org/ diff --git a/man/qatom.1 b/man/qatom.1 index 9ebb9a0..d8c7cd6 100644 --- a/man/qatom.1 +++ b/man/qatom.1 @@ -1,5 +1,5 @@ .\" generated by mkman.py, please do NOT edit! -.TH qatom "1" "May 2020" "Gentoo Foundation" "qatom" +.TH qatom "1" "Nov 2020" "Gentoo Foundation" "qatom" .SH NAME qatom \- split atom strings .SH SYNOPSIS diff --git a/man/qcheck.1 b/man/qcheck.1 index a48c7f3..2473513 100644 --- a/man/qcheck.1 +++ b/man/qcheck.1 @@ -1,5 +1,5 @@ .\" generated by mkman.py, please do NOT edit! -.TH qcheck "1" "Nov 2019" "Gentoo Foundation" "qcheck" +.TH qcheck "1" "Nov 2020" "Gentoo Foundation" "qcheck" .SH NAME qcheck \- verify integrity of installed packages .SH SYNOPSIS diff --git a/man/qdepends.1 b/man/qdepends.1 index e8d1648..0eb7ba3 100644 --- a/man/qdepends.1 +++ b/man/qdepends.1 @@ -1,5 +1,5 @@ .\" generated by mkman.py, please do NOT edit! -.TH qdepends "1" "Nov 2019" "Gentoo Foundation" "qdepends" +.TH qdepends "1" "Nov 2020" "Gentoo Foundation" "qdepends" .SH NAME qdepends \- show dependency info .SH SYNOPSIS diff --git a/man/qfile.1 b/man/qfile.1 index 7caa459..ffe0968 100644 --- a/man/qfile.1 +++ b/man/qfile.1 @@ -1,5 +1,5 @@ .\" generated by mkman.py, please do NOT edit! -.TH qfile "1" "May 2020" "Gentoo Foundation" "qfile" +.TH qfile "1" "Nov 2020" "Gentoo Foundation" "qfile" .SH NAME qfile \- list all pkgs owning files .SH SYNOPSIS diff --git a/man/qgrep.1 b/man/qgrep.1 index 2d73f4c..70d7eba 100644 --- a/man/qgrep.1 +++ b/man/qgrep.1 @@ -1,5 +1,5 @@ .\" generated by mkman.py, please do NOT edit! -.TH qgrep "1" "Jan 2020" "Gentoo Foundation" "qgrep" +.TH qgrep "1" "Nov 2020" "Gentoo Foundation" "qgrep" .SH NAME qgrep \- grep in ebuilds .SH SYNOPSIS diff --git a/man/qkeyword.1 b/man/qkeyword.1 index 5a26218..d18bea6 100644 --- a/man/qkeyword.1 +++ b/man/qkeyword.1 @@ -1,5 +1,5 @@ .\" generated by mkman.py, please do NOT edit! -.TH qkeyword "1" "Dec 2019" "Gentoo Foundation" "qkeyword" +.TH qkeyword "1" "Nov 2020" "Gentoo Foundat
[gentoo-commits] proj/portage-utils:master commit in: man/include/, man/, /
commit: 72830c415c6c2050ecf7d90e8c739d2764bc9e09 Author: Fabian Groffen gentoo org> AuthorDate: Fri Aug 14 10:05:26 2020 + Commit: Fabian Groffen gentoo org> CommitDate: Fri Aug 14 10:05:26 2020 + URL:https://gitweb.gentoo.org/proj/portage-utils.git/commit/?id=72830c41 qlist: add -t (tree) and -m (masks) arguments -t allow traversing the configured trees -m apply masks from profiles E.g. useful to find the latest available non-masked version of a package: % qlist -Itvm mypackage Signed-off-by: Fabian Groffen gentoo.org> man/include/qlist.optdesc.yaml | 6 man/qlist.1| 10 +- qlist.c| 70 +++--- qmerge.c | 5 +-- 4 files changed, 77 insertions(+), 14 deletions(-) diff --git a/man/include/qlist.optdesc.yaml b/man/include/qlist.optdesc.yaml index 30d8446..1145fa9 100644 --- a/man/include/qlist.optdesc.yaml +++ b/man/include/qlist.optdesc.yaml @@ -3,6 +3,8 @@ installed: | name if the package is currently installed. binpkgs: | Operate on binary packages instead of installed packges. +tree: | +Used with \fB\-I\fR to list packages available in the tree. umap: | List USE-flags enabled when the package was installed. This flag implies \fB\-I\fR. @@ -16,6 +18,10 @@ columns: | Like \fB\-Iv\fR, but package name and version are separated by a space for easy consumption by e.g.\ shell scripts which can read space-separated columns. +masks: | +Filter matches for packages that are masked via the profiles. In +particular useful in combination with \fB\-Itv\fR to find the latest +available version of a given package. verbose: | When used with \fB\-I\fR, print the package version next to name. When listing the package contents, \fB\-v\fR displays symlinks with diff --git a/man/qlist.1 b/man/qlist.1 index 676ee96..db4be0d 100644 --- a/man/qlist.1 +++ b/man/qlist.1 @@ -1,5 +1,5 @@ .\" generated by mkman.py, please do NOT edit! -.TH qlist "1" "Nov 2019" "Gentoo Foundation" "qlist" +.TH qlist "1" "Aug 2020" "Gentoo Foundation" "qlist" .SH NAME qlist \- list files owned by pkgname .SH SYNOPSIS @@ -22,6 +22,9 @@ name if the package is currently installed. \fB\-k\fR, \fB\-\-binpkgs\fR Operate on binary packages instead of installed packges. .TP +\fB\-t\fR, \fB\-\-tree\fR +Used with \fB\-I\fR to list packages available in the tree. +.TP \fB\-S\fR, \fB\-\-slots\fR Display installed packages with slots (use twice for subslots). .TP @@ -38,6 +41,11 @@ Like \fB\-Iv\fR, but package name and version are separated by a space for easy consumption by e.g.\ shell scripts which can read space-separated columns. .TP +\fB\-m\fR, \fB\-\-masks\fR +Filter matches for packages that are masked via the profiles. In +particular useful in combination with \fB\-Itv\fR to find the latest +available version of a given package. +.TP \fB\-\-showdebug\fR Show /usr/lib/debug and /usr/src/debug files. .TP diff --git a/qlist.c b/qlist.c index cd60083..3652c0a 100644 --- a/qlist.c +++ b/qlist.c @@ -22,14 +22,16 @@ #include "xpak.h" #include "xregex.h" -#define QLIST_FLAGS "IkSRUcDedosF:" COMMON_FLAGS +#define QLIST_FLAGS "IktSRUcmDedosF:" COMMON_FLAGS static struct option const qlist_long_opts[] = { {"installed", no_argument, NULL, 'I'}, {"binpkgs", no_argument, NULL, 'k'}, + {"tree", no_argument, NULL, 't'}, {"slots", no_argument, NULL, 'S'}, {"repo", no_argument, NULL, 'R'}, {"umap", no_argument, NULL, 'U'}, {"columns", no_argument, NULL, 'c'}, + {"masks", no_argument, NULL, 'm'}, {"showdebug", no_argument, NULL, 128}, {"exact", no_argument, NULL, 'e'}, {"dir", no_argument, NULL, 'd'}, @@ -42,10 +44,12 @@ static struct option const qlist_long_opts[] = { static const char * const qlist_opts_help[] = { "Just show installed package names", "Use binpkgs instead of installed packages", + "Use available packages in the tree instead of installed", "Display installed packages with slots (use twice for subslots)", "Display installed packages with repository", "Display installed packages with flags used", "Display column view", + "Exclude matches masked by profiles", "Show /usr/lib/debug and /usr/src/debug files", "Exact match (only CAT/PN or PN without PV)", "Only show directories", @@ -175,13 +179,15 @@ qlist_match( tree_pkg_ctx *pkg_ctx, const char *name, depend_atom **name_atom, - bool exact); + bool exact, + bool applymasks); bool qlist_match( tree_pkg_ctx *pkg_ctx, const char *name, depend_atom **name_atom, - bool exact) + bool exact, + bool app
[gentoo-commits] proj/portage-utils:master commit in: man/, man/include/, /
commit: a0780928edc76543e63709c915fb7d581bd13291 Author: Fabian Groffen gentoo org> AuthorDate: Sat May 16 14:29:45 2020 + Commit: Fabian Groffen gentoo org> CommitDate: Sat May 16 14:29:45 2020 + URL:https://gitweb.gentoo.org/proj/portage-utils.git/commit/?id=a0780928 qfile: print symlink targets in verbose mode e.g.: % qfile -v /bin/csh app-shells/tcsh-6.21.00-r1: /bin/csh -> tcsh Signed-off-by: Fabian Groffen gentoo.org> man/include/qfile.optdesc.yaml | 6 +++--- man/qfile.1| 8 qfile.c| 6 +- 3 files changed, 12 insertions(+), 8 deletions(-) diff --git a/man/include/qfile.optdesc.yaml b/man/include/qfile.optdesc.yaml index 66ee885..9e1d24b 100644 --- a/man/include/qfile.optdesc.yaml +++ b/man/include/qfile.optdesc.yaml @@ -1,7 +1,7 @@ verbose: | -Print package versions to matches, warn about problems with -resolving symlinks or positioning packages under an alternative -root. +Print package versions and symlink targets for matches, warn about +problems with resolving symlinks or positioning packages under an +alternative root. quiet: | Don't print matching file for matches, just the package. Don't report about orphan files. diff --git a/man/qfile.1 b/man/qfile.1 index 7501311..7caa459 100644 --- a/man/qfile.1 +++ b/man/qfile.1 @@ -1,5 +1,5 @@ .\" generated by mkman.py, please do NOT edit! -.TH qfile "1" "Nov 2019" "Gentoo Foundation" "qfile" +.TH qfile "1" "May 2020" "Gentoo Foundation" "qfile" .SH NAME qfile \- list all pkgs owning files .SH SYNOPSIS @@ -62,9 +62,9 @@ Don't look in the prunelib registry. Set the ROOT env var. .TP \fB\-v\fR, \fB\-\-verbose\fR -Print package versions to matches, warn about problems with -resolving symlinks or positioning packages under an alternative -root. +Print package versions and symlink targets for matches, warn about +problems with resolving symlinks or positioning packages under an +alternative root. .TP \fB\-q\fR, \fB\-\-quiet\fR Don't print matching file for matches, just the package. Don't diff --git a/qfile.c b/qfile.c index d104848..efac60e 100644 --- a/qfile.c +++ b/qfile.c @@ -305,8 +305,12 @@ static int qfile_cb(tree_pkg_ctx *pkg_ctx, void *priv) printf("%s", atom_format(state->format, atom)); if (quiet) puts(""); + else if (verbose && e->type == CONTENTS_SYM) + printf(": %s%s -> %s\n", + state->root ? state->root : "", + e->name, e->sym_target); else - printf(": %s%s\n", state->root ? : "", e->name); + printf(": %s%s\n", state->root ? state->root : "", e->name); } else { non_orphans[i] = 1; }
[gentoo-commits] proj/portage-utils:master commit in: man/, /
commit: ae5f28c57d2552786d813f44608cc74baf5fbf6d Author: Fabian Groffen gentoo org> AuthorDate: Sat May 16 13:05:54 2020 + Commit: Fabian Groffen gentoo org> CommitDate: Sat May 16 13:05:54 2020 + URL:https://gitweb.gentoo.org/proj/portage-utils.git/commit/?id=ae5f28c5 qatom: add -s switch to strictly emulate a call to atom_compare Signed-off-by: Fabian Groffen gentoo.org> man/qatom.1 | 5 - qatom.c | 29 - 2 files changed, 24 insertions(+), 10 deletions(-) diff --git a/man/qatom.1 b/man/qatom.1 index 4f6ccf2..9ebb9a0 100644 --- a/man/qatom.1 +++ b/man/qatom.1 @@ -1,5 +1,5 @@ .\" generated by mkman.py, please do NOT edit! -.TH qatom "1" "Jan 2020" "Gentoo Foundation" "qatom" +.TH qatom "1" "May 2020" "Gentoo Foundation" "qatom" .SH NAME qatom \- split atom strings .SH SYNOPSIS @@ -67,6 +67,9 @@ The package suffices, currently that is just the asterisk. \fB\-c\fR, \fB\-\-compare\fR Compare two atoms. .TP +\fB\-s\fR, \fB\-\-scompare\fR +Compare two atoms in the given order data, query. +.TP \fB\-p\fR, \fB\-\-print\fR Print reconstructed atom. .TP diff --git a/qatom.c b/qatom.c index 59f7392..1c1c50e 100644 --- a/qatom.c +++ b/qatom.c @@ -15,10 +15,11 @@ #define QATOM_FORMAT "%{CATEGORY} %{PN} %{PV} %[PR] %[SLOT] %[pfx] %[sfx]" -#define QATOM_FLAGS "F:cpl" COMMON_FLAGS +#define QATOM_FLAGS "F:cspl" COMMON_FLAGS static struct option const qatom_long_opts[] = { {"format", a_argument, NULL, 'F'}, {"compare", no_argument, NULL, 'c'}, + {"scompare", no_argument, NULL, 's'}, {"print", no_argument, NULL, 'p'}, {"lookup",no_argument, NULL, 'l'}, COMMON_LONG_OPTS @@ -26,6 +27,7 @@ static struct option const qatom_long_opts[] = { static const char * const qatom_opts_help[] = { "Custom output format (default: " QATOM_FORMAT ")", "Compare two atoms", + "Compare two atoms in the given order data, query", "Print reconstructed atom", "Lookup atom in tree", COMMON_OPTS_HELP @@ -34,7 +36,13 @@ static const char * const qatom_opts_help[] = { int qatom_main(int argc, char **argv) { - enum qatom_atom { _EXPLODE=0, _COMPARE, _PRINT, _LOOKUP } action = _EXPLODE; + enum qatom_atom { + _EXPLODE = 0, + _COMPARE, + _SCOMPARE, + _PRINT, + _LOOKUP + } action = _EXPLODE; const char *format = QATOM_FORMAT; depend_atom *atom; depend_atom *atomc; @@ -43,10 +51,11 @@ int qatom_main(int argc, char **argv) while ((i = GETOPT_LONG(QATOM, qatom, "")) != -1) { switch (i) { - case 'F': format = optarg; break; - case 'c': action = _COMPARE; break; - case 'p': action = _PRINT; break; - case 'l': action = _LOOKUP; break; + case 'F': format = optarg;break; + case 'c': action = _COMPARE; break; + case 's': action = _SCOMPARE; break; + case 'p': action = _PRINT;break; + case 'l': action = _LOOKUP; break; COMMON_GETOPTS_CASES(qatom) } } @@ -54,7 +63,7 @@ int qatom_main(int argc, char **argv) if (argc == optind) qatom_usage(EXIT_FAILURE); - if (action == _COMPARE && (argc - optind) % 2) + if ((action == _COMPARE || action == _SCOMPARE) && (argc - optind) % 2) err("compare needs even number of arguments"); if (action == _LOOKUP) { @@ -71,7 +80,8 @@ int qatom_main(int argc, char **argv) } switch (action) { - case _COMPARE: { + case _COMPARE: + case _SCOMPARE: { int r; i++; @@ -81,7 +91,8 @@ int qatom_main(int argc, char **argv) break; } - if (atomc->blocker != ATOM_BL_NONE || + if (action == _SCOMPARE || + atomc->blocker != ATOM_BL_NONE || atomc->pfx_op != ATOM_OP_NONE || atomc->sfx_op != ATOM_OP_NONE || (atomc->CATEGORY == NULL &&
[gentoo-commits] proj/portage-utils:master commit in: man/include/, /
commit: f926e13ef6202ec76ba057141933e835ee571787 Author: Fabian Groffen gentoo org> AuthorDate: Sat May 2 09:46:57 2020 + Commit: Fabian Groffen gentoo org> CommitDate: Sat May 2 09:58:33 2020 + URL:https://gitweb.gentoo.org/proj/portage-utils.git/commit/?id=f926e13e qlop: add -v mode to -E that displays emerge invocation Really complete the --emerge option with --verbose to get: % qlop -Ev emerge -uaD @world U sys-kernel/linux-firmware-20200421 [20200316] Nwww-servers/nginx-1.18.0 Dwww-servers/nginx-1.17.10 Signed-off-by: Fabian Groffen gentoo.org> man/include/qlop.optdesc.yaml | 13 +++ qlop.c| 84 --- 2 files changed, 92 insertions(+), 5 deletions(-) diff --git a/man/include/qlop.optdesc.yaml b/man/include/qlop.optdesc.yaml index 463a19d..c6e0833 100644 --- a/man/include/qlop.optdesc.yaml +++ b/man/include/qlop.optdesc.yaml @@ -55,3 +55,16 @@ running: | observed, or no previous occurrences for the operation exist, \fIunknown\fR is printed. When combined with \fB-t\fR the elapsed time is also displayed. +emerge: | +Immitate \fBemerge\fR(1) output, as if \fBemerge -pv\fR had been +run. This produces a list of packages that were installed (N), +upgraded (U), downgraded (UD), re-installed (R) or unmerged (D). +The list always includes the version numbers, and for up/downgrades +the previous version is listed between square brackets after the +package. When \fB-v\fR is used, the \fBemerge\fR invocations are +printed as well, to really show what happened. When concurrent +merges are present in the displayed timeframe, the output will be +hard to read. This is a limitation of the \fIemerge.log\fR format. +It is possible to combine this flag with the \fB-d\fR flag, in which +case the default behaviour of displaying the last merge (\fB-l\fR) +is disabled. diff --git a/qlop.c b/qlop.c index 69133bb..d5ace83 100644 --- a/qlop.c +++ b/qlop.c @@ -539,7 +539,82 @@ static int do_emerge_log( continue; /* are we interested in this line? */ - if (flags->do_sync && ( + if (flags->show_emerge && verbose && ( + strncmp(p, " *** emerge ", 13) == 0)) + { + char shortopts[8]; /* must hold as many opts converted below */ + int numopts = 0; + + printf("emerge"); + for (p += 13; (q = strtok(p, " \n")) != NULL; p = NULL) { + if (strncmp(q, "--", 2) == 0) { + /* portage seems to normalise options given into +* their long forms always; I don't want to keep a +* mapping table to short forms here, but it's +* tempting, so I just do a few of the often used +* ones */ + q += 2; + if (strcmp(q, "ask") == 0) { + shortopts[numopts++] = 'a'; + } else if (strcmp(q, "verbose") == 0) { + shortopts[numopts++] = 'v'; + } else if (strcmp(q, "oneshot") == 0) { + shortopts[numopts++] = '1'; + } else if (strcmp(q, "deep") == 0) { + shortopts[numopts++] = 'D'; + } else if (strcmp(q, "update") == 0) { + shortopts[numopts++] = 'u'; + } else if (strcmp(q, "depclean") == 0) { + shortopts[numopts++] = 'c'; + } else if (strcmp(q, "unmerge") == 0) { + shortopts[numopts++] = 'C'; + } else { + q = NULL; + } + + /* process next token */ + if (q != NULL) + continue; + } + + /* if we're here, we've assembled opts whatever we could */ + if (numopts > 0) { + printf(" %s-%.*s%s", + GREEN, numopts, shortopts, NORM); + numopts = 0; + } + +
[gentoo-commits] proj/portage-utils:master commit in: /, man/
commit: 20844dc943700cca72bbb6896f42adcd30de41e3 Author: Fabian Groffen gentoo org> AuthorDate: Sat May 2 08:13:29 2020 + Commit: Fabian Groffen gentoo org> CommitDate: Sat May 2 08:45:40 2020 + URL:https://gitweb.gentoo.org/proj/portage-utils.git/commit/?id=20844dc9 qlop: silently drop -l when -d is used with -E While -E defaults to -l (last merge), silently drop it when -d is used. Signed-off-by: Fabian Groffen gentoo.org> man/qlop.1 | 4 ++-- qlop.c | 5 +++-- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/man/qlop.1 b/man/qlop.1 index 1b63edd..7027f14 100644 --- a/man/qlop.1 +++ b/man/qlop.1 @@ -1,5 +1,5 @@ .\" generated by mkman.py, please do NOT edit! -.TH qlop "1" "Nov 2019" "Gentoo Foundation" "qlop" +.TH qlop "1" "May 2020" "Gentoo Foundation" "qlop" .SH NAME qlop \- emerge log analyzer .SH SYNOPSIS @@ -66,7 +66,7 @@ Show autoclean unmerge history. Show sync history. .TP \fB\-E\fR, \fB\-\-emerge\fR -Show last merge like how emerge(1) -v would show it. +Show last merge similar to how emerge(1) -v would show it. .TP \fB\-e\fR, \fB\-\-endtime\fR Report time at which the operation finished (iso started). diff --git a/qlop.c b/qlop.c index cbe3b58..3e38adf 100644 --- a/qlop.c +++ b/qlop.c @@ -58,7 +58,7 @@ static const char * const qlop_opts_help[] = { "Show unmerge history", "Show autoclean unmerge history", "Show sync history", - "Show last merge like how emerge(1) -v would show it", + "Show last merge similar to how emerge(1) -v would show it", "Report time at which the operation finished (iso started)", "Show current emerging packages", "Limit selection to this time (1st -d is start, 2nd -d is end)", @@ -1367,7 +1367,8 @@ int qlop_main(int argc, char **argv) /* handle -l / -d conflict */ if (start_time != 0 && m.show_lastmerge) { - warn("-l and -d cannot be used together, dropping -l"); + if (m.show_emerge) + warn("-l and -d cannot be used together, dropping -l"); m.show_lastmerge = 0; }
[gentoo-commits] proj/portage-utils:master commit in: man/, /
commit: 16215c71c61da9cb44868d58b4c3ce0529c5d4ac Author: Fabian Groffen gentoo org> AuthorDate: Sun Jan 19 09:48:50 2020 + Commit: Fabian Groffen gentoo org> CommitDate: Sun Jan 19 09:48:50 2020 + URL:https://gitweb.gentoo.org/proj/portage-utils.git/commit/?id=16215c71 qatom: add -l option to match an atom against the tree returns the latest available version of the atom requested, or nothing when not found Signed-off-by: Fabian Groffen gentoo.org> man/qatom.1 | 5 - qatom.c | 33 +++-- 2 files changed, 31 insertions(+), 7 deletions(-) diff --git a/man/qatom.1 b/man/qatom.1 index 6254912..4f6ccf2 100644 --- a/man/qatom.1 +++ b/man/qatom.1 @@ -1,5 +1,5 @@ .\" generated by mkman.py, please do NOT edit! -.TH qatom "1" "Nov 2019" "Gentoo Foundation" "qatom" +.TH qatom "1" "Jan 2020" "Gentoo Foundation" "qatom" .SH NAME qatom \- split atom strings .SH SYNOPSIS @@ -70,6 +70,9 @@ Compare two atoms. \fB\-p\fR, \fB\-\-print\fR Print reconstructed atom. .TP +\fB\-l\fR, \fB\-\-lookup\fR +Lookup atom in tree. +.TP \fB\-\-root\fR \fI\fR Set the ROOT env var. .TP diff --git a/qatom.c b/qatom.c index 23d10d8..59f7392 100644 --- a/qatom.c +++ b/qatom.c @@ -8,36 +8,37 @@ */ #include "main.h" - -#include -#include +#include "applets.h" #include "atom.h" -#include "applets.h" +#include "tree.h" #define QATOM_FORMAT "%{CATEGORY} %{PN} %{PV} %[PR] %[SLOT] %[pfx] %[sfx]" -#define QATOM_FLAGS "F:cp" COMMON_FLAGS +#define QATOM_FLAGS "F:cpl" COMMON_FLAGS static struct option const qatom_long_opts[] = { {"format", a_argument, NULL, 'F'}, {"compare", no_argument, NULL, 'c'}, {"print", no_argument, NULL, 'p'}, + {"lookup",no_argument, NULL, 'l'}, COMMON_LONG_OPTS }; static const char * const qatom_opts_help[] = { "Custom output format (default: " QATOM_FORMAT ")", "Compare two atoms", "Print reconstructed atom", + "Lookup atom in tree", COMMON_OPTS_HELP }; #define qatom_usage(ret) usage(ret, QATOM_FLAGS, qatom_long_opts, qatom_opts_help, NULL, lookup_applet_idx("qatom")) int qatom_main(int argc, char **argv) { - enum qatom_atom { _EXPLODE=0, _COMPARE, _PRINT } action = _EXPLODE; + enum qatom_atom { _EXPLODE=0, _COMPARE, _PRINT, _LOOKUP } action = _EXPLODE; const char *format = QATOM_FORMAT; depend_atom *atom; depend_atom *atomc; + tree_ctx *tree = NULL; int i; while ((i = GETOPT_LONG(QATOM, qatom, "")) != -1) { @@ -45,6 +46,7 @@ int qatom_main(int argc, char **argv) case 'F': format = optarg; break; case 'c': action = _COMPARE; break; case 'p': action = _PRINT; break; + case 'l': action = _LOOKUP; break; COMMON_GETOPTS_CASES(qatom) } } @@ -55,6 +57,12 @@ int qatom_main(int argc, char **argv) if (action == _COMPARE && (argc - optind) % 2) err("compare needs even number of arguments"); + if (action == _LOOKUP) { + tree = tree_open(portroot, main_overlay); + if (tree == NULL) + err("failed to open tree"); + } + for (i = optind; i < argc; i++) { atom = atom_explode(argv[i]); if (atom == NULL) { @@ -101,10 +109,23 @@ int qatom_main(int argc, char **argv) case _PRINT: printf("%s\n", atom_to_string(atom)); break; + case _LOOKUP: + { + tree_pkg_ctx *pkg = tree_match_atom(tree, atom); + if (pkg != NULL) { + atomc = tree_get_atom(pkg, true); + if (!quiet) + printf("%s: ", atom_to_string(atom)); + printf("%s\n", atom_format(format, atomc)); + } + } } atom_implode(atom); } + if (action == _LOOKUP) + tree_close(tree); + return EXIT_SUCCESS; }
[gentoo-commits] proj/portage-utils:master commit in: man/include/
commit: d99b6860d44ea074840f804dd788b9c3a801ee11 Author: Fabian Groffen gentoo org> AuthorDate: Sat Jan 18 13:48:07 2020 + Commit: Fabian Groffen gentoo org> CommitDate: Sat Jan 18 13:48:07 2020 + URL:https://gitweb.gentoo.org/proj/portage-utils.git/commit/?id=d99b6860 man: add missing include file for q options Signed-off-by: Fabian Groffen gentoo.org> man/include/q.optdesc.yaml | 14 ++ 1 file changed, 14 insertions(+) diff --git a/man/include/q.optdesc.yaml b/man/include/q.optdesc.yaml new file mode 100644 index 000..cde6eed --- /dev/null +++ b/man/include/q.optdesc.yaml @@ -0,0 +1,14 @@ +overlays: | +Print available overlays (read from repos.conf). Use \fI-v\fR to +see the source (file) where the overlay was declared. +envvar: | +Print used environment variables and found values. Use \fI-v\fR to +see the source (file, environment) where the variable was declared. +Additional arguments are treated as variable names to print the +values for. If just one name is given, only the value is printed if +matched. When no arguments or more than one argument is given, the +variable name and the value is printed as a shell-style declaration. +masks: | +Print the masks from package.mask files found. Use \fI-v\fR to see +the source (file) where the mask was declared. Additional arguments +are treated as atom selectors which must match the masks.
[gentoo-commits] proj/portage-utils:master commit in: /, man/
commit: 88bd510b4bd83123cd8c1c4920a8e655584ea2db Author: Fabian Groffen gentoo org> AuthorDate: Mon Jan 6 15:03:07 2020 + Commit: Fabian Groffen gentoo org> CommitDate: Mon Jan 6 15:03:07 2020 + URL:https://gitweb.gentoo.org/proj/portage-utils.git/commit/?id=88bd510b qgrep: fix description for -N Signed-off-by: Fabian Groffen gentoo.org> man/qgrep.1 | 6 +++--- qgrep.c | 4 ++-- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/man/qgrep.1 b/man/qgrep.1 index e414ba4..2d73f4c 100644 --- a/man/qgrep.1 +++ b/man/qgrep.1 @@ -1,5 +1,5 @@ .\" generated by mkman.py, please do NOT edit! -.TH qgrep "1" "Nov 2019" "Gentoo Foundation" "qgrep" +.TH qgrep "1" "Jan 2020" "Gentoo Foundation" "qgrep" .SH NAME qgrep \- grep in ebuilds .SH SYNOPSIS @@ -20,8 +20,8 @@ Select non-matching lines. \fB\-i\fR, \fB\-\-ignore\-case\fR Ignore case distinctions. .TP -\fB\-N\fR, \fB\-\-with\-name\fR -Print the filename for each match. +\fB\-N\fR, \fB\-\-atom\-name\fR +Print the atom instead of filename for each match. .TP \fB\-c\fR, \fB\-\-count\fR Only print a count of matching lines per FILE. diff --git a/qgrep.c b/qgrep.c index 4d8c27f..019b0b6 100644 --- a/qgrep.c +++ b/qgrep.c @@ -28,7 +28,7 @@ static struct option const qgrep_long_opts[] = { {"invert-match", no_argument, NULL, 'I'}, {"ignore-case", no_argument, NULL, 'i'}, - {"with-name", no_argument, NULL, 'N'}, + {"atom-name", no_argument, NULL, 'N'}, {"count", no_argument, NULL, 'c'}, {"list", no_argument, NULL, 'l'}, {"invert-list", no_argument, NULL, 'L'}, @@ -46,7 +46,7 @@ static struct option const qgrep_long_opts[] = { static const char * const qgrep_opts_help[] = { "Select non-matching lines", "Ignore case distinctions", - "Print the filename for each match", + "Print the atom instead of filename for each match", "Only print a count of matching lines per FILE", "Only print FILE names containing matches", "Only print FILE names containing no match",
[gentoo-commits] proj/portage-utils:master commit in: man/
commit: e9a92c63076da2b291f088b33ee5e3841ba06988 Author: Fabian Groffen gentoo org> AuthorDate: Thu Jan 2 09:46:46 2020 + Commit: Fabian Groffen gentoo org> CommitDate: Thu Jan 2 09:46:46 2020 + URL:https://gitweb.gentoo.org/proj/portage-utils.git/commit/?id=e9a92c63 man: update qpkg manpage Signed-off-by: Fabian Groffen gentoo.org> man/qpkg.1 | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/man/qpkg.1 b/man/qpkg.1 index 8b681d0..7339ca3 100644 --- a/man/qpkg.1 +++ b/man/qpkg.1 @@ -1,5 +1,5 @@ .\" generated by mkman.py, please do NOT edit! -.TH qpkg "1" "Nov 2019" "Gentoo Foundation" "qpkg" +.TH qpkg "1" "Jan 2020" "Gentoo Foundation" "qpkg" .SH NAME qpkg \- create or manipulate Gentoo binpkgs .SH SYNOPSIS @@ -13,10 +13,10 @@ option. .SH OPTIONS .TP \fB\-c\fR, \fB\-\-clean\fR -clean pkgdir of unused binary files. +clean pkgdir of files that are not installed. .TP \fB\-E\fR, \fB\-\-eclean\fR -clean pkgdir of files not in the tree anymore (slow). +clean pkgdir of files that are not in the tree anymore. .TP \fB\-p\fR, \fB\-\-pretend\fR pretend only.
[gentoo-commits] proj/portage-utils:master commit in: man/, /, man/include/
commit: 1038786d92a885dece9cc82588e88d8367a0fda2 Author: Fabian Groffen gentoo org> AuthorDate: Fri Dec 27 19:14:44 2019 + Commit: Fabian Groffen gentoo org> CommitDate: Fri Dec 27 19:14:44 2019 + URL:https://gitweb.gentoo.org/proj/portage-utils.git/commit/?id=1038786d qkeyword: apply profile masks to -S/-T results Technically, this should be enough to implement the Puppet provider for Gentoo. Signed-off-by: Fabian Groffen gentoo.org> man/include/qkeyword-01-latest-testing.include | 23 man/include/qkeyword.desc | 10 +++- man/qkeyword.1 | 34 ++-- qkeyword.c | 73 +- 4 files changed, 121 insertions(+), 19 deletions(-) diff --git a/man/include/qkeyword-01-latest-testing.include b/man/include/qkeyword-01-latest-testing.include new file mode 100644 index 000..1c2fde5 --- /dev/null +++ b/man/include/qkeyword-01-latest-testing.include @@ -0,0 +1,23 @@ +.SH "RETRIEVING LATEST TESTING VERSION AVAILABLE" +.PP +To retrieve the latest available version in the ebuild tree marked as +testing for the given ARCH, can be done with a combination of flags, +mostly to restrict the search. For instance, to find the latest version +of \fIsys-devel/gcc\fR available, one could use: +.nf +$ qkeyword -p sys-devel/gcc -T +sys-devel/gcc-8.3.0 +.fi +It may be that there is a newer version available, but masked for the +configured profile (via package.mask). Using \fB-v\fR will inform about +this scenario happening: +.nf +$ qkeyword -p dev-vcs/cvs -Tv +masked by =dev-vcs/cvs-1.12.12*: dev-vcs/cvs-1.12.12-r12 +.fi +Unrelated, but to locate the mask given, use verbose mode on \fIq\fR's +mask listing: +.nf +$ q -mv dev-vcs/cvs +=dev-vcs/cvs-1.12.12* [/repo/gentoo/profiles/prefix/sunos/solaris/package.mask] +.fi diff --git a/man/include/qkeyword.desc b/man/include/qkeyword.desc index b7a863c..adc55ea 100644 --- a/man/include/qkeyword.desc +++ b/man/include/qkeyword.desc @@ -1,5 +1,5 @@ -\fIqkeyword\fR allows various searches based on KEYWORDS aimed at Gentoo -developers. Various modes allow to query which packages would be +\fIqkeyword\fR allows various searches based on KEYWORDS. Some uses are +aimed at Gentoo developers, to allow querying which packages would be available, or are candidate for keywording. .P By default, the entire tree is traversed. Since this process can be @@ -12,3 +12,9 @@ as package in one go. The \fB-m\fR maintainer match, while reducing the resulting set, is likely to slow down the query processing since the metadata.xml file has to be read for each package examined. It is best used in combination with \fB-p\fR or \fB-c\fR. +.P +\fIqkeyword\fR uses the keyword found in the configured profile (ARCH) +for its queries. This keyword can be overridden by giving the desired +keyword as argument. Note that this does not change the profile in use, +which most notably can result in incorrect masks being applied for the +\fB-T\fR and \fB-S\fR options. diff --git a/man/qkeyword.1 b/man/qkeyword.1 index 34beb18..5a26218 100644 --- a/man/qkeyword.1 +++ b/man/qkeyword.1 @@ -6,8 +6,8 @@ qkeyword \- list packages based on keywords .B qkeyword \fI[opts] \fR .SH DESCRIPTION -\fIqkeyword\fR allows various searches based on KEYWORDS aimed at Gentoo -developers. Various modes allow to query which packages would be +\fIqkeyword\fR allows various searches based on KEYWORDS. Some uses are +aimed at Gentoo developers, to allow querying which packages would be available, or are candidate for keywording. .P By default, the entire tree is traversed. Since this process can be @@ -20,6 +20,12 @@ as package in one go. The \fB-m\fR maintainer match, while reducing the resulting set, is likely to slow down the query processing since the metadata.xml file has to be read for each package examined. It is best used in combination with \fB-p\fR or \fB-c\fR. +.P +\fIqkeyword\fR uses the keyword found in the configured profile (ARCH) +for its queries. This keyword can be overridden by giving the desired +keyword as argument. Note that this does not change the profile in use, +which most notably can result in incorrect masks being applied for the +\fB-T\fR and \fB-S\fR options. .SH OPTIONS .TP \fB\-p\fR \fI\fR, \fB\-\-matchpkg\fR \fI\fR @@ -75,7 +81,29 @@ Print this help and exit. .TP \fB\-V\fR, \fB\-\-version\fR Print version and exit. - +.SH "RETRIEVING LATEST TESTING VERSION AVAILABLE" +.PP +To retrieve the latest available version in the ebuild tree marked as +testing for the given ARCH, can be done with a combination of flags, +mostly to restrict the search. For instance, to find the latest version +of \fIsys-devel/gcc\fR available, one could use: +.nf +$ qkeyword -p sys-devel/gcc -T +sys-devel/gcc-8.3.0 +.fi +It may be that there is a newer version available, but masked for the +configured profile (via package.mask). Using \fB-v\fR
[gentoo-commits] proj/portage-utils:master commit in: man/include/, /, man/
commit: 032bd7e9200d1071b79f3a5d33906020fc805048 Author: Fabian Groffen gentoo org> AuthorDate: Fri Dec 27 16:55:58 2019 + Commit: Fabian Groffen gentoo org> CommitDate: Fri Dec 27 16:55:58 2019 + URL:https://gitweb.gentoo.org/proj/portage-utils.git/commit/?id=032bd7e9 main: add masks support Expose masks via q -m, store masks in preparation for applying masks when listing available ebuilds. Signed-off-by: Fabian Groffen gentoo.org> main.c | 221 + main.h | 2 + man/include/q.desc | 2 + man/q.1| 13 +++- q.c| 56 +- 5 files changed, 209 insertions(+), 85 deletions(-) diff --git a/main.c b/main.c index 869bf31..b5404cb 100644 --- a/main.c +++ b/main.c @@ -22,6 +22,7 @@ #include "eat_file.h" #include "rmspace.h" #include "scandirat.h" +#include "set.h" #include "xasprintf.h" /* variables to control runtime behavior */ @@ -354,10 +355,12 @@ set_portage_env_var(env_vars *var, const char *value, const char *src) } } -/* Helper to read a portage env file (e.g. make.conf), or recursively if - * it points to a directory */ +/* Helper to read a portage file (e.g. make.conf, package.mask), or + * recursively if it points to a directory (we don't care about EAPI for + * dirs, basically PMS 5.2.5 EAPI restriction is ignored) */ +enum portage_file_type { ENV_FILE, PMASK_FILE }; static void -read_portage_env_file(const char *file, env_vars vars[]) +read_portage_file(const char *file, enum portage_file_type type, void *data) { FILE *fp; struct dirent **dents; @@ -368,6 +371,8 @@ read_portage_env_file(const char *file, env_vars vars[]) size_t buflen = 0; size_t line; int i; + env_vars *vars = data; + set *masks = data; if (getenv("DEBUG")) fprintf(stderr, "profile %s\n", file); @@ -384,7 +389,7 @@ read_portage_env_file(const char *file, env_vars vars[]) d->d_name[strlen(d->d_name) - 1] == '~') continue; snprintf(npath, sizeof(npath), "%s/%s", file, d->d_name); - read_portage_env_file(npath, vars); + read_portage_file(npath, type, data); } scandir_free(dents, dentslen); goto done; @@ -402,84 +407,107 @@ read_portage_env_file(const char *file, env_vars vars[]) continue; /* Handle "source" keyword */ - if (strncmp(buf, "source ", 7) == 0) { - const char *sfile = buf + 7; - char npath[_Q_PATH_MAX * 2]; + if (type == ENV_FILE) { + if (strncmp(buf, "source ", 7) == 0) { + const char *sfile = buf + 7; + char npath[_Q_PATH_MAX * 2]; - if (sfile[0] != '/') { - /* handle relative paths */ - size_t file_path_len; + if (sfile[0] != '/') { + /* handle relative paths */ + size_t file_path_len; - s = strrchr(file, '/'); - file_path_len = s - file + 1; + s = strrchr(file, '/'); + file_path_len = s - file + 1; - snprintf(npath, sizeof(npath), "%.*s/%s", - (int)file_path_len, file, sfile); - sfile = npath; - } - - read_portage_env_file(sfile, vars); - continue; - } + snprintf(npath, sizeof(npath), "%.*s/%s", + (int)file_path_len, file, sfile); + sfile = npath; + } - /* look for our desired variables and grab their value */ - for (i = 0; vars[i].name; ++i) { - if (buf[vars[i].name_len] != '=' && buf[vars[i].name_len] != ' ') - continue; - if (strncmp(buf, vars[i].name, vars[i].name_len)) + read_portage_file(sfile, type, data); continue; + } - /* make sure we handle spaces between the varname, the =, -* and the value: -* VAR=val VAR = val VAR="val" -*/ - s = buf + vars[i].name_len; - if ((p = strchr(s, '=')) != NUL
[gentoo-commits] proj/portage-utils:master commit in: /, man/
commit: e5ff6caad2f4b848f77e6de82c866fa42aba30ae Author: Fabian Groffen gentoo org> AuthorDate: Sat Dec 14 16:56:39 2019 + Commit: Fabian Groffen gentoo org> CommitDate: Sat Dec 14 16:56:39 2019 + URL:https://gitweb.gentoo.org/proj/portage-utils.git/commit/?id=e5ff6caa qkeyword: add modes to list just list latest stable/testing This functionality combined with -F allows usage with e.g. Puppet providers. Signed-off-by: Fabian Groffen gentoo.org> man/qkeyword.1 | 23 +++- qkeyword.c | 84 +- 2 files changed, 81 insertions(+), 26 deletions(-) diff --git a/man/qkeyword.1 b/man/qkeyword.1 index c43fa61..34beb18 100644 --- a/man/qkeyword.1 +++ b/man/qkeyword.1 @@ -1,5 +1,5 @@ .\" generated by mkman.py, please do NOT edit! -.TH qkeyword "1" "Nov 2019" "Gentoo Foundation" "qkeyword" +.TH qkeyword "1" "Dec 2019" "Gentoo Foundation" "qkeyword" .SH NAME qkeyword \- list packages based on keywords .SH SYNOPSIS @@ -32,22 +32,31 @@ match catname. match maintainer email from metadata.xml (slow). .TP \fB\-i\fR, \fB\-\-imlate\fR -list packages that can be marked stable on a given arch. +list packages that can be marked stable for . .TP \fB\-d\fR, \fB\-\-dropped\fR -list packages that have dropped keywords on a version bump on a given arch. +list packages that have dropped keywords for . .TP -\fB\-t\fR, \fB\-\-testing\fR -list packages that have ~arch versions, but no stable versions on a given arch. +\fB\-t\fR, \fB\-\-needsstable\fR +list packages that have ~arch versions, but no stable versions for . .TP \fB\-s\fR, \fB\-\-stats\fR display statistics about the portage tree. .TP \fB\-a\fR, \fB\-\-all\fR -list packages that have at least one version keyworded for on a given arch. +list packages that have at least one version keyworded for . .TP \fB\-n\fR, \fB\-\-not\fR -list packages that aren't keyworded on a given arch. +list packages that aren't keyworded for . +.TP +\fB\-S\fR, \fB\-\-stable\fR +list latest stable version per package for . +.TP +\fB\-T\fR, \fB\-\-testing\fR +list latest testing version per package for . +.TP +\fB\-F\fR \fI\fR, \fB\-\-format\fR \fI\fR +Print latest atom using given format string. .TP \fB\-\-root\fR \fI\fR Set the ROOT env var. diff --git a/qkeyword.c b/qkeyword.c index 4c6c759..4a55b6a 100644 --- a/qkeyword.c +++ b/qkeyword.c @@ -28,29 +28,35 @@ /* Required portage-utils stuff */ // -#define QKEYWORD_FLAGS "p:c:m:idtans" COMMON_FLAGS +#define QKEYWORD_FLAGS "p:c:m:idtsanSTF:" COMMON_FLAGS static struct option const qkeyword_long_opts[] = { - {"matchpkg", a_argument, NULL, 'p'}, - {"matchcat", a_argument, NULL, 'c'}, - {"matchmaint", a_argument, NULL, 'm'}, - {"imlate", no_argument, NULL, 'i'}, - {"dropped", no_argument, NULL, 'd'}, - {"testing", no_argument, NULL, 't'}, - {"stats", no_argument, NULL, 's'}, - {"all", no_argument, NULL, 'a'}, - {"not", no_argument, NULL, 'n'}, + {"matchpkg", a_argument, NULL, 'p'}, + {"matchcat", a_argument, NULL, 'c'}, + {"matchmaint", a_argument, NULL, 'm'}, + {"imlate", no_argument, NULL, 'i'}, + {"dropped", no_argument, NULL, 'd'}, + {"needsstable", no_argument, NULL, 't'}, + {"stats", no_argument, NULL, 's'}, + {"all", no_argument, NULL, 'a'}, + {"not", no_argument, NULL, 'n'}, + {"stable", no_argument, NULL, 'S'}, + {"testing", no_argument, NULL, 'T'}, + {"format", a_argument, NULL, 'F'}, COMMON_LONG_OPTS }; static const char * const qkeyword_opts_help[] = { "match pkgname", "match catname", "match maintainer email from metadata.xml (slow)", - "list packages that can be marked stable on a given arch", - "list packages that have dropped keywords on a version bump on a given arch", - "list packages that have ~arch versions, but no stable versions on a given arch", + "list packages that can be marked stable for ", + "list packages that have dropped keywords for ", + "list packages that have ~arch versions, but no stable versions for ", "display statistics about the portage tree", - "list packages that have at least one version keyworded for on a given arch", - "list packages that aren't keyworded on a given arch.", + "list packages that have at least one version keyworded for ", + "list packages that aren't keyworded for ", + "list latest stable version per package for ", + "list latest testing version per package for ", + "Print latest atom using given format string", COMMON_OPTS_HELP }; #define qkeyword_usage(ret) usage(ret, QKEYWORD_FLAGS, qkeyword_long_opts, qkeyword_opts_help, NULL, lookup_ap
[gentoo-commits] proj/portage-utils:master commit in: /, man/
commit: abbfff8553d8e99d71d71054e81a7f21d6479221 Author: Fabian Groffen gentoo org> AuthorDate: Sun Nov 24 12:26:47 2019 + Commit: Fabian Groffen gentoo org> CommitDate: Sun Nov 24 12:26:47 2019 + URL:https://gitweb.gentoo.org/proj/portage-utils.git/commit/?id=abbfff85 main: overhaul profile/config reading somewhat - track where values come from, expose using -v (with q -[oe]) - follow repo-prefixed profiles in parent files (non-PMS feature?) - read usr/share/portage/config/repos.conf for repo defaults Signed-off-by: Fabian Groffen gentoo.org> applets.h | 1 + main.c| 397 -- main.h| 1 + man/q.1 | 6 +- q.c | 20 +++- 5 files changed, 254 insertions(+), 171 deletions(-) diff --git a/applets.h b/applets.h index 364f457..e7b81f4 100644 --- a/applets.h +++ b/applets.h @@ -168,6 +168,7 @@ extern char *features; extern char *install_mask; extern DEFINE_ARRAY(overlays); extern DEFINE_ARRAY(overlay_names); +extern DEFINE_ARRAY(overlay_src); extern char *main_overlay; extern int twidth; diff --git a/main.c b/main.c index e236934..081d72a 100644 --- a/main.c +++ b/main.c @@ -44,6 +44,7 @@ char *features; char *install_mask; DECLARE_ARRAY(overlays); DECLARE_ARRAY(overlay_names); +DECLARE_ARRAY(overlay_src); static char *portarch; static char *portedb; @@ -248,96 +249,6 @@ makeargv(const char *string, int *argc, char ***argv) free(q); } -/* Handle a single file in the repos.conf format. */ -static void -read_one_repos_conf(const char *repos_conf) -{ - int nsec; - char *conf; - const char *main_repo, *repo, *path; - dictionary *dict; - - if (getenv("DEBUG")) - fprintf(stderr, " parse %s\n", repos_conf); - - dict = iniparser_load(repos_conf); - - main_repo = iniparser_getstring(dict, "DEFAULT:main-repo", NULL); - - nsec = iniparser_getnsec(dict); - while (nsec-- > 0) { - repo = iniparser_getsecname(dict, nsec); - if (!strcmp(repo, "DEFAULT")) - continue; - - xasprintf(&conf, "%s:location", repo); - path = iniparser_getstring(dict, conf, NULL); - if (path) { - void *ele = xarraypush_str(overlays, path); - xarraypush_str(overlay_names, repo); - if (main_repo && !strcmp(repo, main_repo)) - main_overlay = ele; - } - free(conf); - } - - iniparser_freedict(dict); -} - -/* Handle a possible directory of files. */ -static void -read_repos_conf(const char *configroot, const char *repos_conf) -{ - char *top_conf, *sub_conf; - int i, count; - struct dirent **confs; - - xasprintf(&top_conf, "%s%s", configroot, repos_conf); - if (getenv("DEBUG")) - fprintf(stderr, "repos.conf.d scanner %s\n", top_conf); - count = scandir(top_conf, &confs, NULL, alphasort); - if (count == -1) { - if (errno == ENOTDIR) - read_one_repos_conf(top_conf); - } else { - for (i = 0; i < count; ++i) { - const char *name = confs[i]->d_name; - - if (name[0] == '.' || name[0] == '\0') - continue; - - /* Exclude backup files (aka files with ~ as postfix). */ - if (name[strlen(name) - 1] == '~') - continue; - -#ifdef DT_UNKNOWN - if (confs[i]->d_type != DT_UNKNOWN && - confs[i]->d_type != DT_REG && - confs[i]->d_type != DT_LNK) - continue; -#endif - - xasprintf(&sub_conf, "%s/%s", top_conf, name); - -#ifdef DT_UNKNOWN - if (confs[i]->d_type != DT_REG) -#endif - { - struct stat st; - if (stat(sub_conf, &st) || !S_ISREG(st.st_mode)) { - free(sub_conf); - continue; - } - } - - read_one_repos_conf(sub_conf); - free(sub_conf); - } - scandir_free(confs, count); - } - free(top_conf); -} - static void strincr_var(const char *name, const char *s, char **value, size_t *value_len) { @@ -406,19 +317,33 @@ get_portage_env_var(env_vars *vars, const char *name) } static void -set_portage_env_var(env_vars *var, const char *value) +set_portage_env_var(env_vars *var, const char *value, const char *src) { switch (var->type) { case _Q_BOOL: *var->value.b = 1; + free(var->src); + var->src
[gentoo-commits] proj/portage-utils:master commit in: man/include/, /
commit: f9eef8946dee223de1115e572633a7ddefa3197c Author: Fabian Groffen gentoo org> AuthorDate: Sun Nov 17 15:02:30 2019 + Commit: Fabian Groffen gentoo org> CommitDate: Sun Nov 17 15:02:30 2019 + URL:https://gitweb.gentoo.org/proj/portage-utils.git/commit/?id=f9eef894 qlist: add -k option to operate on binpkgs Signed-off-by: Fabian Groffen gentoo.org> man/include/qlist.desc | 3 ++- man/include/qlist.optdesc.yaml | 2 ++ qlist.c| 22 +++--- 3 files changed, 19 insertions(+), 8 deletions(-) diff --git a/man/include/qlist.desc b/man/include/qlist.desc index e02d971..e26d63d 100644 --- a/man/include/qlist.desc +++ b/man/include/qlist.desc @@ -3,4 +3,5 @@ package. Alternatively, lists whether a package is installed, optionally with version, USE-flag, SLOT or REPO information. The \fIpkgname\fR to query for does not have to be an exact match, it may be part of it, e.g.\ an entire category, or any package with some string in -its name. +its name. When no packages are given to match, \fIqlist\fR lists all +installed packages. diff --git a/man/include/qlist.optdesc.yaml b/man/include/qlist.optdesc.yaml index 5fff904..30d8446 100644 --- a/man/include/qlist.optdesc.yaml +++ b/man/include/qlist.optdesc.yaml @@ -1,6 +1,8 @@ installed: | Instead of listing the contents of a package, just print the package name if the package is currently installed. +binpkgs: | +Operate on binary packages instead of installed packges. umap: | List USE-flags enabled when the package was installed. This flag implies \fB\-I\fR. diff --git a/qlist.c b/qlist.c index a97111d..30c0c6f 100644 --- a/qlist.c +++ b/qlist.c @@ -21,16 +21,16 @@ #include "tree.h" #include "xregex.h" -#define QLIST_FLAGS "ISRUcDeadosF:" COMMON_FLAGS +#define QLIST_FLAGS "IkSRUcDedosF:" COMMON_FLAGS static struct option const qlist_long_opts[] = { {"installed", no_argument, NULL, 'I'}, + {"binpkgs", no_argument, NULL, 'k'}, {"slots", no_argument, NULL, 'S'}, {"repo", no_argument, NULL, 'R'}, {"umap", no_argument, NULL, 'U'}, {"columns", no_argument, NULL, 'c'}, {"showdebug", no_argument, NULL, 128}, {"exact", no_argument, NULL, 'e'}, - {"all", no_argument, NULL, 'a'}, {"dir", no_argument, NULL, 'd'}, {"obj", no_argument, NULL, 'o'}, {"sym", no_argument, NULL, 's'}, @@ -40,13 +40,13 @@ static struct option const qlist_long_opts[] = { }; static const char * const qlist_opts_help[] = { "Just show installed package names", + "Use binpkgs instead of installed packages", "Display installed packages with slots (use twice for subslots)", "Display installed packages with repository", "Display installed packages with flags used", "Display column view", "Show /usr/lib/debug and /usr/src/debug files", "Exact match (only CAT/PN or PN without PV)", - "Show every installed package", "Only show directories", "Only show objects", "Only show symlinks", @@ -410,6 +410,7 @@ int qlist_main(int argc, char **argv) int show_slots = 0; bool show_repo = false; bool do_columns = false; + bool do_binpkgs = false; char qfmt[128]; struct qlist_opt_state state = { .argc = argc, @@ -430,8 +431,8 @@ int qlist_main(int argc, char **argv) while ((i = GETOPT_LONG(QLIST, qlist, "")) != -1) { switch (i) { COMMON_GETOPTS_CASES(qlist) - case 'a': state.all = true; /* fall through */ case 'I': state.just_pkgname = true;break; + case 'k': do_binpkgs = true;break; case 'S': state.just_pkgname = true; show_slots++; break; case 'R': state.just_pkgname = show_repo = true;break; case 'U': state.just_pkgname = state.show_umap = true; break; @@ -448,8 +449,12 @@ int qlist_main(int argc, char **argv) /* default to showing syms and objs */ if (!state.show_dir && !state.show_obj && !state.show_sym) state.show_obj = state.show_sym = true; - if (argc == optind && !state.all) - qlist_usage(EXIT_FAILURE); + if (argc == optind) { + if (state.just_pkgname) + state.all = true; + else + qlist_usage(EXIT_FAILURE); + } if (state.fmt == NULL) { const char *l = "%["; @@ -483,7 +488,10 @@ int qlist_main(int argc, char **argv) state.buf = xmalloc(state.buflen); state.atoms = xcalloc(argc - optind, sizeof(*state.atoms)); ret = 1; - vdb = tree_open_vdb(portroot, portvdb); + if (do_binpkgs) + vdb = tree_open
[gentoo-commits] proj/portage-utils:master commit in: man/
commit: bb0b64a8cb99cd5329ffdc1ee0c66c2cbf26af99 Author: Fabian Groffen gentoo org> AuthorDate: Sun Nov 17 15:03:11 2019 + Commit: Fabian Groffen gentoo org> CommitDate: Sun Nov 17 15:03:11 2019 + URL:https://gitweb.gentoo.org/proj/portage-utils.git/commit/?id=bb0b64a8 man: regen Signed-off-by: Fabian Groffen gentoo.org> man/qatom.1 | 2 +- man/qcheck.1| 2 +- man/qdepends.1 | 2 +- man/qfile.1 | 2 +- man/qgrep.1 | 2 +- man/qkeyword.1 | 2 +- man/qlist.1 | 11 ++- man/qlop.1 | 2 +- man/qmanifest.1 | 2 +- man/qmerge.1| 2 +- man/qpkg.1 | 2 +- man/qsearch.1 | 2 +- man/qsize.1 | 2 +- man/qtbz2.1 | 2 +- man/qtegrity.1 | 2 +- man/quse.1 | 2 +- man/qxpak.1 | 2 +- 17 files changed, 22 insertions(+), 21 deletions(-) diff --git a/man/qatom.1 b/man/qatom.1 index ab6cfb3..6254912 100644 --- a/man/qatom.1 +++ b/man/qatom.1 @@ -1,5 +1,5 @@ .\" generated by mkman.py, please do NOT edit! -.TH qatom "1" "Jul 2019" "Gentoo Foundation" "qatom" +.TH qatom "1" "Nov 2019" "Gentoo Foundation" "qatom" .SH NAME qatom \- split atom strings .SH SYNOPSIS diff --git a/man/qcheck.1 b/man/qcheck.1 index fce6b42..a48c7f3 100644 --- a/man/qcheck.1 +++ b/man/qcheck.1 @@ -1,5 +1,5 @@ .\" generated by mkman.py, please do NOT edit! -.TH qcheck "1" "Jul 2019" "Gentoo Foundation" "qcheck" +.TH qcheck "1" "Nov 2019" "Gentoo Foundation" "qcheck" .SH NAME qcheck \- verify integrity of installed packages .SH SYNOPSIS diff --git a/man/qdepends.1 b/man/qdepends.1 index 8b0ad69..e8d1648 100644 --- a/man/qdepends.1 +++ b/man/qdepends.1 @@ -1,5 +1,5 @@ .\" generated by mkman.py, please do NOT edit! -.TH qdepends "1" "Jul 2019" "Gentoo Foundation" "qdepends" +.TH qdepends "1" "Nov 2019" "Gentoo Foundation" "qdepends" .SH NAME qdepends \- show dependency info .SH SYNOPSIS diff --git a/man/qfile.1 b/man/qfile.1 index 083641e..7501311 100644 --- a/man/qfile.1 +++ b/man/qfile.1 @@ -1,5 +1,5 @@ .\" generated by mkman.py, please do NOT edit! -.TH qfile "1" "Sep 2019" "Gentoo Foundation" "qfile" +.TH qfile "1" "Nov 2019" "Gentoo Foundation" "qfile" .SH NAME qfile \- list all pkgs owning files .SH SYNOPSIS diff --git a/man/qgrep.1 b/man/qgrep.1 index f3a5c2d..e414ba4 100644 --- a/man/qgrep.1 +++ b/man/qgrep.1 @@ -1,5 +1,5 @@ .\" generated by mkman.py, please do NOT edit! -.TH qgrep "1" "Jul 2019" "Gentoo Foundation" "qgrep" +.TH qgrep "1" "Nov 2019" "Gentoo Foundation" "qgrep" .SH NAME qgrep \- grep in ebuilds .SH SYNOPSIS diff --git a/man/qkeyword.1 b/man/qkeyword.1 index a191d72..c43fa61 100644 --- a/man/qkeyword.1 +++ b/man/qkeyword.1 @@ -1,5 +1,5 @@ .\" generated by mkman.py, please do NOT edit! -.TH qkeyword "1" "Jul 2019" "Gentoo Foundation" "qkeyword" +.TH qkeyword "1" "Nov 2019" "Gentoo Foundation" "qkeyword" .SH NAME qkeyword \- list packages based on keywords .SH SYNOPSIS diff --git a/man/qlist.1 b/man/qlist.1 index 2fd9575..676ee96 100644 --- a/man/qlist.1 +++ b/man/qlist.1 @@ -1,5 +1,5 @@ .\" generated by mkman.py, please do NOT edit! -.TH qlist "1" "Jul 2019" "Gentoo Foundation" "qlist" +.TH qlist "1" "Nov 2019" "Gentoo Foundation" "qlist" .SH NAME qlist \- list files owned by pkgname .SH SYNOPSIS @@ -11,13 +11,17 @@ package. Alternatively, lists whether a package is installed, optionally with version, USE-flag, SLOT or REPO information. The \fIpkgname\fR to query for does not have to be an exact match, it may be part of it, e.g.\ an entire category, or any package with some string in -its name. +its name. When no packages are given to match, \fIqlist\fR lists all +installed packages. .SH OPTIONS .TP \fB\-I\fR, \fB\-\-installed\fR Instead of listing the contents of a package, just print the package name if the package is currently installed. .TP +\fB\-k\fR, \fB\-\-binpkgs\fR +Operate on binary packages instead of installed packges. +.TP \fB\-S\fR, \fB\-\-slots\fR Display installed packages with slots (use twice for subslots). .TP @@ -40,9 +44,6 @@ Show /usr/lib/debug and /usr/src/debug files. \fB\-e\fR, \fB\-\-exact\fR Exact match (only CAT/PN or PN without PV). .TP -\fB\-a\fR, \fB\-\-all\fR -Show every installed package. -.TP \fB\-d\fR, \fB\-\-dir\fR Only show directories. .TP diff --git a/man/qlop.1 b/man/qlop.1 index 58efd09..1b63edd 100644 --- a/man/qlop.1 +++ b/man/qlop.1 @@ -1,5 +1,5 @@ .\" generated by mkman.py, please do NOT edit! -.TH qlop "1" "Oct 2019" "Gentoo Foundation" "qlop" +.TH qlop "1" "Nov 2019" "Gentoo Foundation" "qlop" .SH NAME qlop \- emerge log analyzer .SH SYNOPSIS diff --git a/man/qmanifest.1 b/man/qmanifest.1 index 5d00bd3..6f6ab04 100644 --- a/man/qmanifest.1 +++ b/man/qmanifest.1 @@ -1,5 +1,5 @@ .\" generated by mkman.py, please do NOT edit! -.TH qmanifest "1" "Jul 2019" "Gentoo Foundation" "qmanifest" +.TH qmanifest "1" "Nov 2019" "Gentoo Foundation" "qmanifest" .SH NAME qmanifest \- verify or generate thick Manifest files .SH
[gentoo-commits] proj/portage-utils:master commit in: /, man/
commit: 57e49de5c210c8def6f4957a6f94a62c60f98e52 Author: Fabian Groffen gentoo org> AuthorDate: Sat Nov 9 10:11:04 2019 + Commit: Fabian Groffen gentoo org> CommitDate: Sat Nov 9 10:11:04 2019 + URL:https://gitweb.gentoo.org/proj/portage-utils.git/commit/?id=57e49de5 q: add option to print envvars, much like portageq envvar Option -e to q will dump the env variables used by portage-utils. Signed-off-by: Fabian Groffen gentoo.org> main.c | 86 +++-- main.h | 23 +++--- man/q.1 | 7 -- q.c | 59 +++- 4 files changed, 118 insertions(+), 57 deletions(-) diff --git a/main.c b/main.c index 0b827fc..f8ba7af 100644 --- a/main.c +++ b/main.c @@ -393,19 +393,6 @@ strincr_var(const char *name, const char *s, char **value, size_t *value_len) /* we should sort here */ } -typedef enum { _Q_BOOL, _Q_STR, _Q_ISTR } var_types; -typedef struct { - const char *name; - const size_t name_len; - const var_types type; - union { - char **s; - bool *b; - } value; - size_t value_len; - const char *default_value; -} env_vars; - static env_vars * get_portage_env_var(env_vars *vars, const char *name) { @@ -619,49 +606,48 @@ read_portage_profile(const char *configroot, const char *profile, env_vars vars[ free(profile_file); } -static void -initialize_portage_env(void) -{ - size_t i; - const char *s; - - bool nocolor = 0; - - env_vars *var; - env_vars vars_to_read[] = { +static bool nocolor = 0; +env_vars vars_to_read[] = { #define _Q_EV(t, V, set, lset, d) \ - { \ - .name = #V, \ - .name_len = strlen(#V), \ - .type = _Q_##t, \ - set, \ - lset, \ - .default_value = d, \ - }, +{ \ + .name = #V, \ + .name_len = strlen(#V), \ + .type = _Q_##t, \ + set, \ + lset, \ + .default_value = d, \ +}, #define _Q_EVS(t, V, v, d) _Q_EV(t, V, .value.s = &v, .value_len = strlen(d), d) #define _Q_EVB(t, V, v, d) _Q_EV(t, V, .value.b = &v, .value_len = 0, d) - _Q_EVS(STR, ROOT,portroot,"/") - _Q_EVS(STR, ACCEPT_LICENSE, accept_license, "") - _Q_EVS(ISTR, INSTALL_MASK,install_mask,"") - _Q_EVS(ISTR, PKG_INSTALL_MASK,pkg_install_mask,"") - _Q_EVS(STR, ARCH,portarch,"") - _Q_EVS(ISTR, CONFIG_PROTECT, config_protect, "/etc") - _Q_EVS(ISTR, CONFIG_PROTECT_MASK, config_protect_mask, "") - _Q_EVB(BOOL, NOCOLOR, nocolor, 0) - _Q_EVS(ISTR, FEATURES,features,"") - _Q_EVS(STR, EPREFIX, eprefix, CONFIG_EPREFIX) - _Q_EVS(STR, EMERGE_LOG_DIR, portlogdir, CONFIG_EPREFIX "var/log") - _Q_EVS(STR, PORTDIR, main_overlay, CONFIG_EPREFIX "var/db/repos/gentoo") - _Q_EVS(STR, PORTAGE_BINHOST, binhost, DEFAULT_PORTAGE_BINHOST) - _Q_EVS(STR, PORTAGE_TMPDIR, port_tmpdir, CONFIG_EPREFIX "var/tmp/portage/") - _Q_EVS(STR, PKGDIR, pkgdir, CONFIG_EPREFIX "var/cache/binpkgs/") - _Q_EVS(STR, Q_VDB, portvdb, CONFIG_EPREFIX "var/db/pkg") - _Q_EVS(STR, Q_EDB, portedb, CONFIG_EPREFIX "var/cache/edb") - { NULL, 0, _Q_BOOL, { NULL }, 0, NULL, } + _Q_EVS(STR, ROOT,portroot,"/") + _Q_EVS(STR, ACCEPT_LICENSE, accept_license, "") + _Q_EVS(ISTR, INSTALL_MASK,install_mask,"") + _Q_EVS(ISTR, PKG_INSTALL_MASK,pkg_install_mask,"") + _Q_EVS(STR, ARCH,portarch,"") + _Q_EVS(ISTR, CONFIG_PROTECT, config_protect, "/etc") + _Q_EVS(ISTR, CONFIG_PROTECT_MASK, config_protect_mask, "") + _Q_EVB(BOOL, NOCOLOR, nocolor, 0) + _Q_EVS(ISTR, FEATURES,features,"") + _Q_EVS(STR, EPREFIX, eprefix, CONFIG_EPREFIX) + _Q_EVS(STR, EMERGE_LOG_DIR, portlogdir, CONFIG_EPREFIX "var/log") + _Q_EVS(STR, PORTDIR, main_overlay,CONFIG_EPREFIX "var/db/repos/gentoo") + _Q_EVS(STR, PORTAGE_BINHOST, binhost, DEFAULT_PORTAGE_BINHOST) + _Q_EVS(STR, PORTAGE_TMPDIR, port_tmpdir, CONFIG_EPREFIX "var/tmp/portage/") + _Q_EVS(STR, PKGDIR, pkgdir, CONFIG_EPREFIX "var/cache/binpkgs/") + _Q_E
[gentoo-commits] proj/portage-utils:master commit in: /, man/
commit: c9d7b9de78f1488827cb516bf61a54df28a750ab Author: Fabian Groffen gentoo org> AuthorDate: Sun Oct 27 12:19:06 2019 + Commit: Fabian Groffen gentoo org> CommitDate: Sun Oct 27 12:19:06 2019 + URL:https://gitweb.gentoo.org/proj/portage-utils.git/commit/?id=c9d7b9de qlop: take two at implementing currently running merges Probe /proc filesystem for running merges, and use the atoms found there to select the packages to list. In addition, prune any operations that started > 10 days ago so there will be some sort of convergence. Bug: https://bugs.gentoo.org/698196 Signed-off-by: Fabian Groffen gentoo.org> main.c | 3 +- man/qlop.1 | 4 +- qlop.c | 175 ++--- 3 files changed, 173 insertions(+), 9 deletions(-) diff --git a/main.c b/main.c index 5d4c4cd..0b827fc 100644 --- a/main.c +++ b/main.c @@ -501,7 +501,8 @@ read_portage_env_file(const char *configroot, const char *file, env_vars vars[]) source_len = strlen(sfile); if (buflen <= source_len + file_path_len) - buf = xrealloc(buf, buflen = source_len + file_path_len + 1); + buf = xrealloc(buf, + buflen = source_len + file_path_len + 1); memmove(buf + file_path_len, buf + 7, source_len + 1); memcpy(buf, file, file_path_len); sfile = buf; diff --git a/man/qlop.1 b/man/qlop.1 index de1e525..58efd09 100644 --- a/man/qlop.1 +++ b/man/qlop.1 @@ -1,5 +1,5 @@ .\" generated by mkman.py, please do NOT edit! -.TH qlop "1" "Sep 2019" "Gentoo Foundation" "qlop" +.TH qlop "1" "Oct 2019" "Gentoo Foundation" "qlop" .SH NAME qlop \- emerge log analyzer .SH SYNOPSIS @@ -51,7 +51,7 @@ Print elapssed time in human readable format. This form uses minutes, hours and days instead of just seconds. .TP \fB\-M\fR, \fB\-\-machine\fR -Print elapsed time as seconds with no formatting. +Print start/elapsed time as seconds with no formatting. .TP \fB\-m\fR, \fB\-\-merge\fR Show merge history. diff --git a/qlop.c b/qlop.c index 7a93656..6cb2c04 100644 --- a/qlop.c +++ b/qlop.c @@ -16,9 +16,11 @@ #include #include #include +#include #include "atom.h" #include "eat_file.h" +#include "scandirat.h" #include "set.h" #include "xarray.h" #include "xasprintf.h" @@ -51,7 +53,7 @@ static const char * const qlop_opts_help[] = { "Print time taken to complete action", "Print average time taken to complete action", "Print elapsed time in human readable format (use with -t or -a)", - "Print elapsed time as seconds with no formatting", + "Print start/elapsed time as seconds with no formatting", "Show merge history", "Show unmerge history", "Show autoclean unmerge history", @@ -201,10 +203,15 @@ parse_date(const char *sdate, time_t *t) static char _date_buf[48]; static char *fmt_date(struct qlop_mode *flags, time_t ts, time_t te) { - time_t t; + time_t t = flags->do_endtime ? te : ts; + + if (flags->do_machine) + snprintf(_date_buf, sizeof(_date_buf), + "%zd", (size_t)t); + else + strftime(_date_buf, sizeof(_date_buf), + "%Y-%m-%dT%H:%M:%S", localtime(&t)); - t = flags->do_endtime ? te : ts; - strftime(_date_buf, sizeof(_date_buf), "%Y-%m-%dT%H:%M:%S", localtime(&t)); return _date_buf; } @@ -336,6 +343,21 @@ New format: 1550953125: >>> unmerge success: app-admin/pwgen-2.08 1550953125: *** exiting successfully. 1550953125: *** terminating. + + +Currently running merges can be found in the /proc filesystem: +- Linux: readlink(/proc//fd/X) +- Solaris: readlink(/proc//path/X) +from here a file should be there that points to the build.log file +$CAT/$P/work/build.log. If so, it's running for $CAT/$P. +This requires being the portage user though, or root. + +Should there be no /proc, we can deduce from the log whether a package +is being emerged, if and only if, there are no parallel merges, and +portage never got interrupted in a way where it could not write its +interruption to the log. Unfortunately these scenarios happen a lot. +As such, we can try to remedy this somewhat by using a rule of thumb +that currently merging packages need to be withinin the last 10 days. */ static int do_emerge_log( const char *log, @@ -463,6 +485,7 @@ static int do_emerge_log( tbegin = last_merge; tend = tstart; } + /* loop over lines searching for atoms */ while (fgets(buf, sizeof(buf), fp) != NULL) { if ((p = strchr(buf, ':')) == NULL) @@ -821,11 +844,19 @@ static int do_emerge_log( } fclose(f
[gentoo-commits] proj/portage-utils:master commit in: man/
commit: ab19f86cb43061a7efa42ec2c3058abf69d72851 Author: Fabian Groffen gentoo org> AuthorDate: Sun Sep 29 12:18:00 2019 + Commit: Fabian Groffen gentoo org> CommitDate: Sun Sep 29 12:18:00 2019 + URL:https://gitweb.gentoo.org/proj/portage-utils.git/commit/?id=ab19f86c man: update qfile page for new -P option Signed-off-by: Fabian Groffen gentoo.org> man/qfile.1 | 5 - 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/man/qfile.1 b/man/qfile.1 index 33dfbee..083641e 100644 --- a/man/qfile.1 +++ b/man/qfile.1 @@ -1,5 +1,5 @@ .\" generated by mkman.py, please do NOT edit! -.TH qfile "1" "Jul 2019" "Gentoo Foundation" "qfile" +.TH qfile "1" "Sep 2019" "Gentoo Foundation" "qfile" .SH NAME qfile \- list all pkgs owning files .SH SYNOPSIS @@ -55,6 +55,9 @@ List orphan files. \fB\-x\fR \fI\fR, \fB\-\-exclude\fR \fI\fR Don't look in package (used with --orphans). .TP +\fB\-P\fR, \fB\-\-skip\-plibreg\fR +Don't look in the prunelib registry. +.TP \fB\-\-root\fR \fI\fR Set the ROOT env var. .TP
[gentoo-commits] proj/portage-utils:master commit in: /, man/
commit: ea7f00529fa689a6624f6b26b5d3b7197f4fbfd5 Author: Fabian Groffen gentoo org> AuthorDate: Sat Sep 28 13:18:31 2019 + Commit: Fabian Groffen gentoo org> CommitDate: Sat Sep 28 13:18:31 2019 + URL:https://gitweb.gentoo.org/proj/portage-utils.git/commit/?id=ea7f0052 qpkg: don't emit hypothetical messages when real work has been done drop the "would be" part of how many bytes were freed when we're not pretending Bug: https://bugs.gentoo.org/695586 Signed-off-by: Fabian Groffen gentoo.org> applets.h | 2 +- man/qpkg.1 | 4 ++-- qpkg.c | 8 +--- 3 files changed, 8 insertions(+), 6 deletions(-) diff --git a/applets.h b/applets.h index 520ff23..364f457 100644 --- a/applets.h +++ b/applets.h @@ -82,7 +82,7 @@ static const struct applet_t { {"qmanifest", qmanifest_main, "", "verify or generate thick Manifest files"}, #endif {"qmerge",qmerge_main,"", "fetch and merge binary package"}, - {"qpkg", qpkg_main, "", "manipulate Gentoo binpkgs"}, + {"qpkg", qpkg_main, "", "create or manipulate Gentoo binpkgs"}, {"qsearch", qsearch_main, "", "search pkgname/desc"}, {"qsize", qsize_main, "", "calculate size usage"}, {"qtbz2", qtbz2_main, "", "manipulate tbz2 packages"}, diff --git a/man/qpkg.1 b/man/qpkg.1 index c471ea1..161a8bb 100644 --- a/man/qpkg.1 +++ b/man/qpkg.1 @@ -1,7 +1,7 @@ .\" generated by mkman.py, please do NOT edit! -.TH qpkg "1" "Jul 2019" "Gentoo Foundation" "qpkg" +.TH qpkg "1" "Sep 2019" "Gentoo Foundation" "qpkg" .SH NAME -qpkg \- manipulate Gentoo binpkgs +qpkg \- create or manipulate Gentoo binpkgs .SH SYNOPSIS .B qpkg \fI[opts] \fR diff --git a/qpkg.c b/qpkg.c index 0ac6e92..947ff84 100644 --- a/qpkg.c +++ b/qpkg.c @@ -171,8 +171,9 @@ qpkg_clean(char *dirp) disp_units = KILOBYTE; if ((num_all_bytes / KILOBYTE) > 1000) disp_units = MEGABYTE; - qprintf(" %s*%s Total space that would be freed in packages " - "directory: %s%s %ciB%s\n", GREEN, NORM, RED, + qprintf(" %s*%s Total space %sfreed in packages " + "directory: %s%s %ciB%s\n", GREEN, NORM, + pretend ? "that would be " : "", RED, make_human_readable_str(num_all_bytes, 1, disp_units), disp_units == MEGABYTE ? 'M' : 'K', NORM); @@ -297,10 +298,11 @@ qpkg_make(depend_atom *atom) xpak_create(AT_FDCWD, tbz2, 1, xpak_argv, 1, verbose); stat(tbz2, &st); + xpaksize = st.st_size - xpaksize; /* save tbz2 tail: STOP */ fp = fopen(tbz2, "a"); - WRITE_BE_INT32(buf, st.st_size - xpaksize); + WRITE_BE_INT32(buf, xpaksize); fwrite(buf, 1, 4, fp); fwrite("STOP", 1, 4, fp); fclose(fp);
[gentoo-commits] proj/portage-utils:master commit in: /, man/
commit: 3dc607a8a6cfd3bafbc2f10d9a7c3aae90c3a757 Author: Fabian Groffen gentoo org> AuthorDate: Tue Sep 10 18:21:51 2019 + Commit: Fabian Groffen gentoo org> CommitDate: Tue Sep 10 18:21:51 2019 + URL:https://gitweb.gentoo.org/proj/portage-utils.git/commit/?id=3dc607a8 qlop: add mode to print last run in a similar way like emerge(1) does For example, the output could be like this, showing upgrade information: % ./qlop -E -t U app-shells/bash-5.0_p11 [5.0_p9-r0]: 2′38″ U app-admin/eselect-1.4.15 [1.4.14-r0]: 19s U sys-libs/talloc-2.3.0 [2.2.0-r0]: 1′56″ U app-portage/prefix-toolkit-5 [4-r0]: 10s U dev-python/cryptography-2.7 [2.6.1-r0]: 1′59″ U net-dns/bind-tools-9.14.5 [9.14.4-r0]: 4′17″ R dev-python/sphinxcontrib-applehelp-1.0.1: 28s R dev-python/sphinxcontrib-devhelp-1.0.1: 27s R dev-python/sphinxcontrib-jsmath-1.0.1: 25s R dev-python/sphinxcontrib-htmlhelp-1.0.2: 28s R dev-python/sphinxcontrib-serializinghtml-1.1.3: 28s R dev-python/sphinxcontrib-qthelp-1.0.2: 28s U dev-python/sphinx-2.0.1 [1.7.5-r1]: 1′13″ U net-mail/notmuch-0.29.1-r1 [0.28.4-r0]: 1′00″ Signed-off-by: Fabian Groffen gentoo.org> man/qlop.1 | 5 - qlop.c | 49 - 2 files changed, 52 insertions(+), 2 deletions(-) diff --git a/man/qlop.1 b/man/qlop.1 index baa5bf5..de1e525 100644 --- a/man/qlop.1 +++ b/man/qlop.1 @@ -1,5 +1,5 @@ .\" generated by mkman.py, please do NOT edit! -.TH qlop "1" "Jul 2019" "Gentoo Foundation" "qlop" +.TH qlop "1" "Sep 2019" "Gentoo Foundation" "qlop" .SH NAME qlop \- emerge log analyzer .SH SYNOPSIS @@ -65,6 +65,9 @@ Show autoclean unmerge history. \fB\-s\fR, \fB\-\-sync\fR Show sync history. .TP +\fB\-E\fR, \fB\-\-emerge\fR +Show last merge like how emerge(1) -v would show it. +.TP \fB\-e\fR, \fB\-\-endtime\fR Report time at which the operation finished (iso started). .TP diff --git a/qlop.c b/qlop.c index 243c8b6..3cc3367 100644 --- a/qlop.c +++ b/qlop.c @@ -24,7 +24,7 @@ #define QLOP_DEFAULT_LOGFILE "emerge.log" -#define QLOP_FLAGS "ctaHMmuUslerd:f:w:F:" COMMON_FLAGS +#define QLOP_FLAGS "ctaHMmuUsElerd:f:w:F:" COMMON_FLAGS static struct option const qlop_long_opts[] = { {"summary", no_argument, NULL, 'c'}, {"time", no_argument, NULL, 't'}, @@ -35,6 +35,7 @@ static struct option const qlop_long_opts[] = { {"unmerge", no_argument, NULL, 'u'}, {"autoclean", no_argument, NULL, 'U'}, {"sync", no_argument, NULL, 's'}, + {"emerge",no_argument, NULL, 'E'}, {"endtime", no_argument, NULL, 'e'}, {"running", no_argument, NULL, 'r'}, {"date", a_argument, NULL, 'd'}, @@ -54,6 +55,7 @@ static const char * const qlop_opts_help[] = { "Show unmerge history", "Show autoclean unmerge history", "Show sync history", + "Show last merge like how emerge(1) -v would show it", "Report time at which the operation finished (iso started)", "Show current emerging packages", "Limit selection to this time (1st -d is start, 2nd -d is end)", @@ -85,6 +87,7 @@ struct qlop_mode { char do_machine:1; char do_endtime:1; char show_lastmerge:1; + char show_emerge:1; const char *fmt; }; @@ -334,6 +337,7 @@ static int do_emerge_log( time_t elapsed; depend_atom *atom; depend_atom *atomw; + depend_atom *upgrade_atom = NULL; DECLARE_ARRAY(merge_matches); DECLARE_ARRAY(merge_averages); DECLARE_ARRAY(unmerge_matches); @@ -638,6 +642,34 @@ static int do_emerge_log( flags->do_time ? ": " : "", flags->do_time ? fmt_elapsedtime(flags, elapsed) : ""); + } else if (flags->show_emerge) { + int state = NOT_EQUAL; + if (upgrade_atom != NULL) + state = atom_compare(pkgw->atom, upgrade_atom); + switch (state) { + /* "NRUD " */ + case EQUAL: + printf(" %sR%s ", YELLOW, NORM); + break; + case NOT_EQUAL: + printf("%sN%s ", GREEN, NORM); + break; + case NEWER: +
[gentoo-commits] proj/portage-utils:master commit in: man/, man/include/
commit: 4b27faa3832c62110573d4fa587a117047bf139c Author: Fabian Groffen gentoo org> AuthorDate: Thu Jul 18 18:38:46 2019 + Commit: Fabian Groffen gentoo org> CommitDate: Thu Jul 18 18:38:46 2019 + URL:https://gitweb.gentoo.org/proj/portage-utils.git/commit/?id=4b27faa3 man/qlop: q -> g g is now best matched by t, q was never doing anything in particular Signed-off-by: Fabian Groffen gentoo.org> man/include/qlop.desc | 2 +- man/qlop.1| 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/man/include/qlop.desc b/man/include/qlop.desc index 3505173..e39f689 100644 --- a/man/include/qlop.desc +++ b/man/include/qlop.desc @@ -21,6 +21,6 @@ After version \fB0.74\fR of portage-utils, \fIqlop\fR was changed considerably to be more consistent and more advanced. Most notably, this has changed default date output and commmand line flags. Instead of reporting the time the operation finished, \fIqlop\fR now reports the -time the operation started. The behaviour of the old \fB-q\fR flag is +time the operation started. The behaviour of the old \fB-g\fR flag is best matched by the new \fB-t\fR flag. Similar, the old \fB-t\fR flag is matched by the new \fB-a\fR flag. diff --git a/man/qlop.1 b/man/qlop.1 index 909ebdc..baa5bf5 100644 --- a/man/qlop.1 +++ b/man/qlop.1 @@ -29,7 +29,7 @@ After version \fB0.74\fR of portage-utils, \fIqlop\fR was changed considerably to be more consistent and more advanced. Most notably, this has changed default date output and commmand line flags. Instead of reporting the time the operation finished, \fIqlop\fR now reports the -time the operation started. The behaviour of the old \fB-q\fR flag is +time the operation started. The behaviour of the old \fB-g\fR flag is best matched by the new \fB-t\fR flag. Similar, the old \fB-t\fR flag is matched by the new \fB-a\fR flag. .SH OPTIONS
[gentoo-commits] proj/portage-utils:master commit in: man/, /, man/include/
commit: 94ca500baf225994b88f750262c0895553c70a8a Author: Fabian Groffen gentoo org> AuthorDate: Thu Jul 18 18:34:19 2019 + Commit: Fabian Groffen gentoo org> CommitDate: Thu Jul 18 18:34:19 2019 + URL:https://gitweb.gentoo.org/proj/portage-utils.git/commit/?id=94ca500b qlop: enhance running time indicator Fix elapsed time mode (-t) when using -r displaying the elapsed time also as the ETA. When using -v, display what ETA is being used (average or longest run). Also, better document which flags can be combined with -r. Signed-off-by: Fabian Groffen gentoo.org> man/include/qlop.optdesc.yaml | 7 +-- man/qlop.1| 7 +-- qlop.c| 47 +-- 3 files changed, 37 insertions(+), 24 deletions(-) diff --git a/man/include/qlop.optdesc.yaml b/man/include/qlop.optdesc.yaml index 19f56db..463a19d 100644 --- a/man/include/qlop.optdesc.yaml +++ b/man/include/qlop.optdesc.yaml @@ -50,5 +50,8 @@ running: | Print operations currently in progress. An ETA is calculated based on the average for the operation. If the elapsed exceeds the average, the ETA is calculated against the longest time observed for -the operation. If the elapsed time exceeds this too, or no previous -occurrences for the operation exist, \fIunknown\fR is printed. +the operation. The \fB-v\fR flag will display which mode is +currently used. If the elapsed time also exceeds the longest time +observed, or no previous occurrences for the operation exist, +\fIunknown\fR is printed. When combined with \fB-t\fR the +elapsed time is also displayed. diff --git a/man/qlop.1 b/man/qlop.1 index 10eaa27..909ebdc 100644 --- a/man/qlop.1 +++ b/man/qlop.1 @@ -72,8 +72,11 @@ Report time at which the operation finished (iso started). Print operations currently in progress. An ETA is calculated based on the average for the operation. If the elapsed exceeds the average, the ETA is calculated against the longest time observed for -the operation. If the elapsed time exceeds this too, or no previous -occurrences for the operation exist, \fIunknown\fR is printed. +the operation. The \fB-v\fR flag will display which mode is +currently used. If the elapsed time also exceeds the longest time +observed, or no previous occurrences for the operation exist, +\fIunknown\fR is printed. When combined with \fB-t\fR the +elapsed time is also displayed. .TP \fB\-d\fR \fI\fR, \fB\-\-date\fR \fI\fR Limit the selection of packages to the date given, or to the range diff --git a/qlop.c b/qlop.c index e20c97b..fce0f69 100644 --- a/qlop.c +++ b/qlop.c @@ -773,14 +773,17 @@ static int do_emerge_log( array_for_each(merge_matches, i, pkgw) { size_t j; time_t maxtime = 0; + bool isMax = false; elapsed = tstart - pkgw->tbegin; pkg = NULL; array_for_each(merge_averages, j, pkg) { if (atom_compare(pkg->atom, pkgw->atom) == EQUAL) { maxtime = pkg->time / pkg->cnt; - if (elapsed >= maxtime) + if (elapsed >= maxtime) { maxtime = elapsed >= pkg->tbegin ? 0 : pkg->tbegin; + isMax = true; + } break; } pkg = NULL; @@ -797,52 +800,56 @@ static int do_emerge_log( } if (flags->do_time) { - printf("%s >>> %s: %s...%s ETA: %s\n", + printf("%s >>> %s: %s", fmt_date(flags, pkgw->tbegin, 0), atom_format(flags->fmt, pkgw->atom), - fmt_elapsedtime(flags, elapsed), - p == NULL ? "" : p, - maxtime == 0 ? "unknown" : - fmt_elapsedtime(flags, maxtime - elapsed)); + fmt_elapsedtime(flags, elapsed)); } else { - printf("%s >>> %s...%s ETA: %s\n", + printf("%s >>> %s", fmt_date(flags, pkgw->tbegin, 0), - atom_format(flags->fmt, pkgw->atom), - p == NULL ? "" : p, - maxtime == 0 ? "unknown" : -
[gentoo-commits] proj/portage-utils:master commit in: man/, /
commit: bc9b220f15d357ea2b729311a3f9da563d978438 Author: Fabian Groffen gentoo org> AuthorDate: Sun Jul 14 18:43:49 2019 + Commit: Fabian Groffen gentoo org> CommitDate: Sun Jul 14 18:43:49 2019 + URL:https://gitweb.gentoo.org/proj/portage-utils.git/commit/?id=bc9b220f qlist: add -F argument Signed-off-by: Fabian Groffen gentoo.org> man/qlist.1 | 3 ++ qlist.c | 116 ++-- 2 files changed, 68 insertions(+), 51 deletions(-) diff --git a/man/qlist.1 b/man/qlist.1 index 8f9cf56..2fd9575 100644 --- a/man/qlist.1 +++ b/man/qlist.1 @@ -52,6 +52,9 @@ Only show objects. \fB\-s\fR, \fB\-\-sym\fR Only show symlinks. .TP +\fB\-F\fR \fI\fR, \fB\-\-format\fR \fI\fR +Print matched atom using given format string. +.TP \fB\-\-root\fR \fI\fR Set the ROOT env var. .TP diff --git a/qlist.c b/qlist.c index ab3fb4f..e0a8a07 100644 --- a/qlist.c +++ b/qlist.c @@ -21,7 +21,7 @@ #include "tree.h" #include "xregex.h" -#define QLIST_FLAGS "ISRUcDeados" COMMON_FLAGS +#define QLIST_FLAGS "ISRUcDeadosF:" COMMON_FLAGS static struct option const qlist_long_opts[] = { {"installed", no_argument, NULL, 'I'}, {"slots", no_argument, NULL, 'S'}, @@ -35,10 +35,11 @@ static struct option const qlist_long_opts[] = { {"obj", no_argument, NULL, 'o'}, {"sym", no_argument, NULL, 's'}, /* {"file", a_argument, NULL, 'f'}, */ + {"format", a_argument, NULL, 'F'}, COMMON_LONG_OPTS }; static const char * const qlist_opts_help[] = { - "Just show installed packages", + "Just show installed package names", "Display installed packages with slots (use twice for subslots)", "Display installed packages with repository", "Display installed packages with flags used", @@ -50,6 +51,7 @@ static const char * const qlist_opts_help[] = { "Only show objects", "Only show symlinks", /* "query filename for pkgname", */ + "Print matched atom using given format string", COMMON_OPTS_HELP }; #define qlist_usage(ret) usage(ret, QLIST_FLAGS, qlist_long_opts, qlist_opts_help, NULL, lookup_applet_idx("qlist")) @@ -311,19 +313,18 @@ struct qlist_opt_state { int argc; char **argv; depend_atom **atoms; - bool exact; - bool all; - bool just_pkgname; - bool show_dir; - bool show_obj; - bool show_repo; - bool show_sym; - int show_slots; - bool show_umap; - bool show_dbg; - bool columns; + bool exact:1; + bool all:1; + bool just_pkgname:1; + bool show_dir:1; + bool show_obj:1; + bool show_sym:1; + bool need_full_atom:1; + bool show_umap:1; + bool show_dbg:1; char *buf; size_t buflen; + const char *fmt; }; static int @@ -342,29 +343,11 @@ qlist_cb(tree_pkg_ctx *pkg_ctx, void *priv) if ((i == state->argc) && (state->argc != optind)) return 0; - atom = tree_get_atom(pkg_ctx, false); + atom = tree_get_atom(pkg_ctx, state->need_full_atom); if (state->just_pkgname) { if ((state->all + state->just_pkgname) < 2) { - char qfmt[128]; - atom = tree_get_atom(pkg_ctx, - state->show_slots || state->show_repo); - if (state->columns) { - snprintf(qfmt, sizeof(qfmt), - "%%{CATEGORY} %%{PN}%s%s%s%s", - verbose ? " %{PVR}" : "", - state->show_slots >= 1 ? " %{SLOT}" : "", - state->show_slots >= 2 ? " %{SUBSLOT}" : "", - state->show_repo ? " %{REPO}" : ""); - } else { - snprintf(qfmt, sizeof(qfmt), - "%%[CATEGORY]%%[P%c]%s%s%s", - verbose ? 'F' : 'N', - state->show_slots >= 1 ? "%[SLOT]" : "", - state->show_slots >= 2 ? "%[SUBSLOT]" : "", - state->show_repo ? "%[REPO]" : ""); - } printf("%s%s\n", - atom_format(qfmt, atom), + atom_format(state->fmt, atom), umapstr(state->show_umap, pkg_ctx)); } @@ -374,7 +357,7 @@ qlist_cb(tree_pkg_ctx *pkg_ctx, void *priv) if (verbose) printf("%s %sCONTENTS%s:\n", - atom_format("%[CATEGORY]%[PF]", atom), DKBLUE,
[gentoo-commits] proj/portage-utils:master commit in: man/, man/include/, /
commit: 26b9374ee23d16b3957b6ebc0cd80f53b22a4d16 Author: Fabian Groffen gentoo org> AuthorDate: Sun Jul 14 13:30:06 2019 + Commit: Fabian Groffen gentoo org> CommitDate: Sun Jul 14 13:30:06 2019 + URL:https://gitweb.gentoo.org/proj/portage-utils.git/commit/?id=26b9374e quse: add -F argument, move some -v functionality to -D -v now controls default atom formatting, as with other applets, the ability to list USE-flags, their state and description per package now is enabled by the -D (describe) flag, which incidentally also makes more sense. Signed-off-by: Fabian Groffen gentoo.org> man/include/quse.optdesc.yaml | 11 +++--- man/quse.1| 14 --- quse.c| 85 --- 3 files changed, 62 insertions(+), 48 deletions(-) diff --git a/man/include/quse.optdesc.yaml b/man/include/quse.optdesc.yaml index 693aade..71fcd2d 100644 --- a/man/include/quse.optdesc.yaml +++ b/man/include/quse.optdesc.yaml @@ -1,10 +1,11 @@ exact: Search for exact string, e.g.\ do not use regular expression matching. verbose: | -Show descriptions for USE-flags for packages that match the search. +Show versions for packages that match the search. Also shows problems encountered during parsing. These are mostly diagnostic and indicate possible incorrectness in the results. quiet: Ignored for compatibility with other qapplets. -installed: | -Only search installed packages. Together with \fB-v\fR this shows -USE-flags and their descriptions, and currently enabled flags -prefixed with an asterisk (\fI*\fR). +describe: | +Describe the USE flag, when no USE-flag given and combined with +\fB-p\fR, lists all USE-flags with their descriptions (and enabled +state prefixed with an asterisk when used with \fB-I\fR) per +package. diff --git a/man/quse.1 b/man/quse.1 index a30e189..8306ca5 100644 --- a/man/quse.1 +++ b/man/quse.1 @@ -20,12 +20,13 @@ List all ebuilds, don't match anything. Use the LICENSE vs IUSE. .TP \fB\-D\fR, \fB\-\-describe\fR -Describe the USE flag. +Describe the USE flag, when no USE-flag given and combined with +\fB-p\fR, lists all USE-flags with their descriptions (and enabled +state prefixed with an asterisk when used with \fB-I\fR) per +package. .TP \fB\-I\fR, \fB\-\-installed\fR -Only search installed packages. Together with \fB-v\fR this shows -USE-flags and their descriptions, and currently enabled flags -prefixed with an asterisk (\fI*\fR). +Only search installed packages. .TP \fB\-p\fR \fI\fR, \fB\-\-package\fR \fI\fR Restrict matching to package or category. @@ -33,11 +34,14 @@ Restrict matching to package or category. \fB\-R\fR, \fB\-\-repo\fR Show repository the ebuild originates from. .TP +\fB\-F\fR \fI\fR, \fB\-\-format\fR \fI\fR +Print matched atom using given format string. +.TP \fB\-\-root\fR \fI\fR Set the ROOT env var. .TP \fB\-v\fR, \fB\-\-verbose\fR -Show descriptions for USE-flags for packages that match the search. +Show versions for packages that match the search. Also shows problems encountered during parsing. These are mostly diagnostic and indicate possible incorrectness in the results. .TP diff --git a/quse.c b/quse.c index bc99c3b..df8626e 100644 --- a/quse.c +++ b/quse.c @@ -27,7 +27,7 @@ #include "xarray.h" #include "xregex.h" -#define QUSE_FLAGS "eaLDIp:R" COMMON_FLAGS +#define QUSE_FLAGS "eaLDIp:RF:" COMMON_FLAGS static struct option const quse_long_opts[] = { {"exact", no_argument, NULL, 'e'}, {"all", no_argument, NULL, 'a'}, @@ -36,6 +36,7 @@ static struct option const quse_long_opts[] = { {"installed", no_argument, NULL, 'I'}, {"package",a_argument, NULL, 'p'}, {"repo", no_argument, NULL, 'R'}, + {"format", a_argument, NULL, 'F'}, COMMON_LONG_OPTS }; static const char * const quse_opts_help[] = { @@ -46,6 +47,7 @@ static const char * const quse_opts_help[] = { "Only search installed packages", "Restrict matching to package or category", "Show repository the ebuild originates from", + "Print matched atom using given format string", COMMON_OPTS_HELP }; #define quse_usage(ret) usage(ret, QUSE_FLAGS, quse_long_opts, quse_opts_help, NULL, lookup_applet_idx("quse")) @@ -61,9 +63,10 @@ struct quse_state { bool do_licence:1; bool do_installed:1; bool do_list:1; - bool do_repo:1; + bool need_full_atom:1; depend_atom *match; regex_t *pregv; + const char *fmt; }; static char *_quse_getline_buf = NULL; @@ -142,9 +145,8 @@ quse_search_use_local_desc(int portdirfd, struct quse_state *state) if (state->do_list) { state->retv[i] = xstrdup(q); } else { - printf("%s%s/%s%s%s[%s%s%s] %s\n", -
[gentoo-commits] proj/portage-utils:master commit in: /, man/
commit: 44b67c2d685a763c3f8aee1ecffc8d3f5ababe4c Author: Fabian Groffen gentoo org> AuthorDate: Sun Jul 14 11:55:07 2019 + Commit: Fabian Groffen gentoo org> CommitDate: Sun Jul 14 11:55:07 2019 + URL:https://gitweb.gentoo.org/proj/portage-utils.git/commit/?id=44b67c2d qsize: add -F argument, changed default format to match other applets Signed-off-by: Fabian Groffen gentoo.org> man/qsize.1 | 3 +++ qsize.c | 36 +++- 2 files changed, 30 insertions(+), 9 deletions(-) diff --git a/man/qsize.1 b/man/qsize.1 index 3a359e4..df85970 100644 --- a/man/qsize.1 +++ b/man/qsize.1 @@ -33,6 +33,9 @@ Display all sizes in bytes. Filter out entries matching \fI\fR, which is a regular expression, before calculating size. .TP +\fB\-F\fR \fI\fR, \fB\-\-format\fR \fI\fR +Print matched atom using given format string. +.TP \fB\-\-root\fR \fI\fR Set the ROOT env var. .TP diff --git a/qsize.c b/qsize.c index 10aadc8..1f1dfc9 100644 --- a/qsize.c +++ b/qsize.c @@ -55,7 +55,7 @@ #include "xarray.h" #include "xregex.h" -#define QSIZE_FLAGS "fsSmkbi:" COMMON_FLAGS +#define QSIZE_FLAGS "fsSmkbi:F:" COMMON_FLAGS static struct option const qsize_long_opts[] = { {"filesystem", no_argument, NULL, 'f'}, {"sum",no_argument, NULL, 's'}, @@ -64,6 +64,7 @@ static struct option const qsize_long_opts[] = { {"kilobytes", no_argument, NULL, 'k'}, {"bytes", no_argument, NULL, 'b'}, {"ignore", a_argument, NULL, 'i'}, + {"format", a_argument, NULL, 'F'}, COMMON_LONG_OPTS }; static const char * const qsize_opts_help[] = { @@ -74,6 +75,7 @@ static const char * const qsize_opts_help[] = { "Display all sizes in kilobytes", "Display all sizes in bytes", "Ignore regexp string", + "Print matched atom using given format string", COMMON_OPTS_HELP }; #define qsize_usage(ret) usage(ret, QSIZE_FLAGS, qsize_long_opts, qsize_opts_help, NULL, lookup_applet_idx("qsize")) @@ -88,6 +90,8 @@ struct qsize_opt_state { size_t disp_units; const char *str_disp_units; array_t *ignore_regexp; + const char *fmt; + bool need_full_atom:1; size_t buflen; char *buf; @@ -160,9 +164,9 @@ qsize_cb(tree_pkg_ctx *pkg_ctx, void *priv) state->num_all_ignored += num_ignored; if (!state->summary_only) { - atom = tree_get_atom(pkg_ctx, 0); + atom = tree_get_atom(pkg_ctx, state->need_full_atom); printf("%s: %'zu files, %'zu non-files, ", - atom_format("%[CATEGORY]%[PF]", atom), + atom_format(state->fmt, atom), num_files, num_nonfiles); if (num_ignored) printf("%'zu names-ignored, ", num_ignored); @@ -195,17 +199,24 @@ int qsize_main(int argc, char **argv) .num_all_files = 0, .num_all_nonfiles = 0, .num_all_ignored = 0, + .need_full_atom = false, + .fmt = NULL, }; while ((ret = GETOPT_LONG(QSIZE, qsize, "")) != -1) { switch (ret) { COMMON_GETOPTS_CASES(qsize) - case 'f': state.fs_size = 1; break; - case 's': state.summary = 1; break; - case 'S': state.summary = state.summary_only = 1; break; - case 'm': state.disp_units = MEGABYTE; state.str_disp_units = "MiB"; break; - case 'k': state.disp_units = KILOBYTE; state.str_disp_units = "KiB"; break; - case 'b': state.disp_units = 1; state.str_disp_units = "bytes"; break; + case 'f': state.fs_size = 1; break; + case 's': state.summary = 1; break; + case 'S': state.summary = state.summary_only = 1; break; + case 'm': state.disp_units = MEGABYTE; + state.str_disp_units = "MiB"; break; + case 'k': state.disp_units = KILOBYTE; + state.str_disp_units = "KiB"; break; + case 'b': state.disp_units = 1; + state.str_disp_units = "bytes"; break; + case 'F': state.fmt = optarg; + state.need_full_atom = true; break; case 'i': { regex_t regex; xregcomp(®ex, optarg, REG_EXTENDED|REG_NOSUB); @@ -225,6 +236,13 @@ int qsize_main(int argc, char **argv) xarraypush_ptr(state.atoms, atom); } + if (state.fmt == NULL) { + if (verbose) + state.fmt = "%[CATEGORY]%[PF]"; + else + state.fmt = "%[CATEGORY]%[PN]"; + } + st
[gentoo-commits] proj/portage-utils:master commit in: man/, /
commit: 46f6f4a1c29eb1bcd66af043b13d6952ad3a5e0a Author: Fabian Groffen gentoo org> AuthorDate: Sun Jul 14 11:43:29 2019 + Commit: Fabian Groffen gentoo org> CommitDate: Sun Jul 14 11:43:29 2019 + URL:https://gitweb.gentoo.org/proj/portage-utils.git/commit/?id=46f6f4a1 qsearch: add -F argument, also make -v act like for other applets Signed-off-by: Fabian Groffen gentoo.org> man/qsearch.1 | 3 +++ qsearch.c | 59 --- 2 files changed, 39 insertions(+), 23 deletions(-) diff --git a/man/qsearch.1 b/man/qsearch.1 index f6b9baf..e805f82 100644 --- a/man/qsearch.1 +++ b/man/qsearch.1 @@ -29,6 +29,9 @@ Show homepage info instead of description. \fB\-R\fR, \fB\-\-repo\fR Show repository the ebuild originates from. .TP +\fB\-F\fR \fI\fR, \fB\-\-format\fR \fI\fR +Print matched atom using given format string. +.TP \fB\-\-root\fR \fI\fR Set the ROOT env var. .TP diff --git a/qsearch.c b/qsearch.c index db220c7..8245383 100644 --- a/qsearch.c +++ b/qsearch.c @@ -25,7 +25,7 @@ #include "xarray.h" #include "xregex.h" -#define QSEARCH_FLAGS "asSNHR" COMMON_FLAGS +#define QSEARCH_FLAGS "asSNHRF:" COMMON_FLAGS static struct option const qsearch_long_opts[] = { {"all", no_argument, NULL, 'a'}, {"search",no_argument, NULL, 's'}, @@ -33,6 +33,7 @@ static struct option const qsearch_long_opts[] = { {"name-only", no_argument, NULL, 'N'}, {"homepage", no_argument, NULL, 'H'}, {"repo", no_argument, NULL, 'R'}, + {"format", a_argument, NULL, 'F'}, COMMON_LONG_OPTS }; static const char * const qsearch_opts_help[] = { @@ -42,6 +43,7 @@ static const char * const qsearch_opts_help[] = { "Only show package name", "Show homepage info instead of description", "Show repository the ebuild originates from", + "Print matched atom using given format string", COMMON_OPTS_HELP }; #define qsearch_usage(ret) usage(ret, QSEARCH_FLAGS, qsearch_long_opts, qsearch_opts_help, NULL, lookup_applet_idx("qsearch")) @@ -50,10 +52,11 @@ struct qsearch_state { bool show_homepage:1; bool show_name:1; bool show_desc:1; - bool show_repo:1; bool search_desc:1; bool search_name:1; + bool need_full_atom:1; regex_t search_expr; + const char *fmt; }; static int @@ -99,16 +102,10 @@ qsearch_cb(tree_pkg_ctx *pkg_ctx, void *priv) match = true; if (match) { - const char *qfmt; - if (state->show_repo) { - atom = tree_get_atom(pkg_ctx, 1); - qfmt = "%[CATEGORY]%[PN]%[REPO]"; - } else { - qfmt = "%[CATEGORY]%[PN]"; - } + atom = tree_get_atom(pkg_ctx, state->need_full_atom); printf("%s%s%s\n", - atom_format(qfmt, atom), - (state->show_name ? "" : " "), + atom_format(state->fmt, atom), + (state->show_name ? "" : ": "), (state->show_name ? "" : desc ? desc : "")); } @@ -131,23 +128,25 @@ int qsearch_main(int argc, char **argv) const char *overlay; size_t n; struct qsearch_state state = { - .show_homepage = false, - .show_name = false, - .show_desc = false, - .show_repo = false, - .search_desc = false, - .search_name = false, + .show_homepage = false, + .show_name = false, + .show_desc = false, + .search_desc= false, + .search_name= false, + .need_full_atom = false, + .fmt= NULL, }; while ((i = GETOPT_LONG(QSEARCH, qsearch, "")) != -1) { switch (i) { COMMON_GETOPTS_CASES(qsearch) - case 'a': search_me = ".*"; break; - case 's': state.search_name = true; break; - case 'S': state.search_desc = true; break; - case 'N': state.show_name = true; break; - case 'H': state.show_homepage = true; break; - case 'R': state.show_repo = true; break; + case 'a': search_me= ".*"; break; + case 's': state.search_name= true; break; + case 'S': state.search_desc= true; break; + case 'N': state.show_name = true; break; + case 'H': state.show_homepage = true; break; + case 'F': state.fmt= optarg; /* fall through */ + case 'R': state.need_full_atom = true; break; } } @@ -165,6 +164,20 @@ int qsearch_main(int argc
[gentoo-commits] proj/portage-utils:master commit in: /, man/
commit: eadd293b14379b5f8f49dd000fed18139d90dc94 Author: Fabian Groffen gentoo org> AuthorDate: Sun Jul 14 09:26:26 2019 + Commit: Fabian Groffen gentoo org> CommitDate: Sun Jul 14 09:26:26 2019 + URL:https://gitweb.gentoo.org/proj/portage-utils.git/commit/?id=eadd293b qfile add -F argument Signed-off-by: Fabian Groffen gentoo.org> man/qcheck.1 | 5 - man/qfile.1 | 5 - qfile.c | 49 - 3 files changed, 32 insertions(+), 27 deletions(-) diff --git a/man/qcheck.1 b/man/qcheck.1 index 9e4d873..f48fa63 100644 --- a/man/qcheck.1 +++ b/man/qcheck.1 @@ -1,5 +1,5 @@ .\" generated by mkman.py, please do NOT edit! -.TH qcheck "1" "May 2019" "Gentoo Foundation" "qcheck" +.TH qcheck "1" "Jul 2019" "Gentoo Foundation" "qcheck" .SH NAME qcheck \- verify integrity of installed packages .SH SYNOPSIS @@ -9,6 +9,9 @@ qcheck \- verify integrity of installed packages .SH OPTIONS .TP +\fB\-F\fR \fI\fR, \fB\-\-format\fR \fI\fR +Custom output format (default: %[CATEGORY]%[PN]). +.TP \fB\-s\fR \fI\fR, \fB\-\-skip\fR \fI\fR Ignore files matching the regular expression . .TP diff --git a/man/qfile.1 b/man/qfile.1 index 6dedef2..33dfbee 100644 --- a/man/qfile.1 +++ b/man/qfile.1 @@ -1,5 +1,5 @@ .\" generated by mkman.py, please do NOT edit! -.TH qfile "1" "May 2019" "Gentoo Foundation" "qfile" +.TH qfile "1" "Jul 2019" "Gentoo Foundation" "qfile" .SH NAME qfile \- list all pkgs owning files .SH SYNOPSIS @@ -35,6 +35,9 @@ After version \fB0.74\fR of portage-utils, the \fB-b\fR option was renamed to \fB-d\fR. .SH OPTIONS .TP +\fB\-F\fR \fI\fR, \fB\-\-format\fR \fI\fR +Print matched atom using given format string. +.TP \fB\-S\fR, \fB\-\-slots\fR Display installed packages with slots. .TP diff --git a/qfile.c b/qfile.c index 1a6b470..bc5c9ac 100644 --- a/qfile.c +++ b/qfile.c @@ -20,8 +20,9 @@ #include "rmspace.h" #include "tree.h" -#define QFILE_FLAGS "doRx:S" COMMON_FLAGS +#define QFILE_FLAGS "F:doRx:S" COMMON_FLAGS static struct option const qfile_long_opts[] = { + {"format", a_argument, NULL, 'F'}, {"slots", no_argument, NULL, 'S'}, {"root-prefix", no_argument, NULL, 'R'}, {"dir", no_argument, NULL, 'd'}, @@ -30,6 +31,7 @@ static struct option const qfile_long_opts[] = { COMMON_LONG_OPTS }; static const char * const qfile_opts_help[] = { + "Print matched atom using given format string", "Display installed packages with slots", "Assume arguments are already prefixed by $ROOT", "Also match directories for single component arguments", @@ -64,16 +66,13 @@ struct qfile_opt_state { char *exclude_pkg; char *exclude_slot; depend_atom *exclude_atom; - bool slotted; bool basename; bool orphans; bool assume_root_prefix; + const char *format; + bool need_full_atom; }; -/* - * We assume the people calling us have chdir(/var/db/pkg) and so - * we use relative paths throughout here. - */ static int qfile_cb(tree_pkg_ctx *pkg_ctx, void *priv) { struct qfile_opt_state *state = priv; @@ -215,24 +214,9 @@ static int qfile_cb(tree_pkg_ctx *pkg_ctx, void *priv) continue; if (non_orphans == NULL) { - const char *fmt; - - atom = tree_get_atom(pkg_ctx, true); + atom = tree_get_atom(pkg_ctx, state->need_full_atom); - if (state->slotted) { - if (verbose) { - fmt = "%[CATEGORY]%[PF]%[SLOT]"; - } else { - fmt = "%[CATEGORY]%[PN]%[SLOT]"; - } - } else { - if (verbose) { - fmt = "%[CATEGORY]%[PF]"; - } else { - fmt = "%[CATEGORY]%[PN]"; - } - } - printf("%s", atom_format(fmt, atom)); + printf("%s", atom_format(state->format, atom)); if (quiet) puts(""); else @@ -402,10 +386,11 @@ int qfile_main(int argc, char **argv) { struct qfile_opt_state state = { .buflen = _Q_PATH_MAX, - .slotted = false, + .need_full_atom = false, .basename = false, .orphans = false, .assume_root_prefix = false, + .format = NULL, }; int i, nb_of_queries, found = 0;
[gentoo-commits] proj/portage-utils:master commit in: /, man/
commit: ccfa1c152556ee6080731e2d1d51d92e5cd0b278 Author: Fabian Groffen gentoo org> AuthorDate: Sun Jul 14 10:17:20 2019 + Commit: Fabian Groffen gentoo org> CommitDate: Sun Jul 14 10:17:20 2019 + URL:https://gitweb.gentoo.org/proj/portage-utils.git/commit/?id=ccfa1c15 qlop: add -F argument Signed-off-by: Fabian Groffen gentoo.org> man/qlop.1 | 3 +++ qlop.c | 43 ++- 2 files changed, 29 insertions(+), 17 deletions(-) diff --git a/man/qlop.1 b/man/qlop.1 index 3fb9c7a..10eaa27 100644 --- a/man/qlop.1 +++ b/man/qlop.1 @@ -109,6 +109,9 @@ Read emerge logfile instead of $EMERGE_LOG_DIR/emerge.log. \fB\-w\fR \fI\fR, \fB\-\-atoms\fR \fI\fR Read package atoms to report from file. .TP +\fB\-F\fR \fI\fR, \fB\-\-format\fR \fI\fR +Print matched atom using given format string. +.TP \fB\-\-root\fR \fI\fR Set the ROOT env var. .TP diff --git a/qlop.c b/qlop.c index bd16018..e20c97b 100644 --- a/qlop.c +++ b/qlop.c @@ -24,7 +24,7 @@ #define QLOP_DEFAULT_LOGFILE "emerge.log" -#define QLOP_FLAGS "ctaHMmuUslerd:f:w:" COMMON_FLAGS +#define QLOP_FLAGS "ctaHMmuUslerd:f:w:F:" COMMON_FLAGS static struct option const qlop_long_opts[] = { {"summary", no_argument, NULL, 'c'}, {"time", no_argument, NULL, 't'}, @@ -41,6 +41,7 @@ static struct option const qlop_long_opts[] = { {"lastmerge", no_argument, NULL, 'l'}, {"logfile",a_argument, NULL, 'f'}, {"atoms", a_argument, NULL, 'w'}, + {"format", a_argument, NULL, 'F'}, COMMON_LONG_OPTS }; static const char * const qlop_opts_help[] = { @@ -59,6 +60,7 @@ static const char * const qlop_opts_help[] = { "Limit selection to last Portage emerge action", "Read emerge logfile instead of $EMERGE_LOG_DIR/" QLOP_DEFAULT_LOGFILE, "Read package atoms to report from file", + "Print matched atom using given format string", COMMON_OPTS_HELP }; static const char qlop_desc[] = @@ -83,6 +85,7 @@ struct qlop_mode { char do_machine:1; char do_endtime:1; char show_lastmerge:1; + const char *fmt; }; static bool @@ -347,10 +350,6 @@ static int do_emerge_log( }; struct pkg_match *pkg; struct pkg_match *pkgw; - const char *afmt = "%[CATEGORY]%[PN]"; - - if (verbose) - afmt = "%[CATEGORY]%[PF]"; if ((fp = fopen(log, "r")) == NULL) { warnp("Could not open logfile '%s'", log); @@ -621,19 +620,19 @@ static int do_emerge_log( } if (quiet && !flags->do_average) { printf("%s%s%s\n", - atom_format(afmt, pkgw->atom), + atom_format(flags->fmt, pkgw->atom), flags->do_time ? ": " : "", flags->do_time ? fmt_elapsedtime(flags, elapsed) : ""); } else if (flags->do_time) { printf("%s >>> %s: %s\n", fmt_date(flags, pkgw->tbegin, tstart), - atom_format(afmt, pkgw->atom), + atom_format(flags->fmt, pkgw->atom), fmt_elapsedtime(flags, elapsed)); } else if (!flags->do_average) { printf("%s >>> %s\n", fmt_date(flags, pkgw->tbegin, tstart), - atom_format(afmt, pkgw->atom)); + atom_format(flags->fmt, pkgw->atom)); } atom_implode(pkgw->atom); xarraydelete(merge_matches, i); @@ -726,19 +725,19 @@ static int do_emerge_log( } if (quiet && !flags->do_average) { printf("%s%s%s\n", - atom_format(afmt, pkgw->atom), + atom_format(flags->fmt, pkgw->atom), flags->do_time ? ": " : "",
[gentoo-commits] proj/portage-utils:master commit in: /, man/
commit: ee8c746db135320fe41c1dc830bda1617216b916 Author: Fabian Groffen gentoo org> AuthorDate: Sun Jul 14 10:14:39 2019 + Commit: Fabian Groffen gentoo org> CommitDate: Sun Jul 14 10:14:39 2019 + URL:https://gitweb.gentoo.org/proj/portage-utils.git/commit/?id=ee8c746d main: nicely format/wrap help arguments in -h output Signed-off-by: Fabian Groffen gentoo.org> main.c | 51 +++ man/mkman.py | 8 2 files changed, 43 insertions(+), 16 deletions(-) diff --git a/main.c b/main.c index bdbb2a7..5d4c4cd 100644 --- a/main.c +++ b/main.c @@ -92,14 +92,18 @@ usage(int status, const char *flags, struct option const opts[], const char opt_arg[] = "[arg]"; const char a_arg[] = ""; size_t a_arg_len = strlen(a_arg) + 1; - size_t i, optlen; + size_t i; + size_t optlen; + size_t l; + size_t prefixlen; + const char *hstr; FILE *fp = status == EXIT_SUCCESS ? stdout : warnout; if (blabber == 0) { - fprintf(fp, "%sUsage:%s %sq%s %s %s : %s" + fprintf(fp, "%susage:%s %sq%s %s %s : %s" "invoke a portage utility applet\n\n", GREEN, NORM, YELLOW, NORM, DKBLUE, RED, NORM); - fprintf(fp, "%sCurrently defined applets:%s\n", GREEN, NORM); + fprintf(fp, "%scurrently defined applets:%s\n", GREEN, NORM); for (i = 0; applets[i].desc; ++i) if (applets[i].func) fprintf(fp, " %s%8s%s %s%-16s%s%s:%s %s\n", @@ -107,7 +111,7 @@ usage(int status, const char *flags, struct option const opts[], DKBLUE, applets[i].opts, NORM, RED, NORM, _(applets[i].desc)); } else if (blabber > 0) { - fprintf(fp, "%sUsage:%s %s%s%s [opts] %s%s%s %s:%s %s\n", + fprintf(fp, "%susage:%s %s%s%s [opts] %s%s%s %s:%s %s\n", GREEN, NORM, YELLOW, applets[blabber].name, NORM, DKBLUE, applets[blabber].opts, NORM, @@ -116,19 +120,19 @@ usage(int status, const char *flags, struct option const opts[], fprintf(fp, "\n%s\n", desc); } if (module_name != NULL) - fprintf(fp, "%sLoaded module:%s\n%s%8s%s %s%s\n", + fprintf(fp, "%sloaded module:%s\n%s%8s%s %s%s\n", GREEN, NORM, YELLOW, module_name, NORM, DKBLUE, NORM); /* Prescan the --long opt length to auto-align. */ optlen = 0; for (i = 0; opts[i].name; ++i) { - size_t l = strlen(opts[i].name); + l = strlen(opts[i].name); if (opts[i].has_arg != no_argument) l += a_arg_len; optlen = MAX(l, optlen); } - fprintf(fp, "\n%sOptions:%s -[%s]\n", GREEN, NORM, flags); + fprintf(fp, "\n%soptions:%s -[%s]\n", GREEN, NORM, flags); for (i = 0; opts[i].name; ++i) { /* this assert is a life saver when adding new applets. */ assert(help[i] != NULL); @@ -139,16 +143,39 @@ usage(int status, const char *flags, struct option const opts[], else fprintf(fp, " -%c, ", opts[i].val); - /* then the long flag + help text */ + /* then the long flag */ if (opts[i].has_arg == no_argument) - fprintf(fp, "--%-*s %s*%s %s\n", (int)optlen, opts[i].name, - RED, NORM, _(help[i])); + fprintf(fp, "--%-*s %s*%s ", (int)optlen, opts[i].name, + RED, NORM); else - fprintf(fp, "--%s %s%s%s%*s %s*%s %s\n", + fprintf(fp, "--%s %s%s%s%*s %s*%s ", opts[i].name, DKBLUE, (opts[i].has_arg == a_argument ? a_arg : opt_arg), NORM, (int)(optlen - strlen(opts[i].name) - a_arg_len), "", - RED, NORM, _(help[i])); + RED, NORM); + + /* then wrap the help text, if necessary */ + prefixlen = 6 + 2 + optlen + 1 + 1 + 1; + if ((size_t)twidth < prefixlen + 10) { + fprintf(fp, "%s\n", _(help[i])); + } else { + const char *t; + hstr = _(help[i]); + l = strlen(hstr); + while (twidth - prefixlen < l) { + /* search backwards for a space */ + t = &hstr[twidth - prefixlen]; + while (t > hstr && !isspace((int)*t)) +
[gentoo-commits] proj/portage-utils:master commit in: /, man/
commit: 47087590e69be3b84c299d4e69d028d8c783b14e Author: Fabian Groffen gentoo org> AuthorDate: Sun Jul 14 09:31:21 2019 + Commit: Fabian Groffen gentoo org> CommitDate: Sun Jul 14 09:31:21 2019 + URL:https://gitweb.gentoo.org/proj/portage-utils.git/commit/?id=47087590 applets: reword -v help description into what it really is Signed-off-by: Fabian Groffen gentoo.org> applets.h | 2 +- man/q.1 | 4 ++-- man/qatom.1 | 2 +- man/qcheck.1| 2 +- man/qdepends.1 | 2 +- man/qgrep.1 | 2 +- man/qkeyword.1 | 4 ++-- man/qlist.1 | 2 +- man/qlop.1 | 2 +- man/qmanifest.1 | 4 ++-- man/qmerge.1| 4 ++-- man/qpkg.1 | 2 +- man/qsearch.1 | 2 +- man/qsize.1 | 2 +- man/qtbz2.1 | 2 +- man/qtegrity.1 | 4 ++-- man/quse.1 | 2 +- man/qxpak.1 | 4 ++-- 18 files changed, 24 insertions(+), 24 deletions(-) diff --git a/applets.h b/applets.h index acc85da..999cf7a 100644 --- a/applets.h +++ b/applets.h @@ -133,7 +133,7 @@ static const struct applet_t { {NULL,no_argument, NULL, 0x0} #define COMMON_OPTS_HELP \ "Set the ROOT env var", \ - "Make a lot of noise", \ + "Report full package versions, emit more elaborate output", \ "Tighter output; suppress warnings", \ "Don't output color", \ "Print this help and exit", \ diff --git a/man/q.1 b/man/q.1 index 0546ab1..4e6264c 100644 --- a/man/q.1 +++ b/man/q.1 @@ -1,5 +1,5 @@ .\" generated by mkman.py, please do NOT edit! -.TH q "1" "May 2019" "Gentoo Foundation" "q" +.TH q "1" "Jul 2019" "Gentoo Foundation" "q" .SH NAME q \- invoke a portage utility applet .SH SYNOPSIS @@ -26,7 +26,7 @@ Print available overlays (read from repos.conf). Set the ROOT env var. .TP \fB\-v\fR, \fB\-\-verbose\fR -Make a lot of noise. +Report full package versions, emit more elaborate output. .TP \fB\-q\fR, \fB\-\-quiet\fR Tighter output; suppress warnings. diff --git a/man/qatom.1 b/man/qatom.1 index 968e1af..ab6cfb3 100644 --- a/man/qatom.1 +++ b/man/qatom.1 @@ -1,5 +1,5 @@ .\" generated by mkman.py, please do NOT edit! -.TH qatom "1" "Jun 2019" "Gentoo Foundation" "qatom" +.TH qatom "1" "Jul 2019" "Gentoo Foundation" "qatom" .SH NAME qatom \- split atom strings .SH SYNOPSIS diff --git a/man/qcheck.1 b/man/qcheck.1 index f48fa63..fce6b42 100644 --- a/man/qcheck.1 +++ b/man/qcheck.1 @@ -40,7 +40,7 @@ Undo prelink when calculating checksums. Set the ROOT env var. .TP \fB\-v\fR, \fB\-\-verbose\fR -Make a lot of noise. +Report full package versions, emit more elaborate output. .TP \fB\-q\fR, \fB\-\-quiet\fR Tighter output; suppress warnings. diff --git a/man/qdepends.1 b/man/qdepends.1 index 7898e3d..8b0ad69 100644 --- a/man/qdepends.1 +++ b/man/qdepends.1 @@ -1,5 +1,5 @@ .\" generated by mkman.py, please do NOT edit! -.TH qdepends "1" "Jun 2019" "Gentoo Foundation" "qdepends" +.TH qdepends "1" "Jul 2019" "Gentoo Foundation" "qdepends" .SH NAME qdepends \- show dependency info .SH SYNOPSIS diff --git a/man/qgrep.1 b/man/qgrep.1 index fbde702..f3a5c2d 100644 --- a/man/qgrep.1 +++ b/man/qgrep.1 @@ -1,5 +1,5 @@ .\" generated by mkman.py, please do NOT edit! -.TH qgrep "1" "Jun 2019" "Gentoo Foundation" "qgrep" +.TH qgrep "1" "Jul 2019" "Gentoo Foundation" "qgrep" .SH NAME qgrep \- grep in ebuilds .SH SYNOPSIS diff --git a/man/qkeyword.1 b/man/qkeyword.1 index 483c608..a191d72 100644 --- a/man/qkeyword.1 +++ b/man/qkeyword.1 @@ -1,5 +1,5 @@ .\" generated by mkman.py, please do NOT edit! -.TH qkeyword "1" "May 2019" "Gentoo Foundation" "qkeyword" +.TH qkeyword "1" "Jul 2019" "Gentoo Foundation" "qkeyword" .SH NAME qkeyword \- list packages based on keywords .SH SYNOPSIS @@ -53,7 +53,7 @@ list packages that aren't keyworded on a given arch. Set the ROOT env var. .TP \fB\-v\fR, \fB\-\-verbose\fR -Make a lot of noise. +Report full package versions, emit more elaborate output. .TP \fB\-q\fR, \fB\-\-quiet\fR Tighter output; suppress warnings. diff --git a/man/qlist.1 b/man/qlist.1 index cd1e8bb..8f9cf56 100644 --- a/man/qlist.1 +++ b/man/qlist.1 @@ -1,5 +1,5 @@ .\" generated by mkman.py, please do NOT edit! -.TH qlist "1" "May 2019" "Gentoo Foundation" "qlist" +.TH qlist "1" "Jul 2019" "Gentoo Foundation" "qlist" .SH NAME qlist \- list files owned by pkgname .SH SYNOPSIS diff --git a/man/qlop.1 b/man/qlop.1 index f42a853..3fb9c7a 100644 --- a/man/qlop.1 +++ b/man/qlop.1 @@ -1,5 +1,5 @@ .\" generated by mkman.py, please do NOT edit! -.TH qlop "1" "May 2019" "Gentoo Foundation" "qlop" +.TH qlop "1" "Jul 2019" "Gentoo Foundation" "qlop" .SH NAME qlop \- emerge log analyzer .SH SYNOPSIS diff --git a/man/qmanifest.1 b/man/qmanifest.1 index 15027f6..5d00bd3 100644 --- a/man/qmanifest.1 +++ b/man/qmanifest.1 @@ -1,5 +1,5 @@ .\" generated by mkman.py, please do NOT edit! -.TH qmanifest "1" "May 2019" "Gentoo Foundation" "qmanifest" +.TH qmanifest "1" "Jul 2019" "Gentoo Foundation" "qmanifest" .SH NAME qmani
[gentoo-commits] proj/portage-utils:master commit in: man/, /
commit: 2fd5a0ccc059a64a25aa292b7899af9e3ccf94f0 Author: Fabian Groffen gentoo org> AuthorDate: Fri Jun 21 18:23:31 2019 + Commit: Fabian Groffen gentoo org> CommitDate: Fri Jun 21 18:23:31 2019 + URL:https://gitweb.gentoo.org/proj/portage-utils.git/commit/?id=2fd5a0cc qgrep: fix command descriptions Bug: https://bugs.gentoo.org/688442 Signed-off-by: Fabian Groffen gentoo.org> man/qgrep.1 | 32 qgrep.c | 1 - 2 files changed, 16 insertions(+), 17 deletions(-) diff --git a/man/qgrep.1 b/man/qgrep.1 index 6701061..fbde702 100644 --- a/man/qgrep.1 +++ b/man/qgrep.1 @@ -24,43 +24,43 @@ Ignore case distinctions. Print the filename for each match. .TP \fB\-c\fR, \fB\-\-count\fR -Print the package or eclass name for each match. +Only print a count of matching lines per FILE. .TP \fB\-l\fR, \fB\-\-list\fR -Only print a count of matching lines per FILE. +Only print FILE names containing matches. .TP \fB\-L\fR, \fB\-\-invert\-list\fR -Only print FILE names containing matches. +Only print FILE names containing no match. .TP \fB\-e\fR, \fB\-\-regexp\fR -Only print FILE names containing no match. +Use PATTERN as a regular expression. .TP \fB\-x\fR, \fB\-\-extended\fR -Use PATTERN as a regular expression. +Use PATTERN as an extended regular expression. .TP \fB\-J\fR, \fB\-\-installed\fR -Use PATTERN as an extended regular expression. +Search in installed ebuilds instead of the tree. .TP \fB\-E\fR, \fB\-\-eclass\fR -Search in installed ebuilds instead of the tree. +Search in eclasses instead of ebuilds. .TP \fB\-s\fR, \fB\-\-skip\-comments\fR -Search in eclasses instead of ebuilds. +Skip comments lines. .TP \fB\-R\fR, \fB\-\-repo\fR -Skip comments lines. +Print source repository name for each match (implies -N). .TP \fB\-S\fR \fI\fR, \fB\-\-skip\fR \fI\fR -Print source repository name for each match (implies -N). +Skip lines matching . .TP \fB\-B\fR \fI\fR, \fB\-\-before\fR \fI\fR -Skip lines matching . +Print lines of leading context. .TP \fB\-A\fR \fI\fR, \fB\-\-after\fR \fI\fR -Print lines of leading context. +Print lines of trailing context. .TP \fB\-\-root\fR \fI\fR -Print lines of trailing context. +Set the ROOT env var. .TP \fB\-v\fR, \fB\-\-verbose\fR Prefix each matching line with filename (like \fB-H\fR). When this @@ -70,13 +70,13 @@ option is given multiple times, also linenumbers are printed. Do not prefix each match with filename. .TP \fB\-C\fR, \fB\-\-nocolor\fR -Tighter output; suppress warnings. +Don't output color. .TP \fB\-h\fR, \fB\-\-help\fR -Don't output color. +Print this help and exit. .TP \fB\-V\fR, \fB\-\-version\fR -Print this help and exit. +Print version and exit. .SH "REPORTING BUGS" Please report bugs via http://bugs.gentoo.org/ diff --git a/qgrep.c b/qgrep.c index 003ead2..1f6d0de 100644 --- a/qgrep.c +++ b/qgrep.c @@ -47,7 +47,6 @@ static const char * const qgrep_opts_help[] = { "Select non-matching lines", "Ignore case distinctions", "Print the filename for each match", - "Print the package or eclass name for each match", "Only print a count of matching lines per FILE", "Only print FILE names containing matches", "Only print FILE names containing no match",
[gentoo-commits] proj/portage-utils:master commit in: man/include/, /, man/
commit: 057ffaead77a168f14861b0cce51c69332ab4ae1 Author: Fabian Groffen gentoo org> AuthorDate: Wed Jun 19 07:30:44 2019 + Commit: Fabian Groffen gentoo org> CommitDate: Wed Jun 19 07:30:44 2019 + URL:https://gitweb.gentoo.org/proj/portage-utils.git/commit/?id=057ffaea qdepends: make -qq with -Q just print list of packages Bug: https://bugs.gentoo.org/683430 Signed-off-by: Fabian Groffen gentoo.org> man/include/qdepends-05-examples.include | 17 + man/include/qdepends.optdesc.yaml| 3 ++- man/qdepends.1 | 19 ++- qdepends.c | 6 -- 4 files changed, 41 insertions(+), 4 deletions(-) diff --git a/man/include/qdepends-05-examples.include b/man/include/qdepends-05-examples.include index d3eac01..98ceb3a 100644 --- a/man/include/qdepends-05-examples.include +++ b/man/include/qdepends-05-examples.include @@ -17,3 +17,20 @@ can quickly see what specific dependency is expressed here. If the above had used \fIhttp://bugs.gentoo.org/ .br diff --git a/qdepends.c b/qdepends.c index f5aa5a5..b5e8993 100644 --- a/qdepends.c +++ b/qdepends.c @@ -251,13 +251,15 @@ qdepends_results_cb(tree_pkg_ctx *pkg_ctx, void *priv) if (!firstmatch) { datom = tree_get_atom(pkg_ctx, true); - printf("%s:", atom_format(state->format, datom)); + printf("%s%s", atom_format(state->format, datom), + quiet < 2 ? ":" : ""); } firstmatch = true; snprintf(buf, sizeof(buf), "%s%s%s", RED, atom_to_string(atom), NORM); - add_set_unique(buf, state->udeps, NULL); + if (quiet < 2) + add_set_unique(buf, state->udeps, NULL); } else if (!quiet) { add_set_unique(atom_to_string(atom), state->udeps, NULL);
[gentoo-commits] proj/portage-utils:master commit in: man/
commit: a7ff20f634939e5766cd962bb51234cd0644b5d1 Author: Fabian Groffen gentoo org> AuthorDate: Wed Jun 12 09:07:28 2019 + Commit: Fabian Groffen gentoo org> CommitDate: Wed Jun 12 09:07:28 2019 + URL:https://gitweb.gentoo.org/proj/portage-utils.git/commit/?id=a7ff20f6 man/mkman: skip generation for applets that aren't enabled This just eases the situation with --disable-qmanifest. Signed-off-by: Fabian Groffen gentoo.org> man/mkman.py | 5 - 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/man/mkman.py b/man/mkman.py index ff11e0b..a1b68a7 100755 --- a/man/mkman.py +++ b/man/mkman.py @@ -64,7 +64,10 @@ def MkMan(applets, applet, output): # Extract the main use string and description: # Usage: q: invoke a portage utility applet -ahelp = subprocess.check_output([Q, applet, '--help']).decode('ascii') +try: +ahelp = subprocess.check_output([Q, applet, '--help']).decode('ascii') +except: +return lines = ahelp.splitlines() m = re.search(r'^Usage: %s (.*) : (.*)' % applet, ahelp) usage = m.group(1)
[gentoo-commits] proj/portage-utils:master commit in: man/include/, man/, /
commit: 753605792fab143ded32ebabbf85cc840151f0d2 Author: Fabian Groffen gentoo org> AuthorDate: Wed Jun 12 09:11:44 2019 + Commit: Fabian Groffen gentoo org> CommitDate: Wed Jun 12 09:11:44 2019 + URL:https://gitweb.gentoo.org/proj/portage-utils.git/commit/?id=75360579 quse: add mode for querying installed packages (only) Instead of traversing the tree(s), look in the VDB (= installed packages). While doing this, when using -v, we can print the enabled flags next to the flag and its description, as with `equery uses'. Bug: https://bugs.gentoo.org/656550 Signed-off-by: Fabian Groffen gentoo.org> man/include/quse.optdesc.yaml | 4 +++ man/quse.1| 7 +++- quse.c| 81 +++ 3 files changed, 76 insertions(+), 16 deletions(-) diff --git a/man/include/quse.optdesc.yaml b/man/include/quse.optdesc.yaml index 79a98fa..693aade 100644 --- a/man/include/quse.optdesc.yaml +++ b/man/include/quse.optdesc.yaml @@ -4,3 +4,7 @@ verbose: | Also shows problems encountered during parsing. These are mostly diagnostic and indicate possible incorrectness in the results. quiet: Ignored for compatibility with other qapplets. +installed: | +Only search installed packages. Together with \fB-v\fR this shows +USE-flags and their descriptions, and currently enabled flags +prefixed with an asterisk (\fI*\fR). diff --git a/man/quse.1 b/man/quse.1 index 7f559fd..0a031ba 100644 --- a/man/quse.1 +++ b/man/quse.1 @@ -1,5 +1,5 @@ .\" generated by mkman.py, please do NOT edit! -.TH quse "1" "May 2019" "Gentoo Foundation" "quse" +.TH quse "1" "Jun 2019" "Gentoo Foundation" "quse" .SH NAME quse \- find pkgs using useflags .SH SYNOPSIS @@ -22,6 +22,11 @@ Use the LICENSE vs IUSE. \fB\-D\fR, \fB\-\-describe\fR Describe the USE flag. .TP +\fB\-I\fR, \fB\-\-installed\fR +Only search installed packages. Together with \fB-v\fR this shows +USE-flags and their descriptions, and currently enabled flags +prefixed with an asterisk (\fI*\fR). +.TP \fB\-p\fR \fI\fR, \fB\-\-package\fR \fI\fR Restrict matching to package or category. .TP diff --git a/quse.c b/quse.c index c7fbe81..751f767 100644 --- a/quse.c +++ b/quse.c @@ -21,17 +21,19 @@ #include #include +#include "set.h" #include "rmspace.h" #include "tree.h" #include "xarray.h" #include "xregex.h" -#define QUSE_FLAGS "eaLDp:R" COMMON_FLAGS +#define QUSE_FLAGS "eaLDIp:R" COMMON_FLAGS static struct option const quse_long_opts[] = { {"exact", no_argument, NULL, 'e'}, {"all", no_argument, NULL, 'a'}, {"license", no_argument, NULL, 'L'}, {"describe", no_argument, NULL, 'D'}, + {"installed", no_argument, NULL, 'I'}, {"package",a_argument, NULL, 'p'}, {"repo", no_argument, NULL, 'R'}, COMMON_LONG_OPTS @@ -41,6 +43,7 @@ static const char * const quse_opts_help[] = { "List all ebuilds, don't match anything", "Use the LICENSE vs IUSE", "Describe the USE flag", + "Only search installed packages", "Restrict matching to package or category", "Show repository the ebuild originates from", COMMON_OPTS_HELP @@ -56,6 +59,7 @@ struct quse_state { bool do_regex:1; bool do_describe:1; bool do_licence:1; + bool do_installed:1; bool do_list:1; bool do_repo:1; depend_atom *match; @@ -407,6 +411,7 @@ quse_results_cb(tree_pkg_ctx *pkg_ctx, void *priv) depend_atom *atom = NULL; /* pacify compiler */ char buf[8192]; tree_pkg_meta *meta; + set *use = NULL; bool match; char *p; char *q; @@ -432,16 +437,44 @@ quse_results_cb(tree_pkg_ctx *pkg_ctx, void *priv) } } - meta = tree_pkg_read(pkg_ctx); - if (meta == NULL) - return 0; + if (state->overlay != NULL) { + meta = tree_pkg_read(pkg_ctx); + if (meta == NULL) + return 0; + if (meta->IUSE == NULL) + return 0; + } else { + size_t dummy; - if (meta->IUSE == NULL) - return 0; + meta = xzalloc(sizeof(*meta)); + + dummy = 0; + if (!tree_pkg_vdb_eat(pkg_ctx, "IUSE", &meta->IUSE, &dummy)) { + free(meta); + return 0; + } + + dummy = 0; + tree_pkg_vdb_eat(pkg_ctx, "LICENSE", &meta->LICENSE, &dummy); + + s = NULL; + dummy = 0; + tree_pkg_vdb_eat(pkg_ctx, "USE", &s, &dummy); + p = s; + while ((q = strchr(p, (int)' ')) != NULL) { + *q++ = '\0'; + use = add_set(p, use); + p = q; + } + if (*p != '\0') +
[gentoo-commits] proj/portage-utils:master commit in: man/, /, man/include/
commit: c0b88fe2b32679f1548a280d906b82b1651cd804 Author: Fabian Groffen gentoo org> AuthorDate: Sun Jun 9 09:51:26 2019 + Commit: Fabian Groffen gentoo org> CommitDate: Sun Jun 9 09:51:26 2019 + URL:https://gitweb.gentoo.org/proj/portage-utils.git/commit/?id=c0b88fe2 qgrep: print filename for matches by default, fix atom_compare call remove very similar vdb callback in favour of generic tree one format atoms using atom_format for consistency and ease of use retrieve full atoms when SLOT or REPO matches are attempted Signed-off-by: Fabian Groffen gentoo.org> man/include/qgrep.optdesc.yaml | 2 +- man/qgrep.1| 41 - qgrep.c| 100 +++-- 3 files changed, 47 insertions(+), 96 deletions(-) diff --git a/man/include/qgrep.optdesc.yaml b/man/include/qgrep.optdesc.yaml index ad3874d..9716bf0 100644 --- a/man/include/qgrep.optdesc.yaml +++ b/man/include/qgrep.optdesc.yaml @@ -1,4 +1,4 @@ verbose: | Prefix each matching line with filename (like \fB-H\fR). When this option is given multiple times, also linenumbers are printed. -quiet: Ignored for compatibility with other qapplets. +quiet: Do not prefix each match with filename. diff --git a/man/qgrep.1 b/man/qgrep.1 index 180b5dd..6701061 100644 --- a/man/qgrep.1 +++ b/man/qgrep.1 @@ -1,5 +1,5 @@ .\" generated by mkman.py, please do NOT edit! -.TH qgrep "1" "May 2019" "Gentoo Foundation" "qgrep" +.TH qgrep "1" "Jun 2019" "Gentoo Foundation" "qgrep" .SH NAME qgrep \- grep in ebuilds .SH SYNOPSIS @@ -20,66 +20,63 @@ Select non-matching lines. \fB\-i\fR, \fB\-\-ignore\-case\fR Ignore case distinctions. .TP -\fB\-H\fR, \fB\-\-with\-filename\fR -Print the filename for each match. -.TP \fB\-N\fR, \fB\-\-with\-name\fR -Print the package or eclass name for each match. +Print the filename for each match. .TP \fB\-c\fR, \fB\-\-count\fR -Only print a count of matching lines per FILE. +Print the package or eclass name for each match. .TP \fB\-l\fR, \fB\-\-list\fR -Only print FILE names containing matches. +Only print a count of matching lines per FILE. .TP \fB\-L\fR, \fB\-\-invert\-list\fR -Only print FILE names containing no match. +Only print FILE names containing matches. .TP \fB\-e\fR, \fB\-\-regexp\fR -Use PATTERN as a regular expression. +Only print FILE names containing no match. .TP \fB\-x\fR, \fB\-\-extended\fR -Use PATTERN as an extended regular expression. +Use PATTERN as a regular expression. .TP \fB\-J\fR, \fB\-\-installed\fR -Search in installed ebuilds instead of the tree. +Use PATTERN as an extended regular expression. .TP \fB\-E\fR, \fB\-\-eclass\fR -Search in eclasses instead of ebuilds. +Search in installed ebuilds instead of the tree. .TP \fB\-s\fR, \fB\-\-skip\-comments\fR -Skip comments lines. +Search in eclasses instead of ebuilds. .TP \fB\-R\fR, \fB\-\-repo\fR -Print source repository name for each match (implies -N). +Skip comments lines. .TP \fB\-S\fR \fI\fR, \fB\-\-skip\fR \fI\fR -Skip lines matching . +Print source repository name for each match (implies -N). .TP \fB\-B\fR \fI\fR, \fB\-\-before\fR \fI\fR -Print lines of leading context. +Skip lines matching . .TP \fB\-A\fR \fI\fR, \fB\-\-after\fR \fI\fR -Print lines of trailing context. +Print lines of leading context. .TP \fB\-\-root\fR \fI\fR -Set the ROOT env var. +Print lines of trailing context. .TP \fB\-v\fR, \fB\-\-verbose\fR Prefix each matching line with filename (like \fB-H\fR). When this option is given multiple times, also linenumbers are printed. .TP \fB\-q\fR, \fB\-\-quiet\fR -Ignored for compatibility with other qapplets. +Do not prefix each match with filename. .TP \fB\-C\fR, \fB\-\-nocolor\fR -Don't output color. +Tighter output; suppress warnings. .TP \fB\-h\fR, \fB\-\-help\fR -Print this help and exit. +Don't output color. .TP \fB\-V\fR, \fB\-\-version\fR -Print version and exit. +Print this help and exit. .SH "REPORTING BUGS" Please report bugs via http://bugs.gentoo.org/ diff --git a/qgrep.c b/qgrep.c index dff959b..058026e 100644 --- a/qgrep.c +++ b/qgrep.c @@ -24,11 +24,10 @@ #include "xchdir.h" #include "xregex.h" -#define QGREP_FLAGS "IiHNclLexJEsRS:B:A:" COMMON_FLAGS +#define QGREP_FLAGS "IiNclLexJEsRS:B:A:" COMMON_FLAGS static struct option const qgrep_long_opts[] = { {"invert-match", no_argument, NULL, 'I'}, {"ignore-case", no_argument, NULL, 'i'}, - {"with-filename", no_argument, NULL, 'H'}, {"with-name", no_argument, NULL, 'N'}, {"count", no_argument, NULL, 'c'}, {"list", no_argument, NULL, 'l'}, @@ -398,6 +397,8 @@ qgrep_cache_cb(tree_pkg_ctx *pkg_ctx, void *priv) if (data->include_atoms != NULL) { depend_atom **d; for (d = data->include_atoms; *d != NULL; d++) { + if ((*d)->SLOT != NULL || (*d)->REPO != NULL) +
[gentoo-commits] proj/portage-utils:master commit in: man/, man/include/, libq/, /
commit: d16f69568285d76dfa8a367f2458bc16f9e049e4 Author: Fabian Groffen gentoo org> AuthorDate: Mon May 20 17:53:48 2019 + Commit: Fabian Groffen gentoo org> CommitDate: Mon May 20 17:53:48 2019 + URL:https://gitweb.gentoo.org/proj/portage-utils.git/commit/?id=d16f6956 qmanifest: new applet to verify and generate thick Manifests This incorporates https://github.com/grobian/hashgen into portage-utils as qmanifest. Signed-off-by: Fabian Groffen gentoo.org> Makefile.am| 10 + applets.h | 24 +- configure.ac | 73 ++ libq/Makefile.am |2 + libq/hash.c| 196 + libq/hash.h| 26 + man/include/qmanifest.desc | 29 + man/qmanifest.1| 94 +++ qmanifest.c| 1695 9 files changed, 2140 insertions(+), 9 deletions(-) diff --git a/Makefile.am b/Makefile.am index b36173c..f28a073 100644 --- a/Makefile.am +++ b/Makefile.am @@ -17,6 +17,7 @@ APPLETS = \ qkeyword \ qlist \ qlop \ + qmanifest \ qmerge \ qpkg \ qsearch \ @@ -37,6 +38,7 @@ dist_man_MANS = \ man/qkeyword.1 \ man/qlist.1 \ man/qlop.1 \ + man/qmanifest.1 \ man/qmerge.1 \ man/qpkg.1 \ man/qsearch.1 \ @@ -59,6 +61,7 @@ q_SOURCES = \ qkeyword.c \ qlist.c \ qlop.c \ + qmanifest.c \ qmerge.c \ qpkg.c \ qsearch.c \ @@ -69,14 +72,21 @@ q_SOURCES = \ qxpak.c \ $(NULL) q_CPPFLAGS = \ + $(OPENMP_CFLAGS) \ + $(GPGME_CFLAGS) \ -I$(top_srcdir)/libq \ -I$(top_builddir)/autotools/gnulib \ -I$(top_srcdir)/autotools/gnulib \ $(NULL) q_LDADD = \ + $(OPENMP_CFLAGS) \ $(top_builddir)/libq/libq.la \ $(top_builddir)/autotools/gnulib/libgnu.a \ -liniparser \ + $(LIBSSL) \ + $(LIBBL2) \ + $(LIBZ) \ + $(GPGME_LIBS) \ $(LIB_CLOCK_GETTIME) \ $(LIB_EACCESS) \ $(NULL) diff --git a/applets.h b/applets.h index fbb4e8c..902e664 100644 --- a/applets.h +++ b/applets.h @@ -38,23 +38,24 @@ typedef int (*APPLET)(int, char **); #define DECLARE_APPLET(applet) \ extern int applet##_main(int, char **) __attribute__((weak)); DECLARE_APPLET(q) +DECLARE_APPLET(qatom) DECLARE_APPLET(qcheck) DECLARE_APPLET(qdepends) DECLARE_APPLET(qfile) +/*DECLARE_APPLET(qglsa) disable */ +DECLARE_APPLET(qgrep) +DECLARE_APPLET(qkeyword) DECLARE_APPLET(qlist) DECLARE_APPLET(qlop) +DECLARE_APPLET(qmanifest) +DECLARE_APPLET(qmerge) +DECLARE_APPLET(qpkg) DECLARE_APPLET(qsearch) DECLARE_APPLET(qsize) DECLARE_APPLET(qtbz2) +DECLARE_APPLET(qtegrity) DECLARE_APPLET(quse) DECLARE_APPLET(qxpak) -DECLARE_APPLET(qpkg) -DECLARE_APPLET(qgrep) -DECLARE_APPLET(qatom) -DECLARE_APPLET(qmerge) -DECLARE_APPLET(qkeyword) -/*DECLARE_APPLET(qglsa) disable */ -DECLARE_APPLET(qtegrity) #undef DECLARE_APPLET static const struct applet_t { @@ -66,7 +67,6 @@ static const struct applet_t { /* q must always be the first applet */ {"q", q_main, " ", "virtual applet"}, {"qatom", qatom_main, "", "split atom strings"}, - {"qkeyword", qkeyword_main, " ", "list packages based on keywords"}, {"qcheck",qcheck_main,"", "verify integrity of installed packages"}, {"qdepends", qdepends_main, "", "show dependency info"}, {"qfile", qfile_main, "", "list all pkgs owning files"}, @@ -74,16 +74,18 @@ static const struct applet_t { {"qglsa", qglsa_main, " ", "check GLSAs against system"}, */ {"qgrep", qgrep_main, " [pkg ...]", "grep in ebuilds"}, + {"qkeyword", qkeyword_main, " ", "list packages based on keywords"}, {"qlist", qlist_main, "", "list files owned by pkgname"}, {"qlop", qlop_main, "", "emerge log analyzer"}, + {"qmanifest", qmanifest_main, "", "verify or generate thick Manifest files"}, {"qmerge",qmerge_main,"", "fetch and merge binary package"}, {"qpkg", qpkg_main, "", "manipulate Gentoo binpkgs"}, {"qsearch", qsearch_main, "", "search pkgname/desc"}, {"qsize", qsize_main, "", "calculate size usage"}, {"qtbz2", qtbz2_main, "", "manipulate tbz2 packages"}, + {"qtegrity", qtegrity_main, "", "verify files with IMA"}, {"quse", quse_main, "", "find pkgs using useflags"}, {"qxpak", qxpak_main, "", "manipulate xpak archives"}, - {"qtegrity", qtegrity_main, "", "verify files with IMA"}, /* aliases for equery compatibility */ {"belongs", qfile_main, NULL, NULL}, @@ -107,6 +109,10 @@ static const s
[gentoo-commits] proj/portage-utils:master commit in: /, man/
commit: 861d52c3d5fe82d4ca07ba7159f3232c215af28e Author: Fabian Groffen gentoo org> AuthorDate: Mon May 20 08:40:58 2019 + Commit: Fabian Groffen gentoo org> CommitDate: Mon May 20 08:43:57 2019 + URL:https://gitweb.gentoo.org/proj/portage-utils.git/commit/?id=861d52c3 q: remove -M (modpath) option modpath is never used in the code, remove its option Signed-off-by: Fabian Groffen gentoo.org> applets.h | 1 - main.c| 1 - man/q.1 | 3 --- q.c | 5 + 4 files changed, 1 insertion(+), 9 deletions(-) diff --git a/applets.h b/applets.h index 8cb537a..f183dca 100644 --- a/applets.h +++ b/applets.h @@ -137,7 +137,6 @@ static const struct applet_t { case 'C': no_colors(); break; \ default: applet ## _usage(EXIT_FAILURE); break; -extern char *modpath; extern char *portroot; extern int verbose; extern int quiet; diff --git a/main.c b/main.c index 944950e..bf86c49 100644 --- a/main.c +++ b/main.c @@ -24,7 +24,6 @@ /* variables to control runtime behavior */ char *module_name = NULL; -char *modpath = NULL; int verbose = 0; int quiet = 0; char pretend = 0; diff --git a/man/q.1 b/man/q.1 index 92794a2..4d0b352 100644 --- a/man/q.1 +++ b/man/q.1 @@ -19,9 +19,6 @@ no longer necessary to initialise the cache at any time. \fB\-i\fR, \fB\-\-install\fR Install symlinks for applets. .TP -\fB\-M\fR \fI\fR, \fB\-\-modpath\fR \fI\fR -Module path. -.TP \fB\-\-root\fR \fI\fR Set the ROOT env var. .TP diff --git a/q.c b/q.c index b6486ee..6307658 100644 --- a/q.c +++ b/q.c @@ -21,15 +21,13 @@ #include "basename.h" -#define Q_FLAGS "iM:" COMMON_FLAGS +#define Q_FLAGS "i" COMMON_FLAGS static struct option const q_long_opts[] = { {"install", no_argument, NULL, 'i'}, - {"modpath",a_argument, NULL, 'M'}, COMMON_LONG_OPTS }; static const char * const q_opts_help[] = { "Install symlinks for applets", - "Module path", COMMON_OPTS_HELP }; #define q_usage(ret) usage(ret, Q_FLAGS, q_long_opts, q_opts_help, NULL, lookup_applet_idx("q")) @@ -95,7 +93,6 @@ int q_main(int argc, char **argv) while ((i = GETOPT_LONG(Q, q, "+")) != -1) { switch (i) { COMMON_GETOPTS_CASES(q) - case 'M': modpath = optarg; break; case 'i': install = 1; break; } }
[gentoo-commits] proj/portage-utils:master commit in: man/, /, man/include/
commit: 5531d5c97a27c002abfcc1bd229d0716bba4b2e3 Author: Fabian Groffen gentoo org> AuthorDate: Fri May 17 14:34:09 2019 + Commit: Fabian Groffen gentoo org> CommitDate: Fri May 17 14:34:09 2019 + URL:https://gitweb.gentoo.org/proj/portage-utils.git/commit/?id=5531d5c9 qfile: allow matching basenames to objects by default one can now do qfile qfile to find app-portage/portage-utils updated the manpage somewhat Signed-off-by: Fabian Groffen gentoo.org> man/include/qfile-01-owners.include | 30 ++- man/include/qfile-02-orphans.include| 15 +++--- man/include/qfile-03-ROOT.include | 20 man/include/qfile-05-collisions.include | 8 +-- man/include/qfile.desc | 23 + man/include/qfile.optdesc.yaml | 4 ++ man/qfile.1 | 88 - qfile.c | 35 - 8 files changed, 140 insertions(+), 83 deletions(-) diff --git a/man/include/qfile-01-owners.include b/man/include/qfile-01-owners.include index a4bdc76..39b1e03 100644 --- a/man/include/qfile-01-owners.include +++ b/man/include/qfile-01-owners.include @@ -1,16 +1,14 @@ .SH "FINDING FILE OWNERS" .PP -This is the default behavior of \fBqfile\fP. It will list the packages which -own the files (or directories, or symlinks, or anything else Portage can -install) you are querying. Query items may be file paths or simple file -names when the \fB\-b\fP option is used. -By default, output includes packages names and the complete paths to -the matching files. If using \fB\-\-exact\fP, versions of the packages will -also be shown. At the contrary, when using \fB\-\-quiet\fP, only package -names are listed, without files paths. Finally, \fB\-\-verbose\fP is similar -to \fB\-\-exact\fP, but may add a few warnings. The return status of -\fBqfile\fP will be \fI0\fP as soon as an owning package has been found for -one of the query items. +This is the default behavior of \fBqfile\fP. It will list the packages +which own the files (or directories, or symlinks, or anything else +Portage can install) you are querying. Query items may be file paths or +simple file names. By default, output includes packages names and the +complete paths to the matching files. If using \fB\-\-verbose\fP, +versions of the packages will also be shown. In contrast, when using +\fB\-\-quiet\fP, only package names are listed, without files paths. +The return status of \fBqfile\fP will be \fI0\fP as soon as an owning +package has been found for one of the query items. .PP Find names of package(s) owning "/bin/bash": .nf\fI @@ -20,17 +18,17 @@ Find names of package(s) owning "/bin/bash": .PP Find package(s) owning any file named "bash", and show paths of this files: .nf\fI - $ qfile -b bash - app-shells/bash (/bin/bash) - app-shells/bash (/etc/bash) + $ qfile -d bash + app-shells/bash: /bin/bash + app-shells/bash: /etc/bash .fi .PP Find packages(s) owning the file named "bash" in the current directory. Also display their exact version: .nf\fI $ cd /bin - $ qfile -e ./bash - app-shells/bash-3.1_p17 (/bin/bash) + $ qfile -v ./bash + app-shells/bash-3.1_p17: /bin/bash .fi .PP Find the package(s) owning the libraries needed by the Bash binary: diff --git a/man/include/qfile-02-orphans.include b/man/include/qfile-02-orphans.include index ca23796..f6754aa 100644 --- a/man/include/qfile-02-orphans.include +++ b/man/include/qfile-02-orphans.include @@ -1,13 +1,12 @@ .SH "FINDING ORPHAN FILES" .PP -\fBqfile\fP can also, with the \fB\-\-orphans\fP option, find files which are -not owned by any package. This behavior is the opposite of the usual file -owner search: the output is the list of query items for which no reference has -been found in your installed packages database. The \fB\-\-exact\fP option has -no effect in this mode, whereas \fB\-\-verbose\fP may add a few warning -messages. As for \fB\-\-quiet\fP, it will completly turn off the output, -leaving just a silent test command, which returns \fI0\fP if and only if -there was no orphan in your query items. +\fBqfile\fP can also, with the \fB\-\-orphans\fP option, find files +which are not owned by any package. This behaviour is the opposite of +the usual file owner search: the output is the list of query items for +which no reference has been found in your installed packages database. +As for \fB\-\-quiet\fP, it will completly turn off the output, leaving +just a silent test command, which returns \fI0\fP if and only if there +was no orphan in your query items. .PP Find the orphan libtool files of your system: .nf\fI diff --git a/man/include/qfile-03-ROOT.include b/man/include/qfile-03-ROOT.include index 61d965d..3bfbe51 100644 --- a/man/include/qfile-03-ROOT.include +++ b/man/include/qfile-03-ROOT.include @@ -1,7 +1,7 @@ .SH "$ROOT HANDLING" .PP
[gentoo-commits] proj/portage-utils:master commit in: man/include/, man/
commit: e7fd910eb6b95031261d4f8878bc97ca7818a9e2 Author: Fabian Groffen gentoo org> AuthorDate: Fri May 17 11:54:55 2019 + Commit: Fabian Groffen gentoo org> CommitDate: Fri May 17 11:54:55 2019 + URL:https://gitweb.gentoo.org/proj/portage-utils.git/commit/?id=e7fd910e man/q: document -r/-m (cache) opts were removed Signed-off-by: Fabian Groffen gentoo.org> man/include/q.desc | 8 man/q.1| 9 - 2 files changed, 16 insertions(+), 1 deletion(-) diff --git a/man/include/q.desc b/man/include/q.desc new file mode 100644 index 000..7109c46 --- /dev/null +++ b/man/include/q.desc @@ -0,0 +1,8 @@ +.I q +is a collection of utilities for use with Gentoo systems regarding +installed and available packages. +.P +After version 0.74 of portage-utils, the cache functionality was removed +in favour of using various trees directly, and optionally the caches +therein. As such the \fB-r\fR and \fB-m\fR options were removed. It is +no longer necessary to initialise the cache at any time. diff --git a/man/q.1 b/man/q.1 index cbf2303..92794a2 100644 --- a/man/q.1 +++ b/man/q.1 @@ -6,7 +6,14 @@ q \- invoke a portage utility applet .B q \fI \fR .SH DESCRIPTION - +.I q +is a collection of utilities for use with Gentoo systems regarding +installed and available packages. +.P +After version 0.74 of portage-utils, the cache functionality was removed +in favour of using various trees directly, and optionally the caches +therein. As such the \fB-r\fR and \fB-m\fR options were removed. It is +no longer necessary to initialise the cache at any time. .SH OPTIONS .TP \fB\-i\fR, \fB\-\-install\fR
[gentoo-commits] proj/portage-utils:master commit in: man/
commit: 81d01d49107d5eaabab447da400983cc38e21d91 Author: Fabian Groffen gentoo org> AuthorDate: Fri May 17 11:54:20 2019 + Commit: Fabian Groffen gentoo org> CommitDate: Fri May 17 11:54:20 2019 + URL:https://gitweb.gentoo.org/proj/portage-utils.git/commit/?id=81d01d49 man/mkman: don't use yaml.load(), bug #659348 Signed-off-by: Fabian Groffen gentoo.org> man/mkman.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/man/mkman.py b/man/mkman.py index 8c7fc9d..ff11e0b 100755 --- a/man/mkman.py +++ b/man/mkman.py @@ -84,7 +84,7 @@ def MkMan(applets, applet, output): desc_file = os.path.join(FRAGS_DIR, '%s.optdesc.yaml' % applet) if os.path.exists(desc_file): with open(desc_file) as fh: -optdescs = yaml.load(fh) +optdescs = yaml.safe_load(fh) # Extract all the options options = []
[gentoo-commits] proj/portage-utils:master commit in: /, man/include/, man/
commit: 659a6f66ea87ba72faab6d24006987c16316cd82 Author: Fabian Groffen gentoo org> AuthorDate: Tue May 14 20:19:17 2019 + Commit: Fabian Groffen gentoo org> CommitDate: Tue May 14 20:19:17 2019 + URL:https://gitweb.gentoo.org/proj/portage-utils.git/commit/?id=659a6f66 qdepends: allow querying ebuild trees Signed-off-by: Fabian Groffen gentoo.org> TODO.md | 2 - man/include/qdepends.desc | 4 +- man/include/qdepends.optdesc.yaml | 3 +- man/qdepends.1| 13 +++-- qdepends.c| 109 +++--- 5 files changed, 104 insertions(+), 27 deletions(-) diff --git a/TODO.md b/TODO.md index ccff6e0..88d232f 100644 --- a/TODO.md +++ b/TODO.md @@ -59,9 +59,7 @@ # qdepends -- support querying uninstalled packages (via libq/cache) - add -S/-v/-R behavior like qlist #574934 -- support printing full dep content (with -v?) from libq/cache - bring back -k? (but seems solved by using qlist -IF%{SLOT} pkg) # qpkg diff --git a/man/include/qdepends.desc b/man/include/qdepends.desc index b9954c9..19000d0 100644 --- a/man/include/qdepends.desc +++ b/man/include/qdepends.desc @@ -12,8 +12,8 @@ option. .P Currently, .I qdepends -will only query installed packages. There is no support for -querying packages not yet installed (see \fBequery\fR(1) for that). +defaults to query installed packages. To query packages from ebuild +trees, use the \fB-t\fR option. .P 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 diff --git a/man/include/qdepends.optdesc.yaml b/man/include/qdepends.optdesc.yaml index f317227..0c8ef6b 100644 --- a/man/include/qdepends.optdesc.yaml +++ b/man/include/qdepends.optdesc.yaml @@ -25,6 +25,7 @@ format: | verbose: | Pretty-print atoms output, per DEPEND-variable. This is much like the \fB-f\fR option, but uses as input the dependency info from the -matches. +matches. When used with \fB-t\fR, the atom highlighting matches +what is used by the installed package, if available. quiet: Suppress DEPEND= output for \fB\-f\fR. Only print the matching atom for \fB\-Q\fR. diff --git a/man/qdepends.1 b/man/qdepends.1 index bee3bc1..d498680 100644 --- a/man/qdepends.1 +++ b/man/qdepends.1 @@ -20,8 +20,8 @@ option. .P Currently, .I qdepends -will only query installed packages. There is no support for -querying packages not yet installed (see \fBequery\fR(1) for that). +defaults to query installed packages. To query packages from ebuild +trees, use the \fB-t\fR option. .P 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 @@ -58,6 +58,12 @@ 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 +\fB\-i\fR, \fB\-\-installed\fR +Search installed packages using VDB. +.TP +\fB\-t\fR, \fB\-\-tree\fR +Search available ebuilds in the tree. +.TP \fB\-F\fR \fI\fR, \fB\-\-format\fR \fI\fR Pretty-print DEPEND declaration to be used in an ebuild. This option initiates a very different mode of operation. Instead of @@ -78,7 +84,8 @@ Set the ROOT env var. \fB\-v\fR, \fB\-\-verbose\fR Pretty-print atoms output, per DEPEND-variable. This is much like the \fB-f\fR option, but uses as input the dependency info from the -matches. +matches. When used with \fB-t\fR, the atom highlighting matches +what is used by the installed package, if available. .TP \fB\-q\fR, \fB\-\-quiet\fR Suppress DEPEND= output for \fB\-f\fR. Only print the matching atom for \fB\-Q\fR. diff --git a/qdepends.c b/qdepends.c index 15d5253..4e6fd43 100644 --- a/qdepends.c +++ b/qdepends.c @@ -22,13 +22,15 @@ #include "xasprintf.h" #include "xregex.h" -#define QDEPENDS_FLAGS "drpbQF:S" COMMON_FLAGS +#define QDEPENDS_FLAGS "drpbQitF:S" 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'}, {"query", no_argument, NULL, 'Q'}, + {"installed", no_argument, NULL, 'i'}, + {"tree", no_argument, NULL, 't'}, {"format", a_argument, NULL, 'F'}, {"pretty",no_argument, NULL, 'S'}, COMMON_LONG_OPTS @@ -39,6 +41,8 @@ static const char * const qdepends_opts_help[] = { "Show PDEPEND info", "Show BDEPEND info", "Query reverse deps", + "Search installed packages using VDB", + "Search available ebuilds in the tree", "Print matched atom using given format string", "Pretty format specified depend strings", COMMON_OPTS_HELP @@ -54,12 +
[gentoo-commits] proj/portage-utils:master commit in: man/, /, man/include/
commit: 966de456d8af3b5102950e608a771f776efdd014 Author: Fabian Groffen gentoo org> AuthorDate: Mon May 13 13:37:31 2019 + Commit: Fabian Groffen gentoo org> CommitDate: Mon May 13 13:37:31 2019 + URL:https://gitweb.gentoo.org/proj/portage-utils.git/commit/?id=966de456 qlop: support -q to omit timestamps Allow -q to suppress timestamps and operation markers (<<<, >>> and ***) such that one can generate a flat list of atoms. A bit awkward, but combining -q *and* -v will result in atoms with PF (iso PN). Signed-off-by: Fabian Groffen gentoo.org> TODO.md | 5 - man/include/qlop.optdesc.yaml | 4 man/qlop.1| 2 +- qlop.c| 24 +--- 4 files changed, 26 insertions(+), 9 deletions(-) diff --git a/TODO.md b/TODO.md index f410f54..ccff6e0 100644 --- a/TODO.md +++ b/TODO.md @@ -75,11 +75,6 @@ - make it use standard xarray instead of its own buf\_list -# qlop - -- have a mode that doesn't print timestamp (to get just atoms, -v should - work) - # qlist - have -F for use with -I so one can do things like print SLOT for package X diff --git a/man/include/qlop.optdesc.yaml b/man/include/qlop.optdesc.yaml index 677c4d2..19f56db 100644 --- a/man/include/qlop.optdesc.yaml +++ b/man/include/qlop.optdesc.yaml @@ -42,6 +42,10 @@ current: | in order to detect running merges. verbose: | Print package versions and revisions (PF) instead of package (PN). +quiet: +Omit printing of timestamps and operation symbols, can be used to +generate a flat list of atoms, e.g.\ \fB-qml\fR to print the package +names merged in the last emerge operation. running: | Print operations currently in progress. An ETA is calculated based on the average for the operation. If the elapsed exceeds the diff --git a/man/qlop.1 b/man/qlop.1 index ae40fa7..6303eee 100644 --- a/man/qlop.1 +++ b/man/qlop.1 @@ -116,7 +116,7 @@ Set the ROOT env var. Print package versions and revisions (PF) instead of package (PN). .TP \fB\-q\fR, \fB\-\-quiet\fR -Tighter output; suppress warnings. +Omit printing of timestamps and operation symbols, can be used to generate a flat list of atoms, e.g.\ \fB-qml\fR to print the package names merged in the last emerge operation. .TP \fB\-C\fR, \fB\-\-nocolor\fR Don't output color. diff --git a/qlop.c b/qlop.c index 5217638..11bbbc3 100644 --- a/qlop.c +++ b/qlop.c @@ -506,7 +506,13 @@ static int do_emerge_log( sync_start = 0; /* reset */ continue; } - if (flags->do_time) { + if (quiet) { + printf("%s%s%s%s%s\n", + GREEN, p, NORM, + flags->do_time ? ": " : "", + flags->do_time ? + fmt_elapsedtime(flags, elapsed) : ""); + } else if (flags->do_time) { printf("%s *** %s%s%s: %s\n", fmt_date(flags, sync_start, tstart), GREEN, p, NORM, @@ -607,7 +613,13 @@ static int do_emerge_log( } break; } - if (flags->do_time) { + if (quiet && !flags->do_average) { + printf("%s%s%s\n", + atom_format(afmt, pkgw->atom, 0), + flags->do_time ? ": " : "", + flags->do_time ? + fmt_elapsedtime(flags, elapsed) : ""); + } else if (flags->do_time) { printf("%s >>> %s: %s\n", fmt_date(flags, pkgw->tbegin, tstart), atom_format(afmt, pkgw->atom, 0), @@ -706,7 +718,13 @@ static int do_emerge_log( } break; } - if (flags->do_time) { + if (quiet && !flags->do_average) { + printf("%s%s%s\n", +
[gentoo-commits] proj/portage-utils:master commit in: man/, man/include/, /
commit: 7854ca6d12f793f3b516373784831131db36bca9 Author: Fabian Groffen gentoo org> AuthorDate: Mon May 13 12:56:30 2019 + Commit: Fabian Groffen gentoo org> CommitDate: Mon May 13 12:56:30 2019 + URL:https://gitweb.gentoo.org/proj/portage-utils.git/commit/?id=7854ca6d qlop: add mode for listing last emerge contents add -l flag to list packages/sync from last emerge operation and make it default (when no flags are given) Signed-off-by: Fabian Groffen gentoo.org> TODO.md | 2 -- man/include/qlop.desc | 5 ++-- man/include/qlop.optdesc.yaml | 3 +++ man/qlop.1| 9 +-- qlop.c| 62 --- 5 files changed, 60 insertions(+), 21 deletions(-) diff --git a/TODO.md b/TODO.md index 7df8983..58ea4c5 100644 --- a/TODO.md +++ b/TODO.md @@ -83,8 +83,6 @@ - have a mode that doesn't print timestamp (to get just atoms, -v should work) -- make a -d mode that allows to do equivalent of "last portage emerge" - to make it easy to see what was newly merged/unmerged # qlist - have -F for use with -I so one can do things like print SLOT for diff --git a/man/include/qlop.desc b/man/include/qlop.desc index 0c14e00..3505173 100644 --- a/man/include/qlop.desc +++ b/man/include/qlop.desc @@ -2,9 +2,10 @@ reads from $EMERGE_LOG_DIR/emerge.log and tries to extract information about merges, unmerges and syncs. It can calculate average merge times or just list them. When given no -arguments or just \fB-v\fR, \fIqlop\fR acts as if \fB-must\fR was given +arguments or just \fB-v\fR, \fIqlop\fR acts as if \fB-slumt\fR was given and thus lists the time taken for all occurrances of merges, unmerges -and sync operations found in the log. +and sync operations found in the log for the last \fBemerge\fR(1) action +performed by Portage. .P By default, packages are printed as CATEGORY/PN. Use \fB-v\fR to print the package version and revision numbers, e.g\. CATEGORY/PF. Note that diff --git a/man/include/qlop.optdesc.yaml b/man/include/qlop.optdesc.yaml index 25143b2..677c4d2 100644 --- a/man/include/qlop.optdesc.yaml +++ b/man/include/qlop.optdesc.yaml @@ -21,6 +21,9 @@ date: | .IP FORMAT|DATE Use \fIFORMAT\fR as input for \fBstrptime\fR(3) to parse \fIDATE\fR. .RE +lastmerge: | +Limit selection to last Portage emerge action. This option is a +dynamic version of \fB-d\fR, and hence both cannot be used together. time: | Show the time it took to merge, unmerge or sync. average: | diff --git a/man/qlop.1 b/man/qlop.1 index 83b62f8..ae40fa7 100644 --- a/man/qlop.1 +++ b/man/qlop.1 @@ -10,9 +10,10 @@ qlop \- emerge log analyzer reads from $EMERGE_LOG_DIR/emerge.log and tries to extract information about merges, unmerges and syncs. It can calculate average merge times or just list them. When given no -arguments or just \fB-v\fR, \fIqlop\fR acts as if \fB-must\fR was given +arguments or just \fB-v\fR, \fIqlop\fR acts as if \fB-slumt\fR was given and thus lists the time taken for all occurrances of merges, unmerges -and sync operations found in the log. +and sync operations found in the log for the last \fBemerge\fR(1) action +performed by Portage. .P By default, packages are printed as CATEGORY/PN. Use \fB-v\fR to print the package version and revision numbers, e.g\. CATEGORY/PF. Note that @@ -98,6 +99,10 @@ Seconds since 1970-01-01 00:00:00 + (UTC), the UNIX epoch. Use \fIFORMAT\fR as input for \fBstrptime\fR(3) to parse \fIDATE\fR. .RE .TP +\fB\-l\fR, \fB\-\-lastmerge\fR +Limit selection to last Portage emerge action. This option is a +dynamic version of \fB-d\fR, and hence both cannot be used together. +.TP \fB\-f\fR \fI\fR, \fB\-\-logfile\fR \fI\fR Read emerge logfile instead of $EMERGE_LOG_DIR/emerge.log. .TP diff --git a/qlop.c b/qlop.c index a60e5ac..5217638 100644 --- a/qlop.c +++ b/qlop.c @@ -24,7 +24,7 @@ #define QLOP_DEFAULT_LOGFILE "emerge.log" -#define QLOP_FLAGS "ctaHMmuUserd:f:w:" COMMON_FLAGS +#define QLOP_FLAGS "ctaHMmuUslerd:f:w:" COMMON_FLAGS static struct option const qlop_long_opts[] = { {"summary", no_argument, NULL, 'c'}, {"time", no_argument, NULL, 't'}, @@ -38,6 +38,7 @@ static struct option const qlop_long_opts[] = { {"endtime", no_argument, NULL, 'e'}, {"running", no_argument, NULL, 'r'}, {"date", a_argument, NULL, 'd'}, + {"lastmerge", no_argument, NULL, 'l'}, {"logfile",a_argument, NULL, 'f'}, {"atoms", a_argument, NULL, 'w'}, COMMON_LONG_OPTS @@ -55,6 +56,7 @@ static const char * const qlop_opts_help[] = { "Report time at which the operation finished (iso started)", "Show current emerging packages", "Limit selection to this time (1st -d is start, 2nd -d is end)", + "Limit selection to last Portage emerge action", "Read emerge logfile instead of $EMERGE_LOG_
[gentoo-commits] proj/portage-utils:master commit in: /, man/include/, man/, tests/qdepends/
commit: 73915971f03cabcbb64accab0c65a14d01904dd5 Author: Fabian Groffen gentoo org> AuthorDate: Sun May 5 20:04:40 2019 + Commit: Fabian Groffen gentoo org> CommitDate: Sun May 5 20:04:40 2019 + URL:https://gitweb.gentoo.org/proj/portage-utils.git/commit/?id=73915971 qdepends: allow custom formatting This isn't yet fully useful, since information like SLOT, REPO, etc. isn't available in the parsed atoms. Signed-off-by: Fabian Groffen gentoo.org> TODO.md | 2 +- man/include/qdepends.desc | 4 +++- man/qdepends.1| 12 +++- qdepends.c| 43 +++ tests/qdepends/dotest | 2 +- 5 files changed, 31 insertions(+), 32 deletions(-) diff --git a/TODO.md b/TODO.md index e433123..bc4f524 100644 --- a/TODO.md +++ b/TODO.md @@ -10,7 +10,7 @@ - standardize/unify/clean up misc handling of colors define rules: -BOLD CATEGORY/ BLUE PKG GREEN ::REPO NORM [ MAGENTA USE NORM ] +BOLD CATEGORY/ BLUE PKG BKBLUE -VER YELLOW :SLOT GREEN ::REPO NORM [ MAGENTA USE NORM ] - remove odd rmspace for each string in libq/set.c (allows a lot less malloc/frees) diff --git a/man/include/qdepends.desc b/man/include/qdepends.desc index 070032e..b9954c9 100644 --- a/man/include/qdepends.desc +++ b/man/include/qdepends.desc @@ -27,4 +27,6 @@ dependencies for the package are shown. When colours are enabled, the matched atom is highlighted in the list. In addition to just querying DEPEND, the default mode changed to query all DEPEND-variables, and return the unique atoms found in them. Automatic regular expression -match support was removed. +match support was removed. The \fB-N\fR option was removed, as the same +effect can be achieved via the new \fB-F\fR option or \fB-q\fR option. +The \fB-f\fR option was renamed to \fB-S\fR. diff --git a/man/qdepends.1 b/man/qdepends.1 index 1020b9a..bee3bc1 100644 --- a/man/qdepends.1 +++ b/man/qdepends.1 @@ -35,7 +35,9 @@ dependencies for the package are shown. When colours are enabled, the matched atom is highlighted in the list. In addition to just querying DEPEND, the default mode changed to query all DEPEND-variables, and return the unique atoms found in them. Automatic regular expression -match support was removed. +match support was removed. The \fB-N\fR option was removed, as the same +effect can be achieved via the new \fB-F\fR option or \fB-q\fR option. +The \fB-f\fR option was renamed to \fB-S\fR. .SH OPTIONS .TP \fB\-d\fR, \fB\-\-depend\fR @@ -56,10 +58,7 @@ 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 -\fB\-N\fR, \fB\-\-name\-only\fR -Only show category/package, instead of category/package-version. -.TP -\fB\-f\fR, \fB\-\-format\fR +\fB\-F\fR \fI\fR, \fB\-\-format\fR \fI\fR 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 @@ -70,6 +69,9 @@ 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\-S\fR, \fB\-\-pretty\fR +Pretty format specified depend strings. +.TP \fB\-\-root\fR \fI\fR Set the ROOT env var. .TP diff --git a/qdepends.c b/qdepends.c index 09156f6..9cfe095 100644 --- a/qdepends.c +++ b/qdepends.c @@ -22,15 +22,15 @@ #include "xasprintf.h" #include "xregex.h" -#define QDEPENDS_FLAGS "drpbfNQu" COMMON_FLAGS +#define QDEPENDS_FLAGS "drpbQF:S" 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'}, {"query", no_argument, NULL, 'Q'}, - {"name-only", no_argument, NULL, 'N'}, - {"format",no_argument, NULL, 'f'}, + {"format", a_argument, NULL, 'F'}, + {"pretty",no_argument, NULL, 'S'}, COMMON_LONG_OPTS }; static const char * const qdepends_opts_help[] = { @@ -39,14 +39,12 @@ static const char * const qdepends_opts_help[] = { "Show PDEPEND info", "Show BDEPEND info", "Query reverse deps", - "Only show package name", + "Print matched atom using given format string", "Pretty format specified depend strings", COMMON_OPTS_HELP }; #define qdepends_usage(ret) usage(ret, QDEPENDS_FLAGS, qdepends_long_opts, qdepends_opts_help, NULL, lookup_applet_idx("qdepends")) -static char qdep_name_only = 0; - /* structures / types / etc ... */ struct qdepends_opt_state { unsigned char qmode; @@ -55,6 +53,7 @@ struct qdepends_opt_state { set *udeps; char *depend; size
[gentoo-commits] proj/portage-utils:master commit in: /, man/include/, man/
commit: f4eb959a8a9f7b52d52c7842f53dccff8bea2699 Author: Fabian Groffen gentoo org> AuthorDate: Sun May 5 08:57:41 2019 + Commit: Fabian Groffen gentoo org> CommitDate: Sun May 5 08:57:41 2019 + URL:https://gitweb.gentoo.org/proj/portage-utils.git/commit/?id=f4eb959a qkeyword: add --matchmaint/-m flag, bug #685052 Add option to match against maintainer email address listed in package metadata.xml. Closes: https://bugs.gentoo.org/685052 Signed-off-by: Fabian Groffen gentoo.org> TODO.md | 7 +++ man/include/qkeyword.desc | 11 +++ man/qkeyword.1| 14 ++ qkeyword.c| 21 - 4 files changed, 52 insertions(+), 1 deletion(-) diff --git a/TODO.md b/TODO.md index 0d05670..e433123 100644 --- a/TODO.md +++ b/TODO.md @@ -90,3 +90,10 @@ # quse - make -v only print requested USE-flag when flags given - read VDB on -v to print details about current USE-flag status, bug #656550 + +# qkeyword +- avoid multiple atom\_explode in path traversal + * during qkeyword\_vercmp + * during qkeyword\_results\_cb + * in libq/cache\_read\_metadata +- drop -c argument? it can be fully expressed using -p cat/ diff --git a/man/include/qkeyword.desc b/man/include/qkeyword.desc index 3bbfb43..b7a863c 100644 --- a/man/include/qkeyword.desc +++ b/man/include/qkeyword.desc @@ -1,3 +1,14 @@ \fIqkeyword\fR allows various searches based on KEYWORDS aimed at Gentoo developers. Various modes allow to query which packages would be available, or are candidate for keywording. +.P +By default, the entire tree is traversed. Since this process can be +slow, or result in too many results, the match arguments can be used to +reduce the set of packages evaluated. \fB-p\fR and \fB-c\fR match +package name and category respectively. They can both be used at the +same time, but \fB-p\fR accepts regular atom format, including version +and/or range. Hence, \fB-p\fR can be used to set both category as well +as package in one go. The \fB-m\fR maintainer match, while reducing the +resulting set, is likely to slow down the query processing since the +metadata.xml file has to be read for each package examined. It is best +used in combination with \fB-p\fR or \fB-c\fR. diff --git a/man/qkeyword.1 b/man/qkeyword.1 index d32e771..d91bc77 100644 --- a/man/qkeyword.1 +++ b/man/qkeyword.1 @@ -9,6 +9,17 @@ qkeyword \- list packages based on keywords \fIqkeyword\fR allows various searches based on KEYWORDS aimed at Gentoo developers. Various modes allow to query which packages would be available, or are candidate for keywording. +.P +By default, the entire tree is traversed. Since this process can be +slow, or result in too many results, the match arguments can be used to +reduce the set of packages evaluated. \fB-p\fR and \fB-c\fR match +package name and category respectively. They can both be used at the +same time, but \fB-p\fR accepts regular atom format, including version +and/or range. Hence, \fB-p\fR can be used to set both category as well +as package in one go. The \fB-m\fR maintainer match, while reducing the +resulting set, is likely to slow down the query processing since the +metadata.xml file has to be read for each package examined. It is best +used in combination with \fB-p\fR or \fB-c\fR. .SH OPTIONS .TP \fB\-p\fR \fI\fR, \fB\-\-matchpkg\fR \fI\fR @@ -17,6 +28,9 @@ match pkgname. \fB\-c\fR \fI\fR, \fB\-\-matchcat\fR \fI\fR match catname. .TP +\fB\-m\fR \fI\fR, \fB\-\-matchmaint\fR \fI\fR +match maintainer email from metadata.xml (slow). +.TP \fB\-i\fR, \fB\-\-imlate\fR list packages that can be marked stable on a given arch. .TP diff --git a/qkeyword.c b/qkeyword.c index ffcd6ae..e8fb5d6 100644 --- a/qkeyword.c +++ b/qkeyword.c @@ -28,10 +28,11 @@ /* Required portage-utils stuff */ // -#define QKEYWORD_FLAGS "p:c:idtans" COMMON_FLAGS +#define QKEYWORD_FLAGS "p:c:m:idtans" COMMON_FLAGS static struct option const qkeyword_long_opts[] = { {"matchpkg", a_argument, NULL, 'p'}, {"matchcat", a_argument, NULL, 'c'}, + {"matchmaint", a_argument, NULL, 'm'}, {"imlate", no_argument, NULL, 'i'}, {"dropped", no_argument, NULL, 'd'}, {"testing", no_argument, NULL, 't'}, @@ -43,6 +44,7 @@ static struct option const qkeyword_long_opts[] = { static const char * const qkeyword_opts_help[] = { "match pkgname", "match catname", + "match maintainer email from metadata.xml (slow)", "list packages that can be marked stable on a given arch", "list packages that have dropped keywords on a version bump on a given arch", "list packages that have ~arch versions, but no stable versions on a given arch", @@ -56,6 +58,7 @@ static const char * const qkeyword_opts_help[] = { typedef struct { depend_atom *qatom;
[gentoo-commits] proj/portage-utils:master commit in: man/include/, man/
commit: 3157f0fd47930f8604c6cc668906b3131dcc15d7 Author: Fabian Groffen gentoo org> AuthorDate: Fri May 3 17:20:51 2019 + Commit: Fabian Groffen gentoo org> CommitDate: Fri May 3 17:20:51 2019 + URL:https://gitweb.gentoo.org/proj/portage-utils.git/commit/?id=3157f0fd qkeyword.1: add description Signed-off-by: Fabian Groffen gentoo.org> man/include/qkeyword.desc | 3 +++ man/qkeyword.1| 4 +++- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/man/include/qkeyword.desc b/man/include/qkeyword.desc new file mode 100644 index 000..3bbfb43 --- /dev/null +++ b/man/include/qkeyword.desc @@ -0,0 +1,3 @@ +\fIqkeyword\fR allows various searches based on KEYWORDS aimed at Gentoo +developers. Various modes allow to query which packages would be +available, or are candidate for keywording. diff --git a/man/qkeyword.1 b/man/qkeyword.1 index a575404..d32e771 100644 --- a/man/qkeyword.1 +++ b/man/qkeyword.1 @@ -6,7 +6,9 @@ qkeyword \- list packages based on keywords .B qkeyword \fI[opts] \fR .SH DESCRIPTION - +\fIqkeyword\fR allows various searches based on KEYWORDS aimed at Gentoo +developers. Various modes allow to query which packages would be +available, or are candidate for keywording. .SH OPTIONS .TP \fB\-p\fR \fI\fR, \fB\-\-matchpkg\fR \fI\fR
[gentoo-commits] proj/portage-utils:master commit in: man/, /
commit: 47c13a275a7b76d77e5ac3e3ada5024bfc5372bd Author: Fabian Groffen gentoo org> AuthorDate: Fri May 3 08:47:26 2019 + Commit: Fabian Groffen gentoo org> CommitDate: Fri May 3 08:47:26 2019 + URL:https://gitweb.gentoo.org/proj/portage-utils.git/commit/?id=47c13a27 quse: make -v output faster, format and introduce --repo - improve performance for -v output (listing all use-flags with descriptions per package match) - add -R/--repo flag to print repository next to atom - align USE-flags in -v mode per package Bug: https://bugs.gentoo.org/656550 Signed-off-by: Fabian Groffen gentoo.org> TODO.md| 1 - man/quse.1 | 3 ++ quse.c | 171 + 3 files changed, 131 insertions(+), 44 deletions(-) diff --git a/TODO.md b/TODO.md index 349170f..b70dffc 100644 --- a/TODO.md +++ b/TODO.md @@ -88,5 +88,4 @@ package X # quse -- make -v faster by calling searcg funcs once per package match - make -v only print requested USE-flag when flags given diff --git a/man/quse.1 b/man/quse.1 index 6f0d8d3..ef17c10 100644 --- a/man/quse.1 +++ b/man/quse.1 @@ -25,6 +25,9 @@ Describe the USE flag. \fB\-p\fR \fI\fR, \fB\-\-package\fR \fI\fR Restrict matching to package or category. .TP +\fB\-R\fR, \fB\-\-repo\fR +Show repository the ebuild originates from. +.TP \fB\-\-root\fR \fI\fR Set the ROOT env var. .TP diff --git a/quse.c b/quse.c index fbf61cf..604efdf 100644 --- a/quse.c +++ b/quse.c @@ -26,13 +26,14 @@ #include "xarray.h" #include "xregex.h" -#define QUSE_FLAGS "eaLDp:" COMMON_FLAGS +#define QUSE_FLAGS "eaLDp:R" COMMON_FLAGS static struct option const quse_long_opts[] = { {"exact", no_argument, NULL, 'e'}, {"all", no_argument, NULL, 'a'}, {"license", no_argument, NULL, 'L'}, {"describe", no_argument, NULL, 'D'}, {"package",a_argument, NULL, 'p'}, + {"repo", no_argument, NULL, 'R'}, COMMON_LONG_OPTS }; static const char * const quse_opts_help[] = { @@ -41,6 +42,7 @@ static const char * const quse_opts_help[] = { "Use the LICENSE vs IUSE", "Describe the USE flag", "Restrict matching to package or category", + "Show repository the ebuild originates from", COMMON_OPTS_HELP }; #define quse_usage(ret) usage(ret, QUSE_FLAGS, quse_long_opts, quse_opts_help, NULL, lookup_applet_idx("quse")) @@ -48,12 +50,14 @@ static const char * const quse_opts_help[] = { struct quse_state { int argc; char **argv; + char **retv; const char *overlay; bool do_all:1; bool do_regex:1; bool do_describe:1; bool do_licence:1; bool do_list:1; + bool do_repo:1; depend_atom *match; regex_t *pregv; }; @@ -110,6 +114,9 @@ quse_search_use_local_desc(int portdirfd, struct quse_state *state) match = false; for (i = 0; i < state->argc; i++) { + if (state->do_list && state->retv[i] != NULL) + continue; + if (state->do_regex) { if (regexec(&state->pregv[i], p, 0, NULL, 0) != 0) continue; @@ -128,13 +135,14 @@ quse_search_use_local_desc(int portdirfd, struct quse_state *state) if (state->match == NULL || atom_compare(atom, state->match) == EQUAL) { - if (state->do_list) - printf(" %s%s%s %s\n", MAGENTA, p, NORM, q); - else + if (state->do_list) { + state->retv[i] = xstrdup(q); + } else { printf("%s%s/%s%s%s[%s%s%s] %s\n", BOLD, atom->CATEGORY, BLUE, atom->PN, NORM, MAGENTA, p, NORM, q); + } } atom_implode(atom); @@ -142,6 +150,16 @@ quse_search_use_local_desc(int portdirfd, struct quse_state *state) } } while (1); + if (state->do_list && ret) { + /* check if all requested flags are retrieved */ + ret = true; + for (i = 0; i < state->argc; i++) + if (state->retv[i] == NULL) + break; + if (i < state->argc) + ret = false; + } + fclose(f); return ret; } @@ -186,6 +204,9 @@ quse_search_use_desc(int portdirfd, struct quse_state *state) match = false; for (i = 0; i < state->a
[gentoo-commits] proj/portage-utils:master commit in: man/, /
commit: 6eee66bd91df5928c0fbf1ee9cd2ff8a3f575d89 Author: Fabian Groffen gentoo org> AuthorDate: Thu May 2 18:00:17 2019 + Commit: Fabian Groffen gentoo org> CommitDate: Thu May 2 18:00:17 2019 + URL:https://gitweb.gentoo.org/proj/portage-utils.git/commit/?id=6eee66bd qcache: rename to qkeyword qcache has its roots in reading the metadata cache, but since this is standard functionality provided by libq/cache now, all that qcache does really is things with keywords. Signed-off-by: Fabian Groffen gentoo.org> .gitignore | 4 +- Makefile.am | 6 +-- Makefile.in | 40 TODO.md | 2 - applets.h| 4 +- man/q.1 | 6 +-- man/qatom.1 | 4 +- man/qcheck.1 | 4 +- man/qdepends.1 | 4 +- man/qfile.1 | 4 +- man/qgrep.1 | 4 +- man/{qcache.1 => qkeyword.1} | 6 +-- man/qlist.1 | 4 +- man/qlop.1 | 4 +- man/qmerge.1 | 4 +- man/qpkg.1 | 4 +- man/qsearch.1| 4 +- man/qsize.1 | 4 +- man/qtbz2.1 | 4 +- man/qtegrity.1 | 4 +- man/quse.1 | 2 +- man/qxpak.1 | 4 +- qcache.c => qkeyword.c | 112 +-- 23 files changed, 118 insertions(+), 120 deletions(-) diff --git a/.gitignore b/.gitignore index c571c4e..b65a0fb 100644 --- a/.gitignore +++ b/.gitignore @@ -32,18 +32,18 @@ stamp-h1 /*.old.c /q /qatom -/qcache /qcheck /qdepends /qfile /qglsa /qgrep +/qkeyword /qlist /qlop /qmerge /qpkg /qsearch /qsize +/qtegrity /quse /qxpak -/qtegrity diff --git a/Makefile.am b/Makefile.am index 9306019..b36173c 100644 --- a/Makefile.am +++ b/Makefile.am @@ -10,11 +10,11 @@ SUBDIRS = \ APPLETS = \ q \ qatom \ - qcache \ qcheck \ qdepends \ qfile \ qgrep \ + qkeyword \ qlist \ qlop \ qmerge \ @@ -30,11 +30,11 @@ APPLETS = \ dist_man_MANS = \ man/q.1 \ man/qatom.1 \ - man/qcache.1 \ man/qcheck.1 \ man/qdepends.1 \ man/qfile.1 \ man/qgrep.1 \ + man/qkeyword.1 \ man/qlist.1 \ man/qlop.1 \ man/qmerge.1 \ @@ -52,11 +52,11 @@ q_SOURCES = \ main.c \ q.c \ qatom.c \ - qcache.c \ qcheck.c \ qdepends.c \ qfile.c \ qgrep.c \ + qkeyword.c \ qlist.c \ qlop.c \ qmerge.c \ diff --git a/Makefile.in b/Makefile.in index b211bdd..6af9c8a 100644 --- a/Makefile.in +++ b/Makefile.in @@ -246,8 +246,8 @@ CONFIG_CLEAN_VPATH_FILES = am__installdirs = "$(DESTDIR)$(bindir)" "$(DESTDIR)$(man1dir)" PROGRAMS = $(bin_PROGRAMS) am_q_OBJECTS = q-main.$(OBJEXT) q-q.$(OBJEXT) q-qatom.$(OBJEXT) \ - q-qcache.$(OBJEXT) q-qcheck.$(OBJEXT) q-qdepends.$(OBJEXT) \ - q-qfile.$(OBJEXT) q-qgrep.$(OBJEXT) q-qlist.$(OBJEXT) \ + q-qcheck.$(OBJEXT) q-qdepends.$(OBJEXT) q-qfile.$(OBJEXT) \ + q-qgrep.$(OBJEXT) q-qkeyword.$(OBJEXT) q-qlist.$(OBJEXT) \ q-qlop.$(OBJEXT) q-qmerge.$(OBJEXT) q-qpkg.$(OBJEXT) \ q-qsearch.$(OBJEXT) q-qsize.$(OBJEXT) q-qtbz2.$(OBJEXT) \ q-qtegrity.$(OBJEXT) q-quse.$(OBJEXT) q-qxpak.$(OBJEXT) @@ -1550,11 +1550,11 @@ SUBDIRS = \ APPLETS = \ q \ qatom \ - qcache \ qcheck \ qdepends \ qfile \ qgrep \ + qkeyword \ qlist \ qlop \ qmerge \ @@ -1570,11 +1570,11 @@ APPLETS = \ dist_man_MANS = \ man/q.1 \ man/qatom.1 \ - man/qcache.1 \ man/qcheck.1 \ man/qdepends.1 \ man/qfile.1 \ man/qgrep.1 \ + man/qkeyword.1 \ man/qlist.1 \ man/qlop.1 \ man/qmerge.1 \ @@ -1591,11 +1591,11 @@ q_SOURCES = \ main.c \ q.c \ qatom.c \ - qcache.c \ qcheck.c \ qdepends.c \ qfile.c \ qgrep.c \ + qkeyword.c \ qlist.c \ qlop.c \ qmerge.c \ @@ -1744,11 +1744,11 @@ distclean-compile: @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/q-main.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/q-q.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/q-qatom.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/q-qcache.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/q-qcheck.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/q-qdepends.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/q-qfile.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/q-qgrep.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/q-qkeyword.Po@am__quote@ @
[gentoo-commits] proj/portage-utils:master commit in: man/, tests/quse/, /, man/include/
commit: da9cb1c25e743601521274130e023f82dab1621e Author: Fabian Groffen gentoo org> AuthorDate: Thu May 2 08:27:49 2019 + Commit: Fabian Groffen gentoo org> CommitDate: Thu May 2 08:27:49 2019 + URL:https://gitweb.gentoo.org/proj/portage-utils.git/commit/?id=da9cb1c2 quse: rewrite using libc/cache - dropped -K/KEYWORDS search, this should be done using qkeywords (qcache) - unified colouring/naming packages - added listing per package mode (-v) Signed-off-by: Fabian Groffen gentoo.org> TODO.md | 1 + man/include/quse.desc | 2 +- man/include/quse.optdesc.yaml | 9 +- man/quse.1| 21 +- quse.c| 820 -- tests/quse/dotest | 55 +-- tests/quse/list01.good| 4 +- 7 files changed, 498 insertions(+), 414 deletions(-) diff --git a/TODO.md b/TODO.md index 38778b0..3a3c26a 100644 --- a/TODO.md +++ b/TODO.md @@ -98,3 +98,4 @@ # quse - make -v faster by calling searcg funcs once per package match +- make -v only print requested USE-flag when flags given diff --git a/man/include/quse.desc b/man/include/quse.desc index 7492774..84a4ba2 100644 --- a/man/include/quse.desc +++ b/man/include/quse.desc @@ -1,2 +1,2 @@ -\fIquse\fR searches in ebuilds for a match in IUSE, KEYWORDS or LICENSE. +\fIquse\fR searches in ebuilds for a match in IUSE or LICENSE. It can also search for USE-flags and show their descriptions. diff --git a/man/include/quse.optdesc.yaml b/man/include/quse.optdesc.yaml index 2a3675d..79a98fa 100644 --- a/man/include/quse.optdesc.yaml +++ b/man/include/quse.optdesc.yaml @@ -1,11 +1,6 @@ exact: Search for exact string, e.g.\ do not use regular expression matching. -format: | -Advanced option to manually override the variable searched for in -ebuilds. By default, the search is \fIIUSE=\fR, the \fB\-K\fR and -\fB\-L\fR override that to \fIKEYWORDS=\fR and \fILICENSE=\fR -respectively. This option, sets the search to any variable. Note -that the equals sign is part of the search, and needs to be set. verbose: | -Show problems encountered during parsing. These are mostly +Show descriptions for USE-flags for packages that match the search. +Also shows problems encountered during parsing. These are mostly diagnostic and indicate possible incorrectness in the results. quiet: Ignored for compatibility with other qapplets. diff --git a/man/quse.1 b/man/quse.1 index 6292f8c..bb02306 100644 --- a/man/quse.1 +++ b/man/quse.1 @@ -1,12 +1,12 @@ .\" generated by mkman.py, please do NOT edit! -.TH quse "1" "Apr 2019" "Gentoo Foundation" "quse" +.TH quse "1" "May 2019" "Gentoo Foundation" "quse" .SH NAME quse \- find pkgs using useflags .SH SYNOPSIS .B quse \fI[opts] \fR .SH DESCRIPTION -\fIquse\fR searches in ebuilds for a match in IUSE, KEYWORDS or LICENSE. +\fIquse\fR searches in ebuilds for a match in IUSE or LICENSE. It can also search for USE-flags and show their descriptions. .SH OPTIONS .TP @@ -16,30 +16,21 @@ Search for exact string, e.g.\ do not use regular expression matching. \fB\-a\fR, \fB\-\-all\fR List all ebuilds, don't match anything. .TP -\fB\-K\fR, \fB\-\-keywords\fR -Use the KEYWORDS vs IUSE. -.TP \fB\-L\fR, \fB\-\-license\fR Use the LICENSE vs IUSE. .TP \fB\-D\fR, \fB\-\-describe\fR Describe the USE flag. .TP -\fB\-F\fR \fI\fR, \fB\-\-format\fR \fI\fR -Advanced option to manually override the variable searched for in -ebuilds. By default, the search is \fIIUSE=\fR, the \fB\-K\fR and -\fB\-L\fR override that to \fIKEYWORDS=\fR and \fILICENSE=\fR -respectively. This option, sets the search to any variable. Note -that the equals sign is part of the search, and needs to be set. -.TP -\fB\-N\fR, \fB\-\-name\-only\fR -Only show package name. +\fB\-p\fR \fI\fR, \fB\-\-package\fR \fI\fR +Restrict matching to package or category. .TP \fB\-\-root\fR \fI\fR Set the ROOT env var. .TP \fB\-v\fR, \fB\-\-verbose\fR -Show problems encountered during parsing. These are mostly +Show descriptions for USE-flags for packages that match the search. +Also shows problems encountered during parsing. These are mostly diagnostic and indicate possible incorrectness in the results. .TP \fB\-q\fR, \fB\-\-quiet\fR diff --git a/quse.c b/quse.c index c5f44ed..fbf61cf 100644 --- a/quse.c +++ b/quse.c @@ -18,6 +18,7 @@ #include #include #include +#include #include #include "cache.h" @@ -25,434 +26,565 @@ #include "xarray.h" #include "xregex.h" -/* - quse -CKe -- '-*' {'~',-,}{alpha,amd64,hppa,ia64,ppc,ppc64,sparc,x86} - quse -Ke -- nls -*/ - -#define QUSE_FLAGS "eavKLDF:N" COMMON_FLAGS +#define QUSE_FLAGS "eaLDp:" COMMON_FLAGS static struct option const quse_long_opts[] = { {"exact", no_argument, NULL, 'e'}, {"all", no_argument, NULL, 'a'}, - {"keywords", no_argument, NULL, 'K'}, {"license", no_argument, NULL, 'L
[gentoo-commits] proj/portage-utils:master commit in: man/, /
commit: 92192efb2f621ad13a412d659bb682989a301acc Author: Fabian Groffen gentoo org> AuthorDate: Sun Apr 28 08:50:43 2019 + Commit: Fabian Groffen gentoo org> CommitDate: Sun Apr 28 08:50:43 2019 + URL:https://gitweb.gentoo.org/proj/portage-utils.git/commit/?id=92192efb qgrep: use colours for atom printing, and support -R/--repo use same colour scheme as with qlist, qdepends, etc. support printing repo for ebuilds mode Signed-off-by: Fabian Groffen gentoo.org> man/qgrep.1 | 3 +++ qgrep.c | 43 ++- 2 files changed, 29 insertions(+), 17 deletions(-) diff --git a/man/qgrep.1 b/man/qgrep.1 index 347c88c..34fe54d 100644 --- a/man/qgrep.1 +++ b/man/qgrep.1 @@ -50,6 +50,9 @@ Search in eclasses instead of ebuilds. \fB\-s\fR, \fB\-\-skip\-comments\fR Skip comments lines. .TP +\fB\-R\fR, \fB\-\-repo\fR +Print source repository name for each match (implies -N). +.TP \fB\-S\fR \fI\fR, \fB\-\-skip\fR \fI\fR Skip lines matching . .TP diff --git a/qgrep.c b/qgrep.c index 3950c22..9d78c18 100644 --- a/qgrep.c +++ b/qgrep.c @@ -25,7 +25,7 @@ #include "xchdir.h" #include "xregex.h" -#define QGREP_FLAGS "IiHNclLexJEsS:B:A:" COMMON_FLAGS +#define QGREP_FLAGS "IiHNclLexJEsRS:B:A:" COMMON_FLAGS static struct option const qgrep_long_opts[] = { {"invert-match", no_argument, NULL, 'I'}, {"ignore-case", no_argument, NULL, 'i'}, @@ -39,6 +39,7 @@ static struct option const qgrep_long_opts[] = { {"installed", no_argument, NULL, 'J'}, {"eclass",no_argument, NULL, 'E'}, {"skip-comments", no_argument, NULL, 's'}, + {"repo", no_argument, NULL, 'R'}, {"skip", a_argument, NULL, 'S'}, {"before", a_argument, NULL, 'B'}, {"after", a_argument, NULL, 'A'}, @@ -57,6 +58,7 @@ static const char * const qgrep_opts_help[] = { "Search in installed ebuilds instead of the tree", "Search in eclasses instead of ebuilds", "Skip comments lines", + "Print source repository name for each match (implies -N)", "Skip lines matching ", "Print lines of leading context", "Print lines of trailing context", @@ -198,6 +200,7 @@ struct qgrep_grepargs { bool do_list:1; bool show_filename:1; bool show_name:1; + bool show_repo:1; bool skip_comments:1; bool invert_list:1; bool invert_match:1; @@ -421,7 +424,10 @@ qgrep_cache_cb(cache_pkg_ctx *pkg_ctx, void *priv) label = NULL; if (data->show_name) { - snprintf(name, sizeof(name), "%s/%s", patom->CATEGORY, patom->P); + char *repo = data->show_repo ? cctx->repo : NULL; + snprintf(name, sizeof(name), "%s%s/%s%s%s%s%s%s", + BOLD, patom->CATEGORY, BLUE, patom->P, GREEN, + repo ? "::" : "", repo ? repo : "", NORM); label = name; } else if (data->show_filename) { label = buf; @@ -473,7 +479,8 @@ qgrep_vdb_cb(q_vdb_pkg_ctx *pkg_ctx, void *priv) label = NULL; if (data->show_name) { - snprintf(name, sizeof(name), "%s/%s", patom->CATEGORY, patom->P); + snprintf(name, sizeof(name), "%s%s/%s%s%s", + BOLD, patom->CATEGORY, BLUE, patom->P, NORM); label = name; } else if (data->show_filename) { label = buf; @@ -523,25 +530,26 @@ int qgrep_main(int argc, char **argv) while ((i = GETOPT_LONG(QGREP, qgrep, "")) != -1) { switch (i) { - case 'I': args.invert_match = 1; break; + case 'I': args.invert_match = true; break; case 'i': args.strfunc = strcasestr; reflags |= REG_ICASE; break; - case 'c': args.do_count = 1; break; - case 'l': args.do_list = 1; break; - case 'L': args.do_list = args.invert_list = 1; break; - case 'e': args.do_regex = 1; break; + case 'c': args.do_count = true; break; + case 'l': args.do_list = true;break; + case 'L': args.do_list = args.invert_list = true; break; + case 'e': args.do_regex = true; break; case 'x': - args.do_regex = 1; + args.do_regex = true; reflags |= REG_EXTENDED; break; - case 'J': do_installed = 1; break; - case 'E': do_eclass = 1; break; - case 'H': args.show_filename = 1; break; - case 'N': args.show_name = 1; break; - case 's': args.skip_comments = 1; break; - case 'S': args.skip_pattern = optarg;
[gentoo-commits] proj/portage-utils:master commit in: man/include/, man/
commit: 30249c7fa6be35ae2a35fbab6381d2c51b772187 Author: Fabian Groffen gentoo org> AuthorDate: Sun Apr 28 08:00:38 2019 + Commit: Fabian Groffen gentoo org> CommitDate: Sun Apr 28 08:00:38 2019 + URL:https://gitweb.gentoo.org/proj/portage-utils.git/commit/?id=30249c7f man/qgrep: use bold instead of italics for program refs Signed-off-by: Fabian Groffen gentoo.org> man/include/qgrep.desc | 2 +- man/qgrep.1| 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/man/include/qgrep.desc b/man/include/qgrep.desc index 98bcc09..e6bcf43 100644 --- a/man/include/qgrep.desc +++ b/man/include/qgrep.desc @@ -3,4 +3,4 @@ current portage tree and defined additional overlays. Optionally the search is in all eclasses, or just in the ebuilds that are currently installed. To narrow the search, multiple targets can be given using atom syntax. In particular, the trailing slash (/) syntax can be used -to match an entire category. See also \fIqatom\fR(1). +to match an entire category. See also \fBqatom\fR(1). diff --git a/man/qgrep.1 b/man/qgrep.1 index 048e28e..347c88c 100644 --- a/man/qgrep.1 +++ b/man/qgrep.1 @@ -11,7 +11,7 @@ current portage tree and defined additional overlays. Optionally the search is in all eclasses, or just in the ebuilds that are currently installed. To narrow the search, multiple targets can be given using atom syntax. In particular, the trailing slash (/) syntax can be used -to match an entire category. See also \fIqatom\fR(1). +to match an entire category. See also \fBqatom\fR(1). .SH OPTIONS .TP \fB\-I\fR, \fB\-\-invert\-match\fR
[gentoo-commits] proj/portage-utils:master commit in: man/, /, man/include/
commit: c5aba3a0bd055688120dbabb9c3826ed46ffc795 Author: Fabian Groffen gentoo org> AuthorDate: Sun Apr 28 07:57:05 2019 + Commit: Fabian Groffen gentoo org> CommitDate: Sun Apr 28 07:57:05 2019 + URL:https://gitweb.gentoo.org/proj/portage-utils.git/commit/?id=c5aba3a0 qgrep: rewrite using libq/vdb and libq/cache (re)use the traversion logic from libq instead of re-implementing this. Additional benefits are less code and usage of metadata when available. Signed-off-by: Fabian Groffen gentoo.org> applets.h | 2 +- man/include/qgrep.desc | 9 +- man/include/qgrep.optdesc.yaml | 5 +- man/q.1| 2 +- man/qgrep.1| 16 +- qgrep.c| 756 ++--- 6 files changed, 429 insertions(+), 361 deletions(-) diff --git a/applets.h b/applets.h index 5889de6..4dd5bc2 100644 --- a/applets.h +++ b/applets.h @@ -73,7 +73,7 @@ static const struct applet_t { /* {"qglsa", qglsa_main, " ", "check GLSAs against system"}, */ - {"qgrep", qgrep_main, "", "grep in ebuilds"}, + {"qgrep", qgrep_main, " [pkg ...]", "grep in ebuilds"}, {"qlist", qlist_main, "", "list files owned by pkgname"}, {"qlop", qlop_main, "", "emerge log analyzer"}, {"qmerge",qmerge_main,"", "fetch and merge binary package"}, diff --git a/man/include/qgrep.desc b/man/include/qgrep.desc index c95d35a..98bcc09 100644 --- a/man/include/qgrep.desc +++ b/man/include/qgrep.desc @@ -1,3 +1,6 @@ -\fIqgrep\fR searches for a given pattern in all ebuilds of the current -portage tree. Optionally the search is in all eclasses, or just in the -ebuilds that are currently installed. +\fIqgrep\fR searches for a given expression in all ebuilds of the +current portage tree and defined additional overlays. Optionally the +search is in all eclasses, or just in the ebuilds that are currently +installed. To narrow the search, multiple targets can be given using +atom syntax. In particular, the trailing slash (/) syntax can be used +to match an entire category. See also \fIqatom\fR(1). diff --git a/man/include/qgrep.optdesc.yaml b/man/include/qgrep.optdesc.yaml index 87b174e..ad3874d 100644 --- a/man/include/qgrep.optdesc.yaml +++ b/man/include/qgrep.optdesc.yaml @@ -1,5 +1,4 @@ verbose: | -Print multiple matches per files. When this option is given -multiple times, also linenumber are printed for matches next to file -names. +Prefix each matching line with filename (like \fB-H\fR). When this +option is given multiple times, also linenumbers are printed. quiet: Ignored for compatibility with other qapplets. diff --git a/man/q.1 b/man/q.1 index b3e985b..afba24a 100644 --- a/man/q.1 +++ b/man/q.1 @@ -41,7 +41,7 @@ Print version and exit. qcheck: verify integrity of installed packages qdepends: show dependency info qfile : list all pkgs owning files -qgrep : grep in ebuilds +qgrep [pkg ...]: grep in ebuilds qlist: list files owned by pkgname qlop: emerge log analyzer qmerge : fetch and merge binary package diff --git a/man/qgrep.1 b/man/qgrep.1 index 662122d..048e28e 100644 --- a/man/qgrep.1 +++ b/man/qgrep.1 @@ -4,11 +4,14 @@ qgrep \- grep in ebuilds .SH SYNOPSIS .B qgrep -\fI[opts] \fR +\fI[opts] [pkg ...]\fR .SH DESCRIPTION -\fIqgrep\fR searches for a given pattern in all ebuilds of the current -portage tree. Optionally the search is in all eclasses, or just in the -ebuilds that are currently installed. +\fIqgrep\fR searches for a given expression in all ebuilds of the +current portage tree and defined additional overlays. Optionally the +search is in all eclasses, or just in the ebuilds that are currently +installed. To narrow the search, multiple targets can be given using +atom syntax. In particular, the trailing slash (/) syntax can be used +to match an entire category. See also \fIqatom\fR(1). .SH OPTIONS .TP \fB\-I\fR, \fB\-\-invert\-match\fR @@ -60,9 +63,8 @@ Print lines of trailing context. Set the ROOT env var. .TP \fB\-v\fR, \fB\-\-verbose\fR -Print multiple matches per files. When this option is given -multiple times, also linenumber are printed for matches next to file -names. +Prefix each matching line with filename (like \fB-H\fR). When this +option is given multiple times, also linenumbers are printed. .TP \fB\-q\fR, \fB\-\-quiet\fR Ignored for compatibility with other qapplets. diff --git a/qgrep.c b/qgrep.c index 16bb4c1..3950c22 100644 --- a/qgrep.c +++ b/qgrep.c @@ -64,35 +64,6 @@ static const char * const qgrep_opts_help[] = { }; #define qgrep_usage(ret) usage(ret, QGREP_FLAGS, qgrep_long_opts, qgrep_opts_help, NULL, lookup_applet_idx("qgrep")) -static char -qgrep_name_match(const char* name, const int argc, depend_atom** a
[gentoo-commits] proj/portage-utils:master commit in: man/
commit: 9122b278974bc7e4705f1a8db1cc16618be2bce2 Author: Fabian Groffen gentoo org> AuthorDate: Thu Apr 25 09:20:19 2019 + Commit: Fabian Groffen gentoo org> CommitDate: Thu Apr 25 09:20:19 2019 + URL:https://gitweb.gentoo.org/proj/portage-utils.git/commit/?id=9122b278 man: regenerate Signed-off-by: Fabian Groffen gentoo.org> man/q.1| 8 +--- man/qcache.1 | 2 +- man/qcheck.1 | 2 +- man/qfile.1| 2 +- man/qgrep.1| 2 +- man/qlop.1 | 2 +- man/qmerge.1 | 2 +- man/qpkg.1 | 3 +-- man/qsearch.1 | 16 ++-- man/qsize.1| 2 +- man/qtbz2.1| 2 +- man/qtegrity.1 | 2 +- man/quse.1 | 3 +-- man/qxpak.1| 3 +-- 14 files changed, 19 insertions(+), 32 deletions(-) diff --git a/man/q.1 b/man/q.1 index c9867c6..b3e985b 100644 --- a/man/q.1 +++ b/man/q.1 @@ -1,5 +1,5 @@ .\" generated by mkman.py, please do NOT edit! -.TH q "1" "Feb 2019" "Gentoo Foundation" "q" +.TH q "1" "Apr 2019" "Gentoo Foundation" "q" .SH NAME q \- invoke a portage utility applet .SH SYNOPSIS @@ -12,12 +12,6 @@ q \- invoke a portage utility applet \fB\-i\fR, \fB\-\-install\fR Install symlinks for applets. .TP -\fB\-r\fR \fI[arg]\fR, \fB\-\-reinitialize\fR \fI[arg]\fR -Reinitialize ebuild cache. -.TP -\fB\-m\fR \fI[arg]\fR, \fB\-\-metacache\fR \fI[arg]\fR -Reinitialize metadata cache. -.TP \fB\-M\fR \fI\fR, \fB\-\-modpath\fR \fI\fR Module path. .TP diff --git a/man/qcache.1 b/man/qcache.1 index a94e5dd..675059e 100644 --- a/man/qcache.1 +++ b/man/qcache.1 @@ -1,5 +1,5 @@ .\" generated by mkman.py, please do NOT edit! -.TH qcache "1" "Feb 2019" "Gentoo Foundation" "qcache" +.TH qcache "1" "Apr 2019" "Gentoo Foundation" "qcache" .SH NAME qcache \- search the metadata cache .SH SYNOPSIS diff --git a/man/qcheck.1 b/man/qcheck.1 index f394418..c139744 100644 --- a/man/qcheck.1 +++ b/man/qcheck.1 @@ -1,5 +1,5 @@ .\" generated by mkman.py, please do NOT edit! -.TH qcheck "1" "Feb 2019" "Gentoo Foundation" "qcheck" +.TH qcheck "1" "Apr 2019" "Gentoo Foundation" "qcheck" .SH NAME qcheck \- verify integrity of installed packages .SH SYNOPSIS diff --git a/man/qfile.1 b/man/qfile.1 index 6bf07c0..5cd297a 100644 --- a/man/qfile.1 +++ b/man/qfile.1 @@ -1,5 +1,5 @@ .\" generated by mkman.py, please do NOT edit! -.TH qfile "1" "Feb 2019" "Gentoo Foundation" "qfile" +.TH qfile "1" "Apr 2019" "Gentoo Foundation" "qfile" .SH NAME qfile \- list all pkgs owning files .SH SYNOPSIS diff --git a/man/qgrep.1 b/man/qgrep.1 index f446c13..662122d 100644 --- a/man/qgrep.1 +++ b/man/qgrep.1 @@ -1,5 +1,5 @@ .\" generated by mkman.py, please do NOT edit! -.TH qgrep "1" "Feb 2019" "Gentoo Foundation" "qgrep" +.TH qgrep "1" "Apr 2019" "Gentoo Foundation" "qgrep" .SH NAME qgrep \- grep in ebuilds .SH SYNOPSIS diff --git a/man/qlop.1 b/man/qlop.1 index f0ef69a..4dd31c1 100644 --- a/man/qlop.1 +++ b/man/qlop.1 @@ -1,5 +1,5 @@ .\" generated by mkman.py, please do NOT edit! -.TH qlop "1" "Mar 2019" "Gentoo Foundation" "qlop" +.TH qlop "1" "Apr 2019" "Gentoo Foundation" "qlop" .SH NAME qlop \- emerge log analyzer .SH SYNOPSIS diff --git a/man/qmerge.1 b/man/qmerge.1 index 0391d5a..d303e45 100644 --- a/man/qmerge.1 +++ b/man/qmerge.1 @@ -1,5 +1,5 @@ .\" generated by mkman.py, please do NOT edit! -.TH qmerge "1" "Feb 2019" "Gentoo Foundation" "qmerge" +.TH qmerge "1" "Apr 2019" "Gentoo Foundation" "qmerge" .SH NAME qmerge \- fetch and merge binary package .SH SYNOPSIS diff --git a/man/qpkg.1 b/man/qpkg.1 index c67b614..17278ec 100644 --- a/man/qpkg.1 +++ b/man/qpkg.1 @@ -1,5 +1,5 @@ .\" generated by mkman.py, please do NOT edit! -.TH qpkg "1" "Feb 2019" "Gentoo Foundation" "qpkg" +.TH qpkg "1" "Apr 2019" "Gentoo Foundation" "qpkg" .SH NAME qpkg \- manipulate Gentoo binpkgs .SH SYNOPSIS @@ -51,7 +51,6 @@ Product: Portage Development; Component: Tools Ned Ludd Mike Frysinger Fabian Groffen -TGL .fi .SH "SEE ALSO" .BR q (1), diff --git a/man/qsearch.1 b/man/qsearch.1 index 04f7d41..1bea7ab 100644 --- a/man/qsearch.1 +++ b/man/qsearch.1 @@ -1,5 +1,5 @@ .\" generated by mkman.py, please do NOT edit! -.TH qsearch "1" "Feb 2019" "Gentoo Foundation" "qsearch" +.TH qsearch "1" "Apr 2019" "Gentoo Foundation" "qsearch" .SH NAME qsearch \- search pkgname/desc .SH SYNOPSIS @@ -14,23 +14,20 @@ all ebuilds in the tree. \fB\-a\fR, \fB\-\-all\fR List the descriptions of every package in the cache. .TP -\fB\-c\fR, \fB\-\-cache\fR -Use the portage cache. -.TP -\fB\-e\fR, \fB\-\-ebuilds\fR -Use the portage ebuild tree (default). -.TP \fB\-s\fR, \fB\-\-search\fR Regex search package basenames. .TP \fB\-S\fR \fI\fR, \fB\-\-desc\fR \fI\fR -Regex search package descriptions. +Regex search package descriptions (or homepage when using -H). .TP \fB\-N\fR, \fB\-\-name\-only\fR Only show package name. .TP \fB\-H\fR, \fB\-\-homepage\fR -Show homepage info. +Show homepage info instead of description. +.TP +\fB\-R\fR, \fB\-\-repo\fR +Sho
[gentoo-commits] proj/portage-utils:master commit in: man/
commit: 13b7387c9288363eeb9dfbc397a2e3859eccbee7 Author: Fabian Groffen gentoo org> AuthorDate: Thu Apr 25 09:18:29 2019 + Commit: Fabian Groffen gentoo org> CommitDate: Thu Apr 25 09:18:29 2019 + URL:https://gitweb.gentoo.org/proj/portage-utils.git/commit/?id=13b7387c man/mkman: fix authors showing up on random pages dropped multiprocessing crap as it complicates and doesn't really speed up anything (I suspected it to be faulty at first, but left it out) the real issue was COMMON_AUTHORS not being copied, therefore any temp additions were done to the common authors list Signed-off-by: Fabian Groffen gentoo.org> man/mkman.py | 19 +-- 1 file changed, 5 insertions(+), 14 deletions(-) diff --git a/man/mkman.py b/man/mkman.py index f578305..8c7fc9d 100755 --- a/man/mkman.py +++ b/man/mkman.py @@ -9,7 +9,6 @@ import datetime import functools import glob import locale -import multiprocessing import os import re import subprocess @@ -71,7 +70,7 @@ def MkMan(applets, applet, output): usage = m.group(1) short_desc = m.group(2) -authors = COMMON_AUTHORS +authors = COMMON_AUTHORS[:] see_also = sorted(['.BR %s (1)' % x for x in applets if x != applet]) description = '' @@ -139,7 +138,7 @@ def MkMan(applets, applet, output): # Handle any fragments this applet has available for frag in sorted(glob.glob(os.path.join(FRAGS_DIR, '%s-*.include' % applet))): with open(frag) as f: -if "-authors." in frag: +if frag.endswith('-authors.include'): authors += [x.rstrip() for x in f.readlines()] else: extra_sections += [x.rstrip() for x in f.readlines()] @@ -159,13 +158,6 @@ def MkMan(applets, applet, output): with open(output, 'w') as f: f.write(TEMPLATE % data) - -def _MkMan(applets, applet): -"""Trampoline to MkMan for multiprocessing pickle""" -output = os.path.join(MKMAN_DIR, '%s.1' % applet) -MkMan(applets, applet, output) - - def main(argv): os.environ['NOCOLOR'] = '1' @@ -174,10 +166,9 @@ def main(argv): # Support file completion like "qfile.1" or "./qdepends.1" applets = [os.path.basename(x).split('.', 1)[0] for x in argv] -p = multiprocessing.Pool() -functor = functools.partial(_MkMan, applets) -p.map(functor, applets) - +for applet in applets: +output = os.path.join(MKMAN_DIR, '%s.1' % applet) +MkMan(applets, applet, output) if __name__ == '__main__': sys.exit(main(sys.argv[1:]))
[gentoo-commits] proj/portage-utils:master commit in: man/include/, /, man/
commit: 26397171ecf098661502d86f9c6cde45ec70d180 Author: Fabian Groffen gentoo org> AuthorDate: Fri Apr 12 18:48:17 2019 + Commit: Fabian Groffen gentoo org> CommitDate: Fri Apr 12 18:48:17 2019 + URL:https://gitweb.gentoo.org/proj/portage-utils.git/commit/?id=26397171 qlist: change behaviour to use colours and no parenthesis - in list mode, show colours by default (can be disabled in the normal way using -C) - in USE-flag mode, don't output ( ) so the output is compatible with e.g. package.use Signed-off-by: Fabian Groffen gentoo.org> man/include/qlist.optdesc.yaml | 9 +++-- man/qlist.1| 11 +-- qlist.c| 31 --- 3 files changed, 24 insertions(+), 27 deletions(-) diff --git a/man/include/qlist.optdesc.yaml b/man/include/qlist.optdesc.yaml index 2b9299c..5fff904 100644 --- a/man/include/qlist.optdesc.yaml +++ b/man/include/qlist.optdesc.yaml @@ -16,9 +16,6 @@ columns: | space-separated columns. verbose: | When used with \fB\-I\fR, print the package version next to name. -When listing the package contents, a single \fB\-v\fR displays -symlinks with an arrow (\->) to their target. Two or more \fB\-v\fR -adds colour to the entries and prints like \fB\-I\fR before the -listing. Shows disabled USE-flags when used with \fB\-U\fR. -quiet: | -Suppresses the parenthesis around the USE-flags when used with \fB\-U\fR. +When listing the package contents, \fB\-v\fR displays symlinks with +an arrow (\->) to their target. Shows disabled USE-flags when used +with \fB\-U\fR. diff --git a/man/qlist.1 b/man/qlist.1 index 4df7dab..0b16318 100644 --- a/man/qlist.1 +++ b/man/qlist.1 @@ -1,5 +1,5 @@ .\" generated by mkman.py, please do NOT edit! -.TH qlist "1" "Mar 2019" "Gentoo Foundation" "qlist" +.TH qlist "1" "Apr 2019" "Gentoo Foundation" "qlist" .SH NAME qlist \- list files owned by pkgname .SH SYNOPSIS @@ -57,13 +57,12 @@ Set the ROOT env var. .TP \fB\-v\fR, \fB\-\-verbose\fR When used with \fB\-I\fR, print the package version next to name. -When listing the package contents, a single \fB\-v\fR displays -symlinks with an arrow (\->) to their target. Two or more \fB\-v\fR -adds colour to the entries and prints like \fB\-I\fR before the -listing. Shows disabled USE-flags when used with \fB\-U\fR. +When listing the package contents, \fB\-v\fR displays symlinks with +an arrow (\->) to their target. Shows disabled USE-flags when used +with \fB\-U\fR. .TP \fB\-q\fR, \fB\-\-quiet\fR -Suppresses the parenthesis around the USE-flags when used with \fB\-U\fR. +Tighter output; suppress warnings. .TP \fB\-C\fR, \fB\-\-nocolor\fR Don't output color. diff --git a/qlist.c b/qlist.c index d46e0a6..313ff56 100644 --- a/qlist.c +++ b/qlist.c @@ -88,11 +88,11 @@ cmpstringp(const void *p1, const void *p2) * -redis -sasl (-selinux) -sqlite -srs -syslog" 0 KiB * * % qlist -IUv exim - * mail-mta/exim-4.92 (-arc -dane -dcc dkim -dlfunc dmarc dnsdb -doc + * mail-mta/exim-4.92 -arc -dane -dcc dkim -dlfunc dmarc dnsdb -doc * -dovecot-sasl -dsn exiscan-acl -gnutls -idn ipv6 -ldap -libressl lmtp * maildir -mbx -mysql -nis pam -perl -pkcs11 -postgres prdr -proxy * -radius -redis -sasl -selinux spf -sqlite -srs ssl -syslog tcpd tpda - * -X) + * -X */ static char _umapstr_buf[BUFSIZ]; static const char * @@ -134,8 +134,7 @@ umapstr(char display, q_vdb_pkg_ctx *pkg_ctx) #define add_to_buf(fmt, Cb, use, Ce) \ bufp += snprintf(bufp, sizeof(_umapstr_buf) - (bufp - _umapstr_buf), \ - " %s%s" fmt "%s", \ - bufp == _umapstr_buf && !quiet ? "(" : "", Cb, use, Ce); + " %s" fmt "%s", Cb, use, Ce); /* merge join, ensure inputs are sorted (Portage does this, but just * to be sure) */ @@ -163,9 +162,6 @@ umapstr(char display, q_vdb_pkg_ctx *pkg_ctx) } } - bufp += snprintf(bufp, sizeof(_umapstr_buf) - (bufp - _umapstr_buf), - "%s", bufp == _umapstr_buf || quiet ? "" : ")"); - freeargv(iuse_argc, iuse_argv); freeargv(use_argc, use_argv); free(iuse); @@ -352,7 +348,8 @@ qlist_cb(q_vdb_pkg_ctx *pkg_ctx, void *priv) /* see if this cat/pkg is requested */ for (i = optind; i < state->argc; ++i) - if (qlist_match(pkg_ctx, state->argv[i], &state->atoms[i - optind], state->exact)) + if (qlist_match(pkg_ctx, state->argv[i], + &state->atoms[i - optind], state->exact)) break; if ((i == state->argc) && (state->argc != optind)) return 0; @@ -362,7 +359,8 @@ qlist_cb(q_vdb_pkg_ctx *pkg_ctx, void *priv) atom = (verbose ? NULL : atom_explode(pkgname)); if ((state->all + state->just_pkgname) < 2) { if (state->show_slots && !
[gentoo-commits] proj/portage-utils:master commit in: /, man/include/, man/
commit: 692759d4e74b958dff78f86a53a3b56f4920a980 Author: Fabian Groffen gentoo org> AuthorDate: Mon Apr 8 08:56:21 2019 + Commit: Fabian Groffen gentoo org> CommitDate: Mon Apr 8 08:56:21 2019 + URL:https://gitweb.gentoo.org/proj/portage-utils.git/commit/?id=692759d4 qdepends: update manpage for rewrite Signed-off-by: Fabian Groffen gentoo.org> man/include/qdepends-05-examples.include | 20 +++- man/include/qdepends.desc| 33 ++ man/include/qdepends.optdesc.yaml| 11 +++-- man/qdepends.1 | 78 qdepends.c | 6 +-- 5 files changed, 79 insertions(+), 69 deletions(-) diff --git a/man/include/qdepends-05-examples.include b/man/include/qdepends-05-examples.include index 04fb92f..d3eac01 100644 --- a/man/include/qdepends-05-examples.include +++ b/man/include/qdepends-05-examples.include @@ -1,25 +1,19 @@ .SH "EXAMPLES" For finding out what a particular package depends on for building, you could do: .nf - $ \fIqdepends nano\fR + $ \fIqdepends -d nano\fR app-editors/nano-2.3.2: >=sys-libs/ncurses-5.9-r1[unicode] sys-apps/file ... .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: +.P +Searching for packages that actually depend on logrotate: .nf - $ \fIqdepends -rQ nano\fR - virtual/editor-0 + $ \fIqdepends -qQ 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 \fB-q\fR flag suppresses the entire list of dependencies here, so we +can quickly see what specific dependency is expressed here. If the above had used \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, \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 +\fB\-Q\fR, \fB\-\-query\fR Query reverse deps. This basically reverses the search to any 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 @@ -50,14 +59,11 @@ search for packages that have \fIlogwatch\fR in their DEPEND. \fB\-N\fR, \fB\-\-name\-only\fR Only show category/package, instead of category/package-version. .TP -\fB\-a\fR, \fB\-\-all\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 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 +statement 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 @@ -68,12 +74,12 @@ e.g.\ the DEPEND= part is skipped. Set the ROOT env var. .TP \fB\-v\fR, \fB\-\-verbose\fR -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. +Pretty-print atoms output, per DEPEND-variable. This is much like +the \fB-f\fR option, but uses as input the dependency info from the +matches. .TP \fB\-q\fR, \fB\-\-quiet\fR -Suppress DEPEND= output for \fB\-f\fR. +Suppress DEPEND= output for \fB\-f\fR. Only print the matching atom for \fB\-Q\fR. .TP \fB\-C\fR, \fB\-\-nocolor\fR Don't output color. @@ -86,25 +92,19 @@ Print version and exit. .SH "EXAMPLES" For finding out what a particular package depends on for building, you could do: .nf - $ \fIqdepends nano\fR + $ \fIqdepends -d nano\fR app-editors/nano-2.3.2: >=sys-libs/ncurses-5.9-r1[unicode] sys-apps/file ... .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. +.P +Searching for packages that actually depend on logrotate: .nf - $ \fIqdepends -vrQ logrotate\fR - sys-apps/portage-2.3.18: >=app-admin/logrotate-3.8.0 + $ \fIqdepends -qQ logrotate\fR + sys-apps/portage-2.3.18: !PN : pkgname, NORM, - quiet ? "" : ":"); +
[gentoo-commits] proj/portage-utils:master commit in: man/, /, man/include/
commit: c701892114d5b3eea773ff13f013f4d3a71fa571 Author: Fabian Groffen gentoo org> AuthorDate: Fri Mar 29 16:31:50 2019 + Commit: Fabian Groffen gentoo org> CommitDate: Fri Mar 29 16:31:50 2019 + URL:https://gitweb.gentoo.org/proj/portage-utils.git/commit/?id=c7018921 qlop: support standard date output format in parse_date This allows to cut 'n' paste dates to limit output. Signed-off-by: Fabian Groffen gentoo.org> man/include/qlop.optdesc.yaml | 3 +++ man/qlop.1| 5 - qlop.c| 14 +- 3 files changed, 16 insertions(+), 6 deletions(-) diff --git a/man/include/qlop.optdesc.yaml b/man/include/qlop.optdesc.yaml index a8fae61..25143b2 100644 --- a/man/include/qlop.optdesc.yaml +++ b/man/include/qlop.optdesc.yaml @@ -13,6 +13,9 @@ date: | .IP -MM-DD Big-endian date, with components separated by hyphens, starting with year, followed by month and day of month. +.IP -MM-DDThh:mm:ss +As before, but hours, minutes and seconds added. This is the same +format qlop prints for timestamps. .IP S Seconds since 1970-01-01 00:00:00 + (UTC), the UNIX epoch. .IP FORMAT|DATE diff --git a/man/qlop.1 b/man/qlop.1 index 407c9ea..f0ef69a 100644 --- a/man/qlop.1 +++ b/man/qlop.1 @@ -1,5 +1,5 @@ .\" generated by mkman.py, please do NOT edit! -.TH qlop "1" "Feb 2019" "Gentoo Foundation" "qlop" +.TH qlop "1" "Mar 2019" "Gentoo Foundation" "qlop" .SH NAME qlop \- emerge log analyzer .SH SYNOPSIS @@ -89,6 +89,9 @@ Alias for \fI1 day ago\fR. .IP -MM-DD Big-endian date, with components separated by hyphens, starting with year, followed by month and day of month. +.IP -MM-DDThh:mm:ss +As before, but hours, minutes and seconds added. This is the same +format qlop prints for timestamps. .IP S Seconds since 1970-01-01 00:00:00 + (UTC), the UNIX epoch. .IP FORMAT|DATE diff --git a/qlop.c b/qlop.c index b6970d0..a87cc5c 100644 --- a/qlop.c +++ b/qlop.c @@ -103,17 +103,21 @@ parse_date(const char *sdate, time_t *t) return false; } else { /* Handle automatic formats: -* - "12315128" -> %s -* - "2015-12-24" -> %Y-%m-%d +* - "12315128"-> %s +* - "2015-12-24" -> %Y-%m-%d +* - "2019-03-28T13:52:31" -> %Y-%m-%dT%H:%M:%s" * - human readable format (see below) */ - size_t len = strspn(sdate, "0123456789-"); + size_t len = strspn(sdate, "0123456789-:T"); if (sdate[len] == '\0') { const char *fmt; - if (strchr(sdate, '-') == NULL) + if (strchr(sdate, '-') == NULL) { fmt = "%s"; - else + } else if ((s = strchr(sdate, 'T')) == NULL) { fmt = "%Y-%m-%d"; + } else { + fmt = "%Y-%m-%dT%H:%M:%S"; + } s = strptime(sdate, fmt, &tm); if (s == NULL || s[0] != '\0')
[gentoo-commits] proj/portage-utils:master commit in: man/, /, man/include/
commit: 9ae56f85211d2c7c00b77b836e797339fc76f9b8 Author: Fabian Groffen gentoo org> AuthorDate: Thu Mar 7 18:18:47 2019 + Commit: Fabian Groffen gentoo org> CommitDate: Thu Mar 7 18:18:47 2019 + URL:https://gitweb.gentoo.org/proj/portage-utils.git/commit/?id=9ae56f85 qlist: change -U to display disabled flags with -v reimplement umapstr() to allow printing flags not enabled, this is slightly related to bug #656550. Signed-off-by: Fabian Groffen gentoo.org> man/include/qlist.optdesc.yaml | 2 +- man/qlist.1| 4 +- qlist.c| 183 ++--- 3 files changed, 119 insertions(+), 70 deletions(-) diff --git a/man/include/qlist.optdesc.yaml b/man/include/qlist.optdesc.yaml index a60ef0d..2b9299c 100644 --- a/man/include/qlist.optdesc.yaml +++ b/man/include/qlist.optdesc.yaml @@ -19,6 +19,6 @@ verbose: | When listing the package contents, a single \fB\-v\fR displays symlinks with an arrow (\->) to their target. Two or more \fB\-v\fR adds colour to the entries and prints like \fB\-I\fR before the -listing. +listing. Shows disabled USE-flags when used with \fB\-U\fR. quiet: | Suppresses the parenthesis around the USE-flags when used with \fB\-U\fR. diff --git a/man/qlist.1 b/man/qlist.1 index c2c585c..4df7dab 100644 --- a/man/qlist.1 +++ b/man/qlist.1 @@ -1,5 +1,5 @@ .\" generated by mkman.py, please do NOT edit! -.TH qlist "1" "Feb 2019" "Gentoo Foundation" "qlist" +.TH qlist "1" "Mar 2019" "Gentoo Foundation" "qlist" .SH NAME qlist \- list files owned by pkgname .SH SYNOPSIS @@ -60,7 +60,7 @@ When used with \fB\-I\fR, print the package version next to name. When listing the package contents, a single \fB\-v\fR displays symlinks with an arrow (\->) to their target. Two or more \fB\-v\fR adds colour to the entries and prints like \fB\-I\fR before the -listing. +listing. Shows disabled USE-flags when used with \fB\-U\fR. .TP \fB\-q\fR, \fB\-\-quiet\fR Suppresses the parenthesis around the USE-flags when used with \fB\-U\fR. diff --git a/qlist.c b/qlist.c index 4a3b95a..3ca3f5e 100644 --- a/qlist.c +++ b/qlist.c @@ -43,84 +43,124 @@ static const char * const qlist_opts_help[] = { }; #define qlist_usage(ret) usage(ret, QLIST_FLAGS, qlist_long_opts, qlist_opts_help, NULL, lookup_applet_idx("qlist")) -static char * -grab_pkg_umap(q_vdb_pkg_ctx *pkg_ctx) +static int +cmpstringp(const void *p1, const void *p2) +{ + /* case insensitive comparator */ + return strcasecmp(*((char * const *)p1), *((char * const *)p2)); +} + +/* + * ==> /var/db/pkg/mail-mta/exim-4.92/IUSE <== + * arc dane dcc +dkim dlfunc dmarc +dnsdb doc dovecot-sasl dsn + * elibc_glibc exiscan-acl gnutls idn ipv6 ldap libressl lmtp maildir + * mbx mysql nis pam perl pkcs11 postgres +prdr proxy radius redis sasl + * selinux spf sqlite srs ssl syslog tcpd +tpda X + * + * ==> /var/db/pkg/mail-mta/exim-4.92/PKGUSE <== + * -X dkim dmarc exiscan-acl ipv6 -ldap lmtp maildir -mbox pam -perl spf + * ssl tcpd + * + * ==> /var/db/pkg/mail-mta/exim-4.92/USE <== + * abi_x86_64 amd64 dkim dmarc dnsdb elibc_glibc exiscan-acl ipv6 + * kernel_linux lmtp maildir pam prdr spf ssl tcpd tpda userland_GNU + * + * % emerge -pv exim + * + * These are the packages that would be merged, in order: + * + * Calculating dependencies... done! + * [ebuild R ~] mail-mta/exim-4.92::gentoo USE="dkim dmarc dnsdb + * exiscan-acl ipv6 lmtp maildir pam prdr spf ssl tcpd tpda -X -arc + * -dane -dcc -dlfunc -doc -dovecot-sasl -dsn -gnutls -idn -ldap + * -libressl -mbx -mysql -nis -perl -pkcs11 -postgres -proxy -radius + * -redis -sasl (-selinux) -sqlite -srs -syslog" 0 KiB + * + * % qlist -IUv exim + * mail-mta/exim-4.92 (-arc -dane -dcc dkim -dlfunc dmarc dnsdb -doc + * -dovecot-sasl -dsn exiscan-acl -gnutls -idn ipv6 -ldap -libressl lmtp + * maildir -mbx -mysql -nis pam -perl -pkcs11 -postgres prdr -proxy + * -radius -redis -sasl -selinux spf -sqlite -srs ssl -syslog tcpd tpda + * -X) + */ +static char _umapstr_buf[BUFSIZ]; +static const char * +umapstr(char display, q_vdb_pkg_ctx *pkg_ctx) { - static char umap[BUFSIZ]; - static char *use, *iuse; - static size_t use_len, iuse_len; - int use_argc = 0, iuse_argc = 0; - char **use_argv = NULL, **iuse_argv = NULL; - queue *ll = NULL; - queue *sets = NULL; - int i, u; + char *bufp = _umapstr_buf; + char *use = NULL; + char *iuse = NULL; + size_t use_len; + size_t iuse_len; + int use_argc = 0; + int iuse_argc = 0; + char **use_argv = NULL; + char **iuse_argv = NULL; + int i; + int u; + int d; + + *bufp = '\0'; + if (!display) + return bufp; q_vdb_pkg_eat(pkg_ctx, "USE", &use, &use_len); if (!use[0]) - return NULL; + return bufp; q_vdb_pkg_eat(pkg_ctx, "IUSE", &iuse, &iuse_le
[gentoo-commits] proj/portage-utils:master commit in: man/, /
commit: 951a8711a59b1a7d49125f5f5214ff1ae9e50074 Author: Fabian Groffen gentoo org> AuthorDate: Thu Feb 28 19:27:12 2019 + Commit: Fabian Groffen gentoo org> CommitDate: Thu Feb 28 19:27:12 2019 + URL:https://gitweb.gentoo.org/proj/portage-utils.git/commit/?id=951a8711 qfile: drop non-functional --exact option Bug: https://bugs.gentoo.org/678632 Signed-off-by: Fabian Groffen gentoo.org> man/qfile.1 | 3 --- qfile.c | 11 ++- 2 files changed, 2 insertions(+), 12 deletions(-) diff --git a/man/qfile.1 b/man/qfile.1 index c7f7054..6bf07c0 100644 --- a/man/qfile.1 +++ b/man/qfile.1 @@ -27,9 +27,6 @@ List orphan files. \fB\-x\fR \fI\fR, \fB\-\-exclude\fR \fI\fR Don't look in package (used with --orphans). .TP -\fB\-e\fR, \fB\-\-exact\fR -Exact match (used with --exclude). -.TP \fB\-\-root\fR \fI\fR Set the ROOT env var. .TP diff --git a/qfile.c b/qfile.c index 285277b..6e1cb0a 100644 --- a/qfile.c +++ b/qfile.c @@ -8,14 +8,13 @@ #ifdef APPLET_qfile -#define QFILE_FLAGS "beoRx:S" COMMON_FLAGS +#define QFILE_FLAGS "boRx:S" COMMON_FLAGS static struct option const qfile_long_opts[] = { {"slots", no_argument, NULL, 'S'}, {"root-prefix", no_argument, NULL, 'R'}, {"basename",no_argument, NULL, 'b'}, {"orphans", no_argument, NULL, 'o'}, {"exclude", a_argument, NULL, 'x'}, - {"exact", no_argument, NULL, 'e'}, COMMON_LONG_OPTS }; static const char * const qfile_opts_help[] = { @@ -24,7 +23,6 @@ static const char * const qfile_opts_help[] = { "Match any component of the path", "List orphan files", "Don't look in package (used with --orphans)", - "Exact match (used with --exclude)", COMMON_OPTS_HELP }; #define qfile_usage(ret) usage(ret, QFILE_FLAGS, qfile_long_opts, qfile_opts_help, NULL, lookup_applet_idx("qfile")) @@ -56,7 +54,6 @@ struct qfile_opt_state { depend_atom *exclude_atom; bool slotted; bool basename; - bool exact; bool orphans; bool assume_root_prefix; }; @@ -224,7 +221,7 @@ static int qfile_cb(q_vdb_pkg_ctx *pkg_ctx, void *priv) } else slot[0] = '\0'; printf("%s%s/%s%s%s%s", BOLD, atom->CATEGORY, BLUE, - (state->exact ? pkg_ctx->name : atom->PN), + (verbose ? pkg_ctx->name : atom->PN), slot, NORM); if (quiet) puts(""); @@ -402,7 +399,6 @@ int qfile_main(int argc, char **argv) .buflen = _Q_PATH_MAX, .slotted = false, .basename = false, - .exact = false, .orphans = false, .assume_root_prefix = false, }; @@ -414,7 +410,6 @@ int qfile_main(int argc, char **argv) COMMON_GETOPTS_CASES(qfile) case 'S': state.slotted = true; break; case 'b': state.basename = true; break; - case 'e': state.exact = true; break; case 'o': state.orphans = true; break; case 'R': state.assume_root_prefix = true; break; case 'x': @@ -429,8 +424,6 @@ int qfile_main(int argc, char **argv) break; } } - if (!state.exact && verbose) - state.exact = true; if (argc == optind) qfile_usage(EXIT_FAILURE);
[gentoo-commits] proj/portage-utils:master commit in: man/
commit: 01d4f8ae5983bdab35c146fe6facef57cce6870e Author: Fabian Groffen gentoo org> AuthorDate: Thu Feb 28 18:48:55 2019 + Commit: Fabian Groffen gentoo org> CommitDate: Thu Feb 28 18:48:55 2019 + URL:https://gitweb.gentoo.org/proj/portage-utils.git/commit/?id=01d4f8ae man: regenerate qlop.1 after options change Signed-off-by: Fabian Groffen gentoo.org> man/qlop.1 | 3 +++ 1 file changed, 3 insertions(+) diff --git a/man/qlop.1 b/man/qlop.1 index 4769ecd..407c9ea 100644 --- a/man/qlop.1 +++ b/man/qlop.1 @@ -49,6 +49,9 @@ time for all occurrences found respecting any date limits. Print elapssed time in human readable format. This form uses minutes, hours and days instead of just seconds. .TP +\fB\-M\fR, \fB\-\-machine\fR +Print elapsed time as seconds with no formatting. +.TP \fB\-m\fR, \fB\-\-merge\fR Show merge history. .TP
[gentoo-commits] proj/portage-utils:master commit in: man/
commit: 3bc514d70090fab825e74eb4f8e28a858bd528ba Author: Fabian Groffen gentoo org> AuthorDate: Thu Feb 28 09:40:57 2019 + Commit: Fabian Groffen gentoo org> CommitDate: Thu Feb 28 09:40:57 2019 + URL:https://gitweb.gentoo.org/proj/portage-utils.git/commit/?id=3bc514d7 man: regen after Assignee removal Signed-off-by: Fabian Groffen gentoo.org> man/q.1| 3 +-- man/qatom.1| 3 +-- man/qcache.1 | 3 +-- man/qcheck.1 | 3 +-- man/qdepends.1 | 3 +-- man/qfile.1| 3 +-- man/qgrep.1| 3 +-- man/qlist.1| 3 +-- man/qlop.1 | 5 ++--- man/qmerge.1 | 3 +-- man/qpkg.1 | 3 +-- man/qsearch.1 | 3 +-- man/qsize.1| 3 +-- man/qtbz2.1| 3 +-- man/qtegrity.1 | 3 +-- man/quse.1 | 3 +-- man/qxpak.1| 3 +-- 17 files changed, 18 insertions(+), 35 deletions(-) diff --git a/man/q.1 b/man/q.1 index a5eebb8..c9867c6 100644 --- a/man/q.1 +++ b/man/q.1 @@ -62,8 +62,7 @@ Print version and exit. .SH "REPORTING BUGS" Please report bugs via http://bugs.gentoo.org/ .br -Product: Portage Development; Component: Tools, Assignee: -portage-ut...@gentoo.org +Product: Portage Development; Component: Tools .SH AUTHORS .nf Ned Ludd diff --git a/man/qatom.1 b/man/qatom.1 index d83e6e1..4860957 100644 --- a/man/qatom.1 +++ b/man/qatom.1 @@ -88,8 +88,7 @@ Print version and exit. .SH "REPORTING BUGS" Please report bugs via http://bugs.gentoo.org/ .br -Product: Portage Development; Component: Tools, Assignee: -portage-ut...@gentoo.org +Product: Portage Development; Component: Tools .SH AUTHORS .nf Ned Ludd diff --git a/man/qcache.1 b/man/qcache.1 index c5c80b8..a94e5dd 100644 --- a/man/qcache.1 +++ b/man/qcache.1 @@ -54,8 +54,7 @@ Print version and exit. .SH "REPORTING BUGS" Please report bugs via http://bugs.gentoo.org/ .br -Product: Portage Development; Component: Tools, Assignee: -portage-ut...@gentoo.org +Product: Portage Development; Component: Tools .SH AUTHORS .nf Ned Ludd diff --git a/man/qcheck.1 b/man/qcheck.1 index ac93cbb..f394418 100644 --- a/man/qcheck.1 +++ b/man/qcheck.1 @@ -54,8 +54,7 @@ Print version and exit. .SH "REPORTING BUGS" Please report bugs via http://bugs.gentoo.org/ .br -Product: Portage Development; Component: Tools, Assignee: -portage-ut...@gentoo.org +Product: Portage Development; Component: Tools .SH AUTHORS .nf Ned Ludd diff --git a/man/qdepends.1 b/man/qdepends.1 index 0273999..f5c8c01 100644 --- a/man/qdepends.1 +++ b/man/qdepends.1 @@ -111,8 +111,7 @@ dependency is expressed. .SH "REPORTING BUGS" Please report bugs via http://bugs.gentoo.org/ .br -Product: Portage Development; Component: Tools, Assignee: -portage-ut...@gentoo.org +Product: Portage Development; Component: Tools .SH AUTHORS .nf Ned Ludd diff --git a/man/qfile.1 b/man/qfile.1 index 5b8411e..c7f7054 100644 --- a/man/qfile.1 +++ b/man/qfile.1 @@ -206,8 +206,7 @@ rm -rf "${tmpdir}" .SH "REPORTING BUGS" Please report bugs via http://bugs.gentoo.org/ .br -Product: Portage Development; Component: Tools, Assignee: -portage-ut...@gentoo.org +Product: Portage Development; Component: Tools .SH AUTHORS .nf Ned Ludd diff --git a/man/qgrep.1 b/man/qgrep.1 index d062e99..f446c13 100644 --- a/man/qgrep.1 +++ b/man/qgrep.1 @@ -79,8 +79,7 @@ Print version and exit. .SH "REPORTING BUGS" Please report bugs via http://bugs.gentoo.org/ .br -Product: Portage Development; Component: Tools, Assignee: -portage-ut...@gentoo.org +Product: Portage Development; Component: Tools .SH AUTHORS .nf Ned Ludd diff --git a/man/qlist.1 b/man/qlist.1 index 07275e5..c2c585c 100644 --- a/man/qlist.1 +++ b/man/qlist.1 @@ -77,8 +77,7 @@ Print version and exit. .SH "REPORTING BUGS" Please report bugs via http://bugs.gentoo.org/ .br -Product: Portage Development; Component: Tools, Assignee: -portage-ut...@gentoo.org +Product: Portage Development; Component: Tools .SH AUTHORS .nf Ned Ludd diff --git a/man/qlop.1 b/man/qlop.1 index 46a6f94..4769ecd 100644 --- a/man/qlop.1 +++ b/man/qlop.1 @@ -46,7 +46,7 @@ Calculate average merge, unmerge or sync time. This is the average time for all occurrences found respecting any date limits. .TP \fB\-H\fR, \fB\-\-human\fR -Print elaspsed time in human readable format. This form uses +Print elapssed time in human readable format. This form uses minutes, hours and days instead of just seconds. .TP \fB\-m\fR, \fB\-\-merge\fR @@ -119,8 +119,7 @@ Print version and exit. .SH "REPORTING BUGS" Please report bugs via http://bugs.gentoo.org/ .br -Product: Portage Development; Component: Tools, Assignee: -portage-ut...@gentoo.org +Product: Portage Development; Component: Tools .SH AUTHORS .nf Ned Ludd diff --git a/man/qmerge.1 b/man/qmerge.1 index da36e75..0391d5a 100644 --- a/man/qmerge.1 +++ b/man/qmerge.1 @@ -65,8 +65,7 @@ Print version and exit. .SH "REPORTING BUGS" Please report bugs via http://bugs.gentoo.org/ .br -Product: Portage Development; Component: Tools, Assignee: -portage-ut.
[gentoo-commits] proj/portage-utils:master commit in: man/
commit: 51d8de0e2c01a7f23d06eb2cda8599ccd0159938 Author: Fabian Groffen gentoo org> AuthorDate: Thu Feb 28 09:38:45 2019 + Commit: Fabian Groffen gentoo org> CommitDate: Thu Feb 28 09:38:45 2019 + URL:https://gitweb.gentoo.org/proj/portage-utils.git/commit/?id=51d8de0e mkman: drop Assignee suggestion Usage of a generic alias is no longer allowed (for reasons beyond my understanding), and I don't want to put my own email here, so rely on bugwranglers to make the bugs end up with some assignee. Signed-off-by: Fabian Groffen gentoo.org> man/mkman.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/man/mkman.py b/man/mkman.py index bd3111c..f578305 100755 --- a/man/mkman.py +++ b/man/mkman.py @@ -50,8 +50,7 @@ TEMPLATE = r""".\" generated by mkman.py, please do NOT edit! .SH "REPORTING BUGS" Please report bugs via http://bugs.gentoo.org/ .br -Product: Portage Development; Component: Tools, Assignee: -portage-ut...@gentoo.org +Product: Portage Development; Component: Tools .SH AUTHORS .nf %(authors)s
[gentoo-commits] proj/portage-utils:master commit in: man/
commit: 1502daae3a15488f1e9c7a6dffcfa3f2bd863a41 Author: Fabian Groffen gentoo org> AuthorDate: Tue Feb 5 13:48:31 2019 + Commit: Fabian Groffen gentoo org> CommitDate: Tue Feb 5 13:50:46 2019 + URL:https://gitweb.gentoo.org/proj/portage-utils.git/commit/?id=1502daae man: regen Signed-off-by: Fabian Groffen gentoo.org> man/q.1| 3 +-- man/qatom.1| 2 +- man/qcache.1 | 2 +- man/qcheck.1 | 2 +- man/qfile.1| 2 +- man/qgrep.1| 2 +- man/qlist.1| 2 +- man/qlop.1 | 2 +- man/qmerge.1 | 2 +- man/qpkg.1 | 2 +- man/qsearch.1 | 2 +- man/qsize.1| 2 +- man/qtbz2.1| 2 +- man/qtegrity.1 | 2 +- man/quse.1 | 2 +- man/qxpak.1| 2 +- 16 files changed, 16 insertions(+), 17 deletions(-) diff --git a/man/q.1 b/man/q.1 index b88dd4c..a5eebb8 100644 --- a/man/q.1 +++ b/man/q.1 @@ -1,5 +1,5 @@ .\" generated by mkman.py, please do NOT edit! -.TH q "1" "May 2018" "Gentoo Foundation" "q" +.TH q "1" "Feb 2019" "Gentoo Foundation" "q" .SH NAME q \- invoke a portage utility applet .SH SYNOPSIS @@ -47,7 +47,6 @@ Print version and exit. qcheck: verify integrity of installed packages qdepends: show dependency info qfile : list all pkgs owning files -qglsa : check GLSAs against system qgrep : grep in ebuilds qlist: list files owned by pkgname qlop: emerge log analyzer diff --git a/man/qatom.1 b/man/qatom.1 index f1c985b..d83e6e1 100644 --- a/man/qatom.1 +++ b/man/qatom.1 @@ -1,5 +1,5 @@ .\" generated by mkman.py, please do NOT edit! -.TH qatom "1" "May 2018" "Gentoo Foundation" "qatom" +.TH qatom "1" "Feb 2019" "Gentoo Foundation" "qatom" .SH NAME qatom \- split atom strings .SH SYNOPSIS diff --git a/man/qcache.1 b/man/qcache.1 index fd8a620..c5c80b8 100644 --- a/man/qcache.1 +++ b/man/qcache.1 @@ -1,5 +1,5 @@ .\" generated by mkman.py, please do NOT edit! -.TH qcache "1" "May 2018" "Gentoo Foundation" "qcache" +.TH qcache "1" "Feb 2019" "Gentoo Foundation" "qcache" .SH NAME qcache \- search the metadata cache .SH SYNOPSIS diff --git a/man/qcheck.1 b/man/qcheck.1 index f6f1d26..ac93cbb 100644 --- a/man/qcheck.1 +++ b/man/qcheck.1 @@ -1,5 +1,5 @@ .\" generated by mkman.py, please do NOT edit! -.TH qcheck "1" "May 2018" "Gentoo Foundation" "qcheck" +.TH qcheck "1" "Feb 2019" "Gentoo Foundation" "qcheck" .SH NAME qcheck \- verify integrity of installed packages .SH SYNOPSIS diff --git a/man/qfile.1 b/man/qfile.1 index 6916628..5b8411e 100644 --- a/man/qfile.1 +++ b/man/qfile.1 @@ -1,5 +1,5 @@ .\" generated by mkman.py, please do NOT edit! -.TH qfile "1" "May 2018" "Gentoo Foundation" "qfile" +.TH qfile "1" "Feb 2019" "Gentoo Foundation" "qfile" .SH NAME qfile \- list all pkgs owning files .SH SYNOPSIS diff --git a/man/qgrep.1 b/man/qgrep.1 index 0cc0831..d062e99 100644 --- a/man/qgrep.1 +++ b/man/qgrep.1 @@ -1,5 +1,5 @@ .\" generated by mkman.py, please do NOT edit! -.TH qgrep "1" "May 2018" "Gentoo Foundation" "qgrep" +.TH qgrep "1" "Feb 2019" "Gentoo Foundation" "qgrep" .SH NAME qgrep \- grep in ebuilds .SH SYNOPSIS diff --git a/man/qlist.1 b/man/qlist.1 index 96b201b..07275e5 100644 --- a/man/qlist.1 +++ b/man/qlist.1 @@ -1,5 +1,5 @@ .\" generated by mkman.py, please do NOT edit! -.TH qlist "1" "May 2018" "Gentoo Foundation" "qlist" +.TH qlist "1" "Feb 2019" "Gentoo Foundation" "qlist" .SH NAME qlist \- list files owned by pkgname .SH SYNOPSIS diff --git a/man/qlop.1 b/man/qlop.1 index 8def1f2..bdfe3af 100644 --- a/man/qlop.1 +++ b/man/qlop.1 @@ -1,5 +1,5 @@ .\" generated by mkman.py, please do NOT edit! -.TH qlop "1" "May 2018" "Gentoo Foundation" "qlop" +.TH qlop "1" "Feb 2019" "Gentoo Foundation" "qlop" .SH NAME qlop \- emerge log analyzer .SH SYNOPSIS diff --git a/man/qmerge.1 b/man/qmerge.1 index 56c79e9..da36e75 100644 --- a/man/qmerge.1 +++ b/man/qmerge.1 @@ -1,5 +1,5 @@ .\" generated by mkman.py, please do NOT edit! -.TH qmerge "1" "May 2018" "Gentoo Foundation" "qmerge" +.TH qmerge "1" "Feb 2019" "Gentoo Foundation" "qmerge" .SH NAME qmerge \- fetch and merge binary package .SH SYNOPSIS diff --git a/man/qpkg.1 b/man/qpkg.1 index b5691b1..d6949df 100644 --- a/man/qpkg.1 +++ b/man/qpkg.1 @@ -1,5 +1,5 @@ .\" generated by mkman.py, please do NOT edit! -.TH qpkg "1" "May 2018" "Gentoo Foundation" "qpkg" +.TH qpkg "1" "Feb 2019" "Gentoo Foundation" "qpkg" .SH NAME qpkg \- manipulate Gentoo binpkgs .SH SYNOPSIS diff --git a/man/qsearch.1 b/man/qsearch.1 index f3ae1f5..ffe47a1 100644 --- a/man/qsearch.1 +++ b/man/qsearch.1 @@ -1,5 +1,5 @@ .\" generated by mkman.py, please do NOT edit! -.TH qsearch "1" "May 2018" "Gentoo Foundation" "qsearch" +.TH qsearch "1" "Feb 2019" "Gentoo Foundation" "qsearch" .SH NAME qsearch \- search pkgname/desc .SH SYNOPSIS diff --git a/man/qsize.1 b/man/qsize.1 index d2ea494..88bffe4 100644 --- a/man/qsize.1 +++ b/man/qsize.1 @@ -1,5 +1,5 @@ .\" generated by mkman.py, please do
[gentoo-commits] proj/portage-utils:master commit in: man/, man/include/, /
commit: 5674671e9d7e0e1251561d81a1154dd5d92e60ec Author: Fabian Groffen gentoo org> AuthorDate: Tue Feb 5 13:47:59 2019 + Commit: Fabian Groffen gentoo org> CommitDate: Tue Feb 5 13:50:23 2019 + 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 = dep
[gentoo-commits] proj/portage-utils:master commit in: man/
commit: 3ed4ea7795c32374ba77674d98cecf8e8bc0ff03 Author: Fabian Groffen gentoo org> AuthorDate: Fri May 18 11:15:12 2018 + Commit: Fabian Groffen gentoo org> CommitDate: Fri May 18 11:15:12 2018 + URL:https://gitweb.gentoo.org/proj/portage-utils.git/commit/?id=3ed4ea77 man: regenerate for release man/q.1| 4 +++- man/qatom.1| 3 ++- man/qcache.1 | 3 ++- man/qcheck.1 | 3 ++- man/qdepends.1 | 3 ++- man/qgrep.1| 3 ++- man/qlist.1| 3 ++- man/qlop.1 | 3 ++- man/qmerge.1 | 3 ++- man/qpkg.1 | 4 +++- man/qsearch.1 | 4 +++- man/qsize.1| 3 ++- man/qtbz2.1| 3 ++- man/quse.1 | 4 +++- man/qxpak.1| 4 +++- 15 files changed, 35 insertions(+), 15 deletions(-) diff --git a/man/q.1 b/man/q.1 index c47c177..80c3d0a 100644 --- a/man/q.1 +++ b/man/q.1 @@ -1,5 +1,5 @@ .\" generated by mkman.py, please do NOT edit! -.TH q "1" "Apr 2018" "Gentoo Foundation" "q" +.TH q "1" "May 2018" "Gentoo Foundation" "q" .SH NAME q \- invoke a portage utility applet .SH SYNOPSIS @@ -58,6 +58,7 @@ Print version and exit. qtbz2 : manipulate tbz2 packages quse: find pkgs using useflags qxpak : manipulate xpak archives + qtegrity : verify files with IMA .fi .SH "REPORTING BUGS" Please report bugs via http://bugs.gentoo.org/ @@ -83,5 +84,6 @@ Mike Frysinger .BR qsearch (1), .BR qsize (1), .BR qtbz2 (1), +.BR qtegrity (1), .BR quse (1), .BR qxpak (1) diff --git a/man/qatom.1 b/man/qatom.1 index aeb9629..dd44038 100644 --- a/man/qatom.1 +++ b/man/qatom.1 @@ -1,5 +1,5 @@ .\" generated by mkman.py, please do NOT edit! -.TH qatom "1" "Apr 2018" "Gentoo Foundation" "qatom" +.TH qatom "1" "May 2018" "Gentoo Foundation" "qatom" .SH NAME qatom \- split atom strings .SH SYNOPSIS @@ -109,5 +109,6 @@ Mike Frysinger .BR qsearch (1), .BR qsize (1), .BR qtbz2 (1), +.BR qtegrity (1), .BR quse (1), .BR qxpak (1) diff --git a/man/qcache.1 b/man/qcache.1 index fe2ef07..acbaa24 100644 --- a/man/qcache.1 +++ b/man/qcache.1 @@ -1,5 +1,5 @@ .\" generated by mkman.py, please do NOT edit! -.TH qcache "1" "Apr 2018" "Gentoo Foundation" "qcache" +.TH qcache "1" "May 2018" "Gentoo Foundation" "qcache" .SH NAME qcache \- search the metadata cache .SH SYNOPSIS @@ -75,5 +75,6 @@ Mike Frysinger .BR qsearch (1), .BR qsize (1), .BR qtbz2 (1), +.BR qtegrity (1), .BR quse (1), .BR qxpak (1) diff --git a/man/qcheck.1 b/man/qcheck.1 index 2351ed3..e52e2e3 100644 --- a/man/qcheck.1 +++ b/man/qcheck.1 @@ -1,5 +1,5 @@ .\" generated by mkman.py, please do NOT edit! -.TH qcheck "1" "Apr 2018" "Gentoo Foundation" "qcheck" +.TH qcheck "1" "May 2018" "Gentoo Foundation" "qcheck" .SH NAME qcheck \- verify integrity of installed packages .SH SYNOPSIS @@ -75,5 +75,6 @@ Mike Frysinger .BR qsearch (1), .BR qsize (1), .BR qtbz2 (1), +.BR qtegrity (1), .BR quse (1), .BR qxpak (1) diff --git a/man/qdepends.1 b/man/qdepends.1 index c51a02d..c0032fa 100644 --- a/man/qdepends.1 +++ b/man/qdepends.1 @@ -1,5 +1,5 @@ .\" generated by mkman.py, please do NOT edit! -.TH qdepends "1" "Apr 2018" "Gentoo Foundation" "qdepends" +.TH qdepends "1" "May 2018" "Gentoo Foundation" "qdepends" .SH NAME qdepends \- show dependency info .SH SYNOPSIS @@ -129,5 +129,6 @@ Mike Frysinger .BR qsearch (1), .BR qsize (1), .BR qtbz2 (1), +.BR qtegrity (1), .BR quse (1), .BR qxpak (1) diff --git a/man/qgrep.1 b/man/qgrep.1 index bd140b3..40e4999 100644 --- a/man/qgrep.1 +++ b/man/qgrep.1 @@ -1,5 +1,5 @@ .\" generated by mkman.py, please do NOT edit! -.TH qgrep "1" "Apr 2018" "Gentoo Foundation" "qgrep" +.TH qgrep "1" "May 2018" "Gentoo Foundation" "qgrep" .SH NAME qgrep \- grep in ebuilds .SH SYNOPSIS @@ -100,5 +100,6 @@ Mike Frysinger .BR qsearch (1), .BR qsize (1), .BR qtbz2 (1), +.BR qtegrity (1), .BR quse (1), .BR qxpak (1) diff --git a/man/qlist.1 b/man/qlist.1 index f7dd847..905c0be 100644 --- a/man/qlist.1 +++ b/man/qlist.1 @@ -1,5 +1,5 @@ .\" generated by mkman.py, please do NOT edit! -.TH qlist "1" "Apr 2018" "Gentoo Foundation" "qlist" +.TH qlist "1" "May 2018" "Gentoo Foundation" "qlist" .SH NAME qlist \- list files owned by pkgname .SH SYNOPSIS @@ -98,5 +98,6 @@ Mike Frysinger .BR qsearch (1), .BR qsize (1), .BR qtbz2 (1), +.BR qtegrity (1), .BR quse (1), .BR qxpak (1) diff --git a/man/qlop.1 b/man/qlop.1 index 18c05fb..10e2394 100644 --- a/man/qlop.1 +++ b/man/qlop.1 @@ -1,5 +1,5 @@ .\" generated by mkman.py, please do NOT edit! -.TH qlop "1" "Apr 2018" "Gentoo Foundation" "qlop" +.TH qlop "1" "May 2018" "Gentoo Foundation" "qlop" .SH NAME qlop \- emerge log analyzer .SH SYNOPSIS @@ -104,5 +104,6 @@ Mike Frysinger .BR qsearch (1), .BR qsize (1), .BR qtbz2 (1), +.BR qtegrity (1), .BR quse (1), .BR qxpak (1) diff --git a/man/qmerge.1 b/man/qmerge.1 index f66908e..fb94de6 100644 --- a/man/qmerge.1 +++ b/man/qmerge.1 @@ -1,5 +1,5 @@ .\" generated by mkman.py, please do NOT edit! -.TH qmerge "1" "A
[gentoo-commits] proj/portage-utils:master commit in: man/
commit: 41c8ebc7eb8c1e517bd191736f4ef3ac66ab34e0 Author: Fabian Groffen gentoo org> AuthorDate: Fri May 18 11:34:45 2018 + Commit: Fabian Groffen gentoo org> CommitDate: Fri May 18 11:34:45 2018 + URL:https://gitweb.gentoo.org/proj/portage-utils.git/commit/?id=41c8ebc7 mkman: add myself as author man/mkman.py | 1 + 1 file changed, 1 insertion(+) diff --git a/man/mkman.py b/man/mkman.py index 7089320..bd3111c 100755 --- a/man/mkman.py +++ b/man/mkman.py @@ -33,6 +33,7 @@ def FindApplets(): COMMON_AUTHORS = [ 'Ned Ludd ', 'Mike Frysinger ', +'Fabian Groffen ', ] TEMPLATE = r""".\" generated by mkman.py, please do NOT edit! .TH %(applet)s "1" "%(date)s" "Gentoo Foundation" "%(applet)s"
[gentoo-commits] proj/portage-utils:master commit in: man/
commit: 56ab601781a95b1172cbcf957ef706bbc021116a Author: Fabian Groffen gentoo org> AuthorDate: Fri May 18 11:35:26 2018 + Commit: Fabian Groffen gentoo org> CommitDate: Fri May 18 11:35:26 2018 + URL:https://gitweb.gentoo.org/proj/portage-utils.git/commit/?id=56ab6017 man: regenerate man/q.1| 1 + man/qatom.1| 1 + man/qcache.1 | 1 + man/qcheck.1 | 1 + man/qdepends.1 | 1 + man/qfile.1| 1 + man/qgrep.1| 1 + man/qlist.1| 1 + man/qlop.1 | 1 + man/qmerge.1 | 1 + man/qpkg.1 | 1 + man/qsearch.1 | 1 + man/qsize.1| 1 + man/qtbz2.1| 1 + man/qtegrity.1 | 1 + man/quse.1 | 1 + man/qxpak.1| 1 + 17 files changed, 17 insertions(+) diff --git a/man/q.1 b/man/q.1 index 80c3d0a..b88dd4c 100644 --- a/man/q.1 +++ b/man/q.1 @@ -69,6 +69,7 @@ portage-ut...@gentoo.org .nf Ned Ludd Mike Frysinger +Fabian Groffen .fi .SH "SEE ALSO" .BR qatom (1), diff --git a/man/qatom.1 b/man/qatom.1 index dd44038..f1c985b 100644 --- a/man/qatom.1 +++ b/man/qatom.1 @@ -94,6 +94,7 @@ portage-ut...@gentoo.org .nf Ned Ludd Mike Frysinger +Fabian Groffen .fi .SH "SEE ALSO" .BR q (1), diff --git a/man/qcache.1 b/man/qcache.1 index acbaa24..fd8a620 100644 --- a/man/qcache.1 +++ b/man/qcache.1 @@ -60,6 +60,7 @@ portage-ut...@gentoo.org .nf Ned Ludd Mike Frysinger +Fabian Groffen .fi .SH "SEE ALSO" .BR q (1), diff --git a/man/qcheck.1 b/man/qcheck.1 index e52e2e3..f6f1d26 100644 --- a/man/qcheck.1 +++ b/man/qcheck.1 @@ -60,6 +60,7 @@ portage-ut...@gentoo.org .nf Ned Ludd Mike Frysinger +Fabian Groffen .fi .SH "SEE ALSO" .BR q (1), diff --git a/man/qdepends.1 b/man/qdepends.1 index c0032fa..2e1aab2 100644 --- a/man/qdepends.1 +++ b/man/qdepends.1 @@ -114,6 +114,7 @@ portage-ut...@gentoo.org .nf Ned Ludd Mike Frysinger +Fabian Groffen .fi .SH "SEE ALSO" .BR q (1), diff --git a/man/qfile.1 b/man/qfile.1 index 729b561..6916628 100644 --- a/man/qfile.1 +++ b/man/qfile.1 @@ -212,6 +212,7 @@ portage-ut...@gentoo.org .nf Ned Ludd Mike Frysinger +Fabian Groffen TGL .fi .SH "SEE ALSO" diff --git a/man/qgrep.1 b/man/qgrep.1 index 40e4999..0cc0831 100644 --- a/man/qgrep.1 +++ b/man/qgrep.1 @@ -85,6 +85,7 @@ portage-ut...@gentoo.org .nf Ned Ludd Mike Frysinger +Fabian Groffen .fi .SH "SEE ALSO" .BR q (1), diff --git a/man/qlist.1 b/man/qlist.1 index 905c0be..96b201b 100644 --- a/man/qlist.1 +++ b/man/qlist.1 @@ -83,6 +83,7 @@ portage-ut...@gentoo.org .nf Ned Ludd Mike Frysinger +Fabian Groffen .fi .SH "SEE ALSO" .BR q (1), diff --git a/man/qlop.1 b/man/qlop.1 index 10e2394..8def1f2 100644 --- a/man/qlop.1 +++ b/man/qlop.1 @@ -89,6 +89,7 @@ portage-ut...@gentoo.org .nf Ned Ludd Mike Frysinger +Fabian Groffen .fi .SH "SEE ALSO" .BR q (1), diff --git a/man/qmerge.1 b/man/qmerge.1 index fb94de6..56c79e9 100644 --- a/man/qmerge.1 +++ b/man/qmerge.1 @@ -71,6 +71,7 @@ portage-ut...@gentoo.org .nf Ned Ludd Mike Frysinger +Fabian Groffen .fi .SH "SEE ALSO" .BR q (1), diff --git a/man/qpkg.1 b/man/qpkg.1 index 4738026..b5691b1 100644 --- a/man/qpkg.1 +++ b/man/qpkg.1 @@ -51,6 +51,7 @@ portage-ut...@gentoo.org .nf Ned Ludd Mike Frysinger +Fabian Groffen TGL .fi .SH "SEE ALSO" diff --git a/man/qsearch.1 b/man/qsearch.1 index e3e93a6..f3ae1f5 100644 --- a/man/qsearch.1 +++ b/man/qsearch.1 @@ -59,6 +59,7 @@ portage-ut...@gentoo.org .nf Ned Ludd Mike Frysinger +Fabian Groffen TGL .fi .SH "SEE ALSO" diff --git a/man/qsize.1 b/man/qsize.1 index cd1a664..d2ea494 100644 --- a/man/qsize.1 +++ b/man/qsize.1 @@ -60,6 +60,7 @@ portage-ut...@gentoo.org .nf Ned Ludd Mike Frysinger +Fabian Groffen .fi .SH "SEE ALSO" .BR q (1), diff --git a/man/qtbz2.1 b/man/qtbz2.1 index d21c804..b356d53 100644 --- a/man/qtbz2.1 +++ b/man/qtbz2.1 @@ -55,6 +55,7 @@ portage-ut...@gentoo.org .nf Ned Ludd Mike Frysinger +Fabian Groffen .fi .SH "SEE ALSO" .BR q (1), diff --git a/man/qtegrity.1 b/man/qtegrity.1 index 76ed731..2ba896c 100644 --- a/man/qtegrity.1 +++ b/man/qtegrity.1 @@ -60,6 +60,7 @@ portage-ut...@gentoo.org .nf Ned Ludd Mike Frysinger +Fabian Groffen Sam Besselink .fi .SH "SEE ALSO" diff --git a/man/quse.1 b/man/quse.1 index 28b1a33..c8d9f72 100644 --- a/man/quse.1 +++ b/man/quse.1 @@ -63,6 +63,7 @@ portage-ut...@gentoo.org .nf Ned Ludd Mike Frysinger +Fabian Groffen Sam Besselink .fi .SH "SEE ALSO" diff --git a/man/qxpak.1 b/man/qxpak.1 index 6c27a5b..1866c28 100644 --- a/man/qxpak.1 +++ b/man/qxpak.1 @@ -51,6 +51,7 @@ portage-ut...@gentoo.org .nf Ned Ludd Mike Frysinger +Fabian Groffen TGL .fi .SH "SEE ALSO"
[gentoo-commits] proj/portage-utils:master commit in: man/include/, man/, /
commit: 04b4c6834fd83bf0329198c56894bd7dad6f7a6a Author: Fabian Groffen gentoo org> AuthorDate: Fri May 18 10:12:40 2018 + Commit: Fabian Groffen gentoo org> CommitDate: Fri May 18 10:12:40 2018 + URL:https://gitweb.gentoo.org/proj/portage-utils.git/commit/?id=04b4c683 qtegrity: new applet by Sam Besselink for use with IMA, bug #619988 Bug: https://bugs.gentoo.org/619988 applets.h | 7 +- man/include/qtegrity-70-relevant-files.include | 9 + man/include/qtegrity-authors.include | 1 + man/include/qtegrity.desc | 8 + man/qtegrity.1 | 81 qtegrity.c | 509 + 6 files changed, 614 insertions(+), 1 deletion(-) diff --git a/applets.h b/applets.h index 93146c6..daf7047 100644 --- a/applets.h +++ b/applets.h @@ -31,6 +31,7 @@ DECLARE_APPLET(qatom) DECLARE_APPLET(qmerge) DECLARE_APPLET(qcache) DECLARE_APPLET(qglsa) /* disable */ +DECLARE_APPLET(qtegrity) #undef DECLARE_APPLET #define DEFINE_APPLET_STUB(applet) \ @@ -62,8 +63,9 @@ static const struct applet_t { {"qtbz2", qtbz2_main, "", "manipulate tbz2 packages"}, {"quse", quse_main, "", "find pkgs using useflags"}, {"qxpak", qxpak_main, "", "manipulate xpak archives"}, + {"qtegrity", qtegrity_main, "", "verify files with IMA"}, - /* aliases for equery capatability */ + /* aliases for equery compatibility */ {"belongs", qfile_main, NULL, NULL}, /*"changes"*/ {"check", qcheck_main,NULL, NULL}, @@ -82,6 +84,9 @@ static const struct applet_t { {"uickpkg", qpkg_main, NULL, NULL}, /* {"glsa", qglsa_main, NULL, NULL}, */ + /* alias for qtegrity */ + {"integrity", qtegrity_main, NULL, NULL}, + {NULL, NULL, NULL, NULL} }; diff --git a/man/include/qtegrity-70-relevant-files.include b/man/include/qtegrity-70-relevant-files.include new file mode 100644 index 000..742658f --- /dev/null +++ b/man/include/qtegrity-70-relevant-files.include @@ -0,0 +1,9 @@ +.SH RELEVANT FILES +.PP +Central list of known good digests +.nf\fI + /var/db/QTEGRITY\fi +.PP +Linux kernel's recorded digests +.nf\fI + /sys/kernel/security/ima/ascii_runtime_measurements\fi diff --git a/man/include/qtegrity-authors.include b/man/include/qtegrity-authors.include new file mode 100644 index 000..160ea6a --- /dev/null +++ b/man/include/qtegrity-authors.include @@ -0,0 +1 @@ +Sam Besselink diff --git a/man/include/qtegrity.desc b/man/include/qtegrity.desc new file mode 100644 index 000..5f9029b --- /dev/null +++ b/man/include/qtegrity.desc @@ -0,0 +1,8 @@ +The default behavior of \fBqtegrity\fP is to verify digests of performed +executables to a list of known good digests. This requires an IMA-enabled +linux kernel, which records digests of performed executables and exports them +through securityfs. Using \fB\-\-ignore-non-existent\fP suppresses messages +about recorded files that can't be accessed (assuming they got removed). +By using \fB\-\-add\fP, the program behaves differently. No verification is +performed, instead a digest is made of the provided file and appended to +the list of known good digests. diff --git a/man/qtegrity.1 b/man/qtegrity.1 new file mode 100644 index 000..76ed731 --- /dev/null +++ b/man/qtegrity.1 @@ -0,0 +1,81 @@ +.\" generated by mkman.py, please do NOT edit! +.TH qtegrity "1" "May 2018" "Gentoo Foundation" "qtegrity" +.SH NAME +qtegrity \- verify files with IMA +.SH SYNOPSIS +.B qtegrity +\fI[opts] \fR +.SH DESCRIPTION +The default behavior of \fBqtegrity\fP is to verify digests of performed +executables to a list of known good digests. This requires an IMA-enabled +linux kernel, which records digests of performed executables and exports them +through securityfs. Using \fB\-\-ignore-non-existent\fP suppresses messages +about recorded files that can't be accessed (assuming they got removed). +By using \fB\-\-add\fP, the program behaves differently. No verification is +performed, instead a digest is made of the provided file and appended to +the list of known good digests. +.SH OPTIONS +.TP +\fB\-a\fR \fI\fR, \fB\-\-add\fR \fI\fR +Add file to store of known-good digests. +.TP +\fB\-i\fR, \fB\-\-ignore\-non\-existent\fR +Be silent if recorded file no longer exists. +.TP +\fB\-s\fR, \fB\-\-show\-matches\fR +Show recorded digests that match with known-good digests. +.TP +\fB\-\-root\fR \fI\fR +Set the ROOT env var. +.TP +\fB\-v\fR, \fB\-\-verbose\fR +Make a lot of noise. +.TP +\fB\-q\fR, \fB\-\-quiet\fR +Tighter output; suppress warnings. +.TP +\fB\-C\fR, \fB\-\-nocolor\fR +Don't output color. +.TP +\fB\-h\fR, \fB\-\-help\fR +Print this help and exit. +.TP +\fB\-V\fR, \fB\-\-version\fR +Print version and exit. +.SH RELEVANT FILES +.PP +Central list of
[gentoo-commits] proj/portage-utils:master commit in: man/include/, man/
commit: 213b183db62d05fc918f323098b19ac260fc2a3c Author: Fabian Groffen gentoo org> AuthorDate: Fri May 18 10:08:12 2018 + Commit: Fabian Groffen gentoo org> CommitDate: Fri May 18 10:08:12 2018 + URL:https://gitweb.gentoo.org/proj/portage-utils.git/commit/?id=213b183d mkman.py: add additional authors to main authors section man/include/qfile-99-authors.include | 4 man/include/qfile-authors.include| 1 + man/mkman.py | 5 - 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/man/include/qfile-99-authors.include b/man/include/qfile-99-authors.include deleted file mode 100644 index df3dc39..000 --- a/man/include/qfile-99-authors.include +++ /dev/null @@ -1,4 +0,0 @@ -.SH "ADDITIONAL CONTRIBUTORS" -.nf -TGL degrenier[at]easyconnect.fr -.fi diff --git a/man/include/qfile-authors.include b/man/include/qfile-authors.include new file mode 100644 index 000..d90fe2a --- /dev/null +++ b/man/include/qfile-authors.include @@ -0,0 +1 @@ +TGL diff --git a/man/mkman.py b/man/mkman.py index 8444311..7089320 100755 --- a/man/mkman.py +++ b/man/mkman.py @@ -139,7 +139,10 @@ def MkMan(applets, applet, output): # Handle any fragments this applet has available for frag in sorted(glob.glob(os.path.join(FRAGS_DIR, '%s-*.include' % applet))): with open(frag) as f: -extra_sections += [x.rstrip() for x in f.readlines()] +if "-authors." in frag: +authors += [x.rstrip() for x in f.readlines()] +else: +extra_sections += [x.rstrip() for x in f.readlines()] data = { 'applet': applet,
[gentoo-commits] proj/portage-utils:master commit in: man/
commit: 93d6bb6e36d0559322c06508302d39a4db2ce272 Author: Fabian Groffen gentoo org> AuthorDate: Fri May 18 10:14:02 2018 + Commit: Fabian Groffen gentoo org> CommitDate: Fri May 18 10:14:02 2018 + URL:https://gitweb.gentoo.org/proj/portage-utils.git/commit/?id=93d6bb6e man/qfile.1: regenerate after author change man/qfile.1 | 17 - 1 file changed, 8 insertions(+), 9 deletions(-) diff --git a/man/qfile.1 b/man/qfile.1 index ff92897..729b561 100644 --- a/man/qfile.1 +++ b/man/qfile.1 @@ -1,5 +1,5 @@ .\" generated by mkman.py, please do NOT edit! -.TH qfile "1" "Apr 2018" "Gentoo Foundation" "qfile" +.TH qfile "1" "May 2018" "Gentoo Foundation" "qfile" .SH NAME qfile \- list all pkgs owning files .SH SYNOPSIS @@ -50,16 +50,17 @@ Print this help and exit. .TP \fB\-V\fR, \fB\-\-version\fR Print version and exit. -.SH "FINDING FILES OWNERS" +.SH "FINDING FILE OWNERS" .PP This is the default behavior of \fBqfile\fP. It will list the packages which own the files (or directories, or symlinks, or anything else Portage can -install) you are querying. Query items may be file paths or simple file names. +install) you are querying. Query items may be file paths or simple file +names when the \fB\-b\fP option is used. By default, output includes packages names and the complete paths to the matching files. If using \fB\-\-exact\fP, versions of the packages will also be shown. At the contrary, when using \fB\-\-quiet\fP, only package names are listed, without files paths. Finally, \fB\-\-verbose\fP is similar -to \fB\-\-exact\fP, but may adds a few warnings. The return status of +to \fB\-\-exact\fP, but may add a few warnings. The return status of \fBqfile\fP will be \fI0\fP as soon as an owning package has been found for one of the query items. .PP @@ -71,7 +72,7 @@ Find names of package(s) owning "/bin/bash": .PP Find package(s) owning any file named "bash", and show paths of this files: .nf\fI - $ qfile bash + $ qfile -b bash app-shells/bash (/bin/bash) app-shells/bash (/etc/bash) .fi @@ -202,10 +203,6 @@ tar tjf "${tarbz2}" \\ | qfile -e -f - -x ${categ}/${pn}:${slot} rm -rf "${tmpdir}" .PP -.SH "ADDITIONAL CONTRIBUTORS" -.nf -TGL degrenier[at]easyconnect.fr -.fi .SH "REPORTING BUGS" Please report bugs via http://bugs.gentoo.org/ .br @@ -215,6 +212,7 @@ portage-ut...@gentoo.org .nf Ned Ludd Mike Frysinger +TGL .fi .SH "SEE ALSO" .BR q (1), @@ -230,5 +228,6 @@ Mike Frysinger .BR qsearch (1), .BR qsize (1), .BR qtbz2 (1), +.BR qtegrity (1), .BR quse (1), .BR qxpak (1)
[gentoo-commits] proj/portage-utils:master commit in: /, man/include/
commit: 23c09a20dfcc044343b16bfe4b5873f663a46286 Author: Fabian Groffen gentoo org> AuthorDate: Sun Apr 15 12:03:14 2018 + Commit: Fabian Groffen gentoo org> CommitDate: Sun Apr 15 12:03:14 2018 + URL:https://gitweb.gentoo.org/proj/portage-utils.git/commit/?id=23c09a20 qfile: fix matching of files A bit overenthusiastic check for files in the current directory caused weird directory prefixes to be ignored. Bug: https://bugs.gentoo.org/652720 man/include/qfile-01-owners.include | 9 ++-- qfile.c | 94 ++--- 2 files changed, 60 insertions(+), 43 deletions(-) diff --git a/man/include/qfile-01-owners.include b/man/include/qfile-01-owners.include index c9ce378..a4bdc76 100644 --- a/man/include/qfile-01-owners.include +++ b/man/include/qfile-01-owners.include @@ -1,13 +1,14 @@ -.SH "FINDING FILES OWNERS" +.SH "FINDING FILE OWNERS" .PP This is the default behavior of \fBqfile\fP. It will list the packages which own the files (or directories, or symlinks, or anything else Portage can -install) you are querying. Query items may be file paths or simple file names. +install) you are querying. Query items may be file paths or simple file +names when the \fB\-b\fP option is used. By default, output includes packages names and the complete paths to the matching files. If using \fB\-\-exact\fP, versions of the packages will also be shown. At the contrary, when using \fB\-\-quiet\fP, only package names are listed, without files paths. Finally, \fB\-\-verbose\fP is similar -to \fB\-\-exact\fP, but may adds a few warnings. The return status of +to \fB\-\-exact\fP, but may add a few warnings. The return status of \fBqfile\fP will be \fI0\fP as soon as an owning package has been found for one of the query items. .PP @@ -19,7 +20,7 @@ Find names of package(s) owning "/bin/bash": .PP Find package(s) owning any file named "bash", and show paths of this files: .nf\fI - $ qfile bash + $ qfile -b bash app-shells/bash (/bin/bash) app-shells/bash (/etc/bash) .fi diff --git a/qfile.c b/qfile.c index 08ba642..285277b 100644 --- a/qfile.c +++ b/qfile.c @@ -118,66 +118,73 @@ static int qfile_cb(q_vdb_pkg_ctx *pkg_ctx, void *priv) goto qlist_done; while (getline(&state->buf, &state->buflen, fp) != -1) { + size_t dirname_len; contents_entry *e; + e = contents_parse_line(state->buf); if (!e) continue; - /* assume sane basename() -- doesnt modify argument */ - if ((base = basename(e->name)) == NULL) + /* basename(3) possibly modifies e->name (if it has trailing +* slashes) but this is not likely since it comes from VDB which +* has normalised everything, so effectively e->name isn't +* touched, however, it /can/ return a pointer to a private +* allocation */ + base = basename(e->name); + if (base < e->name || base > (e->name + strlen(e->name))) continue; + /* basename(/usr) = usr, dirname(/usr) = / +* basename(/usr/bin) = bin, dirname(/usr/bin) = /usr */ + if ((dirname_len = (base - e->name - 1)) == 0) + dirname_len = 1; + for (i = 0; i < args->length; i++) { if (base_names[i] == NULL) continue; if (non_orphans && non_orphans[i]) continue; - /* For optimization of qfile(), we also give it an array of the first char -* of each basename. This way we avoid numerous strcmp() calls. - */ - if (base[0] != base_names[i][0] || strcmp(base, base_names[i])) + /* For optimization of qfile(), we also give it an array of +* the first char of each basename. This way we avoid +* numerous strcmp() calls. */ + if (base[0] != base_names[i][0] || strcmp(base, base_names[i]) != 0) continue; path_ok = false; - /* check the full filepath ... */ - size_t dirname_len = (base - e->name - 1); - /* basename(/usr) = usr, dirname(/usr) = / -* basename(/usr/bin) = bin, dirname(/usr/bin) = /usr -*/ - if (dirname_len == 0) - dirname_len = 1; - if (dir_names[i] && strncmp(e->name, dir_names[i], dirname_len) == 0 && - dir_names[i][dirname_len] == '\0') { +
[gentoo-commits] proj/portage-utils:master commit in: man/include/, /, man/
commit: b5cc7d87b7adf46c2444c68537d8fcfb73ae0060 Author: Fabian Groffen gentoo org> AuthorDate: Thu Apr 12 19:32:37 2018 + Commit: Fabian Groffen gentoo org> CommitDate: Thu Apr 12 19:32:37 2018 + URL:https://gitweb.gentoo.org/proj/portage-utils.git/commit/?id=b5cc7d87 qlop: accept "today" and "yesterday" for parse_date Bug: https://bugs.gentoo.org/652312 man/include/qlop.optdesc.yaml | 4 man/qlop.1| 4 qlop.c| 13 +++-- 3 files changed, 19 insertions(+), 2 deletions(-) diff --git a/man/include/qlop.optdesc.yaml b/man/include/qlop.optdesc.yaml index fad1670..3ff62c3 100644 --- a/man/include/qlop.optdesc.yaml +++ b/man/include/qlop.optdesc.yaml @@ -6,6 +6,10 @@ date: | .IP "NUMBER [s] [ago]" Relative time, specifying \fINUMBER\fR \fIdays\fR, \fIweeks\fR, \fImonths\fR or \fIyears\fR, for example \fI3 days ago\fR. +.IP today +Alias for \fI0 days ago\fR. +.IP yesterday +Alias for \fI1 day ago\fR. .IP -MM-DD Big-endian date, with components separated by hyphens, starting with year, followed by month and day of month. diff --git a/man/qlop.1 b/man/qlop.1 index 9c449a9..18c05fb 100644 --- a/man/qlop.1 +++ b/man/qlop.1 @@ -46,6 +46,10 @@ can take a few forms. .IP "NUMBER [s] [ago]" Relative time, specifying \fINUMBER\fR \fIdays\fR, \fIweeks\fR, \fImonths\fR or \fIyears\fR, for example \fI3 days ago\fR. +.IP today +Alias for \fI0 days ago\fR. +.IP yesterday +Alias for \fI1 day ago\fR. .IP -MM-DD Big-endian date, with components separated by hyphens, starting with year, followed by month and day of month. diff --git a/qlop.c b/qlop.c index 1d4e0d9..7bac8c2 100644 --- a/qlop.c +++ b/qlop.c @@ -758,8 +758,17 @@ parse_date(const char *sdate, time_t *t) char ago[len]; int ret = sscanf(sdate, "%lu %s %s", &num, dur, ago); - if (ret < 2) - return false; + if (ret < 2) { + if (strcmp(sdate, "today") == 0) { + num = 0; + snprintf(dur, len, "%s", "day"); + } else if (strcmp(sdate, "yesterday") == 0) { + num = 1; + snprintf(dur, len, "%s", "day"); + } else { + return false; + } + } if (ret == 3 && strcmp(ago, "ago") != 0) return false;
[gentoo-commits] proj/portage-utils:master commit in: man/, man/include/, /
commit: 33d4e18b26cd37691a81584da0efd929097a22b3 Author: Fabian Groffen gentoo org> AuthorDate: Thu Apr 12 19:14:19 2018 + Commit: Fabian Groffen gentoo org> CommitDate: Thu Apr 12 19:14:19 2018 + URL:https://gitweb.gentoo.org/proj/portage-utils.git/commit/?id=33d4e18b qlop: don't rely on %F for data parsing for portability While at it document the date formats in the man-page. man/include/qlop.optdesc.yaml | 16 man/qlop.1| 16 +++- qlop.c| 6 +++--- 3 files changed, 34 insertions(+), 4 deletions(-) diff --git a/man/include/qlop.optdesc.yaml b/man/include/qlop.optdesc.yaml index 7864d6e..fad1670 100644 --- a/man/include/qlop.optdesc.yaml +++ b/man/include/qlop.optdesc.yaml @@ -1,3 +1,19 @@ +date: | +Limit the selection of packages to the date given, or to the range +of dates if this argument is given twice. The \fB--date\fR option +can take a few forms. +.RS +.IP "NUMBER [s] [ago]" +Relative time, specifying \fINUMBER\fR \fIdays\fR, \fIweeks\fR, +\fImonths\fR or \fIyears\fR, for example \fI3 days ago\fR. +.IP -MM-DD +Big-endian date, with components separated by hyphens, starting with +year, followed by month and day of month. +.IP S +Seconds since 1970-01-01 00:00:00 + (UTC), the UNIX epoch. +.IP FORMAT|DATE +Use \fIFORMAT\fR as input for \fBstrptime\fR(3) to parse \fIDATE\fR. +.RE gauge: | Gauge number of times a package has been merged. This shows the merge time for each individual merge of package. diff --git a/man/qlop.1 b/man/qlop.1 index c138054..9c449a9 100644 --- a/man/qlop.1 +++ b/man/qlop.1 @@ -39,7 +39,21 @@ Show current emerging packages. This relies on in order to detect running merges. .TP \fB\-d\fR \fI\fR, \fB\-\-date\fR \fI\fR -Limit selection to this time (1st -d is start, 2nd -d is end). +Limit the selection of packages to the date given, or to the range +of dates if this argument is given twice. The \fB--date\fR option +can take a few forms. +.RS +.IP "NUMBER [s] [ago]" +Relative time, specifying \fINUMBER\fR \fIdays\fR, \fIweeks\fR, +\fImonths\fR or \fIyears\fR, for example \fI3 days ago\fR. +.IP -MM-DD +Big-endian date, with components separated by hyphens, starting with +year, followed by month and day of month. +.IP S +Seconds since 1970-01-01 00:00:00 + (UTC), the UNIX epoch. +.IP FORMAT|DATE +Use \fIFORMAT\fR as input for \fBstrptime\fR(3) to parse \fIDATE\fR. +.RE .TP \fB\-f\fR \fI\fR, \fB\-\-logfile\fR \fI\fR Read emerge logfile instead of $EMERGE_LOG_DIR/emerge.log. diff --git a/qlop.c b/qlop.c index 67669ef..1d4e0d9 100644 --- a/qlop.c +++ b/qlop.c @@ -39,7 +39,7 @@ static const char qlop_desc[] = "The --date option can take a few forms:\n" " -d '# [s] [ago]' (e.g. '3 days ago')\n" "Or using strptime(3) formats:\n" - " -d '2015-12-25' (detected as %F)\n" + " -d '2015-12-25' (detected as %Y-%m-%d)\n" " -d '1459101740' (detected as %s)\n" " -d '%d.%m.%Y|25.12.2015' (format is specified)"; #define qlop_usage(ret) usage(ret, QLOP_FLAGS, qlop_long_opts, qlop_opts_help, qlop_desc, lookup_applet_idx("qlop")) @@ -733,7 +733,7 @@ parse_date(const char *sdate, time_t *t) } else { /* Handle automatic formats: * - "12315128" -> %s -* - "2015-12-24" -> %F (same as %Y-%m-%d +* - "2015-12-24" -> %Y-%m-%d * - human readable format (see below) */ size_t len = strspn(sdate, "0123456789-"); @@ -742,7 +742,7 @@ parse_date(const char *sdate, time_t *t) if (strchr(sdate, '-') == NULL) fmt = "%s"; else - fmt = "%F"; + fmt = "%Y-%m-%d"; s = strptime(sdate, fmt, &tm); if (s == NULL || s[0] != '\0')
[gentoo-commits] proj/portage-utils:master commit in: man/
commit: ac708664ba64def5168a827e937401150809606d Author: Fabian Groffen gentoo org> AuthorDate: Tue Apr 3 19:59:44 2018 + Commit: Fabian Groffen gentoo org> CommitDate: Tue Apr 3 19:59:44 2018 + URL:https://gitweb.gentoo.org/proj/portage-utils.git/commit/?id=ac708664 man: regen remaining manpages man/q.1 | 26 ++ man/qcache.1 | 32 +--- man/qcheck.1 | 34 ++ man/qpkg.1 | 2 +- 4 files changed, 50 insertions(+), 44 deletions(-) diff --git a/man/q.1 b/man/q.1 index 0f8f367..c47c177 100644 --- a/man/q.1 +++ b/man/q.1 @@ -1,4 +1,5 @@ -.TH q "1" "Mar 2016" "Gentoo Foundation" "q" +.\" generated by mkman.py, please do NOT edit! +.TH q "1" "Apr 2018" "Gentoo Foundation" "q" .SH NAME q \- invoke a portage utility applet .SH SYNOPSIS @@ -9,34 +10,34 @@ q \- invoke a portage utility applet .SH OPTIONS .TP \fB\-i\fR, \fB\-\-install\fR -Install symlinks for applets +Install symlinks for applets. .TP \fB\-r\fR \fI[arg]\fR, \fB\-\-reinitialize\fR \fI[arg]\fR -Reinitialize ebuild cache +Reinitialize ebuild cache. .TP \fB\-m\fR \fI[arg]\fR, \fB\-\-metacache\fR \fI[arg]\fR -Reinitialize metadata cache +Reinitialize metadata cache. .TP \fB\-M\fR \fI\fR, \fB\-\-modpath\fR \fI\fR -Module path +Module path. .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 +Make a lot of noise. .TP \fB\-q\fR, \fB\-\-quiet\fR -Tighter output; suppress warnings +Tighter output; suppress warnings. .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 APPLETS .nf .B This applet also has sub applets: @@ -61,7 +62,8 @@ Print version and exit .SH "REPORTING BUGS" Please report bugs via http://bugs.gentoo.org/ .br -Product: Portage Development; Component: Tools +Product: Portage Development; Component: Tools, Assignee: +portage-ut...@gentoo.org .SH AUTHORS .nf Ned Ludd diff --git a/man/qcache.1 b/man/qcache.1 index 81ae2fa..fe2ef07 100644 --- a/man/qcache.1 +++ b/man/qcache.1 @@ -1,4 +1,5 @@ -.TH qcache "1" "Mar 2016" "Gentoo Foundation" "qcache" +.\" generated by mkman.py, please do NOT edit! +.TH qcache "1" "Apr 2018" "Gentoo Foundation" "qcache" .SH NAME qcache \- search the metadata cache .SH SYNOPSIS @@ -9,51 +10,52 @@ qcache \- search the metadata cache .SH OPTIONS .TP \fB\-p\fR \fI\fR, \fB\-\-matchpkg\fR \fI\fR -match pkgname +match pkgname. .TP \fB\-c\fR \fI\fR, \fB\-\-matchcat\fR \fI\fR -match catname +match catname. .TP \fB\-i\fR, \fB\-\-imlate\fR -list packages that can be marked stable on a given arch +list packages that can be marked stable on a given arch. .TP \fB\-d\fR, \fB\-\-dropped\fR -list packages that have dropped keywords on a version bump on a given arch +list packages that have dropped keywords on a version bump on a given arch. .TP \fB\-t\fR, \fB\-\-testing\fR -list packages that have ~arch versions, but no stable versions on a given arch +list packages that have ~arch versions, but no stable versions on a given arch. .TP \fB\-s\fR, \fB\-\-stats\fR -display statistics about the portage tree +display statistics about the portage tree. .TP \fB\-a\fR, \fB\-\-all\fR -list packages that have at least one version keyworded for on a given arch +list packages that have at least one version keyworded for on a given arch. .TP \fB\-n\fR, \fB\-\-not\fR list packages that aren't keyworded on a given arch. .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 +Make a lot of noise. .TP \fB\-q\fR, \fB\-\-quiet\fR -Tighter output; suppress warnings +Tighter output; suppress warnings. .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 "REPORTING BUGS" Please report bugs via http://bugs.gentoo.org/ .br -Product: Portage Development; Component: Tools +Product: Portage Development; Component: Tools, Assignee: +portage-ut...@gentoo.org .SH AUTHORS .nf Ned Ludd diff --git a/man/qcheck.1 b/man/qcheck.1 index ed90c86..2351ed3 100644 --- a/man/qcheck.1 +++ b/man/qcheck.1 @@ -1,4 +1,5 @@ -.TH qcheck "1" "Mar 2016" "Gentoo Foundation" "qcheck" +.\" generated by mkman.py, please do NOT edit! +.TH qcheck "1" "Apr 2018" "Gentoo Foundation" "qcheck" .SH NAME qcheck \- verify integrity of installed packages .SH SYNOPSIS @@ -9,51 +10,52 @@ qcheck \- verify integrity of installed packages .SH OPTIONS .TP \fB\-s\fR \fI\fR, \fB\-\-skip\fR \fI\fR -Ignore files matching the regular expression +Ignore files matching the regular expression
[gentoo-commits] proj/portage-utils:master commit in: man/include/, man/
commit: 2921191511917e039e6cbca77b7b4977fc8a9eb4 Author: Fabian Groffen gentoo org> AuthorDate: Tue Apr 3 15:29:46 2018 + Commit: Fabian Groffen gentoo org> CommitDate: Tue Apr 3 15:29:46 2018 + URL:https://gitweb.gentoo.org/proj/portage-utils.git/commit/?id=29211915 qxpak: improve documentation Bug: https://bugs.gentoo.org/645554 man/include/qxpak.desc | 1 + man/qxpak.1| 30 -- 2 files changed, 17 insertions(+), 14 deletions(-) diff --git a/man/include/qxpak.desc b/man/include/qxpak.desc new file mode 100644 index 000..13b9591 --- /dev/null +++ b/man/include/qxpak.desc @@ -0,0 +1 @@ +\fIqxpak\fR is like ar and tar for xpak archives. diff --git a/man/qxpak.1 b/man/qxpak.1 index dbf36f6..710df44 100644 --- a/man/qxpak.1 +++ b/man/qxpak.1 @@ -1,50 +1,52 @@ -.TH qxpak "1" "Mar 2016" "Gentoo Foundation" "qxpak" +.\" generated by mkman.py, please do NOT edit! +.TH qxpak "1" "Apr 2018" "Gentoo Foundation" "qxpak" .SH NAME qxpak \- manipulate xpak archives .SH SYNOPSIS .B qxpak \fI[opts] \fR .SH DESCRIPTION - +\fIqxpak\fR is like ar and tar for xpak archives. .SH OPTIONS .TP \fB\-l\fR, \fB\-\-list\fR -List the contents of an archive +List the contents of an archive. .TP \fB\-x\fR, \fB\-\-extract\fR -Extract the contents of an archive +Extract the contents of an archive. .TP \fB\-c\fR, \fB\-\-create\fR -Create an archive of a directory/files +Create an archive of a directory/files. .TP \fB\-d\fR \fI\fR, \fB\-\-dir\fR \fI\fR -Change to specified directory +Change to specified directory. .TP \fB\-O\fR, \fB\-\-stdout\fR -Write files to stdout +Write files to stdout. .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 +Make a lot of noise. .TP \fB\-q\fR, \fB\-\-quiet\fR -Tighter output; suppress warnings +Tighter output; suppress warnings. .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 "REPORTING BUGS" Please report bugs via http://bugs.gentoo.org/ .br -Product: Portage Development; Component: Tools +Product: Portage Development; Component: Tools, Assignee: +portage-ut...@gentoo.org .SH AUTHORS .nf Ned Ludd
[gentoo-commits] proj/portage-utils:master commit in: man/include/, /, man/
commit: 454020200171d3d921b0f7e2229d4e527e1e6b2a Author: Fabian Groffen gentoo org> AuthorDate: Tue Apr 3 15:19:43 2018 + Commit: Fabian Groffen gentoo org> CommitDate: Tue Apr 3 15:19:43 2018 + URL:https://gitweb.gentoo.org/proj/portage-utils.git/commit/?id=45402020 quse: improve documentation Bug: https://bugs.gentoo.org/645554 man/include/quse.desc | 2 ++ man/include/quse.optdesc.yaml | 11 +++ man/quse.1| 40 quse.c| 4 ++-- 4 files changed, 39 insertions(+), 18 deletions(-) diff --git a/man/include/quse.desc b/man/include/quse.desc new file mode 100644 index 000..7492774 --- /dev/null +++ b/man/include/quse.desc @@ -0,0 +1,2 @@ +\fIquse\fR searches in ebuilds for a match in IUSE, KEYWORDS or LICENSE. +It can also search for USE-flags and show their descriptions. diff --git a/man/include/quse.optdesc.yaml b/man/include/quse.optdesc.yaml new file mode 100644 index 000..2a3675d --- /dev/null +++ b/man/include/quse.optdesc.yaml @@ -0,0 +1,11 @@ +exact: Search for exact string, e.g.\ do not use regular expression matching. +format: | +Advanced option to manually override the variable searched for in +ebuilds. By default, the search is \fIIUSE=\fR, the \fB\-K\fR and +\fB\-L\fR override that to \fIKEYWORDS=\fR and \fILICENSE=\fR +respectively. This option, sets the search to any variable. Note +that the equals sign is part of the search, and needs to be set. +verbose: | +Show problems encountered during parsing. These are mostly +diagnostic and indicate possible incorrectness in the results. +quiet: Ignored for compatibility with other qapplets. diff --git a/man/quse.1 b/man/quse.1 index e1e6db9..9b632b7 100644 --- a/man/quse.1 +++ b/man/quse.1 @@ -1,56 +1,64 @@ -.TH quse "1" "Mar 2016" "Gentoo Foundation" "quse" +.\" generated by mkman.py, please do NOT edit! +.TH quse "1" "Apr 2018" "Gentoo Foundation" "quse" .SH NAME quse \- find pkgs using useflags .SH SYNOPSIS .B quse \fI[opts] \fR .SH DESCRIPTION - +\fIquse\fR searches in ebuilds for a match in IUSE, KEYWORDS or LICENSE. +It can also search for USE-flags and show their descriptions. .SH OPTIONS .TP \fB\-e\fR, \fB\-\-exact\fR -Show exact non regexp matching using strcmp +Search for exact string, e.g.\ do not use regular expression matching. .TP \fB\-a\fR, \fB\-\-all\fR -Show annoying things in IUSE +List all ebuilds, don't match anything. .TP \fB\-K\fR, \fB\-\-keywords\fR -Use the KEYWORDS vs IUSE +Use the KEYWORDS vs IUSE. .TP \fB\-L\fR, \fB\-\-license\fR -Use the LICENSE vs IUSE +Use the LICENSE vs IUSE. .TP \fB\-D\fR, \fB\-\-describe\fR -Describe the USE flag +Describe the USE flag. .TP \fB\-F\fR \fI\fR, \fB\-\-format\fR \fI\fR -Use your own variable formats. -F NAME= +Advanced option to manually override the variable searched for in +ebuilds. By default, the search is \fIIUSE=\fR, the \fB\-K\fR and +\fB\-L\fR override that to \fIKEYWORDS=\fR and \fILICENSE=\fR +respectively. This option, sets the search to any variable. Note +that the equals sign is part of the search, and needs to be set. .TP \fB\-N\fR, \fB\-\-name\-only\fR -Only show package name +Only show package name. .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 +Show problems encountered during parsing. These are mostly +diagnostic and indicate possible incorrectness in the results. .TP \fB\-q\fR, \fB\-\-quiet\fR -Tighter output; suppress warnings +Ignored for compatibility with other qapplets. .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 "REPORTING BUGS" Please report bugs via http://bugs.gentoo.org/ .br -Product: Portage Development; Component: Tools +Product: Portage Development; Component: Tools, Assignee: +portage-ut...@gentoo.org .SH AUTHORS .nf Ned Ludd diff --git a/quse.c b/quse.c index ea8a326..05ba2f4 100644 --- a/quse.c +++ b/quse.c @@ -1,5 +1,5 @@ /* - * Copyright 2005-2014 Gentoo Foundation + * Copyright 2005-2018 Gentoo Foundation * Distributed under the terms of the GNU General Public License v2 * * Copyright 2005-2010 Ned Ludd- @@ -26,7 +26,7 @@ static struct option const quse_long_opts[] = { }; static const char * const quse_opts_help[] = { "Show exact non regexp matching using strcmp", - "Show annoying things in IUSE", + "List all ebuilds, don't match anything", "Use the KEYWORDS vs IUSE", "Use the LICENSE vs IUSE", "Describe the USE flag",
[gentoo-commits] proj/portage-utils:master commit in: man/, man/include/
commit: 23b810c84c02a29f3b2766cf0fd005c53e668816 Author: Fabian Groffen gentoo org> AuthorDate: Tue Apr 3 13:51:42 2018 + Commit: Fabian Groffen gentoo org> CommitDate: Tue Apr 3 13:51:42 2018 + URL:https://gitweb.gentoo.org/proj/portage-utils.git/commit/?id=23b810c8 qtbz2: improve documentation Bug: https://bugs.gentoo.org/645554 man/include/qsize.desc | 3 +++ man/include/qsize.optdesc.yaml | 5 + man/include/qtbz2.desc | 2 ++ man/include/qtbz2.optdesc.yaml | 2 ++ man/qtbz2.1| 33 ++--- 5 files changed, 30 insertions(+), 15 deletions(-) diff --git a/man/include/qsize.desc b/man/include/qsize.desc new file mode 100644 index 000..e4edce0 --- /dev/null +++ b/man/include/qsize.desc @@ -0,0 +1,3 @@ +\fIqsize\fR calculates the storage size taken by an installed package. +The reported sizes can be the recorded exact sizes of all files, or the +storage space they consume given the underlying filesystem. diff --git a/man/include/qsize.optdesc.yaml b/man/include/qsize.optdesc.yaml new file mode 100644 index 000..8dd58e4 --- /dev/null +++ b/man/include/qsize.optdesc.yaml @@ -0,0 +1,5 @@ +ignore: | +Filter out entries matching \fI\fR, which is a regular +expression, before calculating size. +verbose: Ignored for compatibility with other qapplets. +quiet: Ignored for compatibility with other qapplets. diff --git a/man/include/qtbz2.desc b/man/include/qtbz2.desc new file mode 100644 index 000..2ba37db --- /dev/null +++ b/man/include/qtbz2.desc @@ -0,0 +1,2 @@ +\fIqtbz2\fR joins and splits combined xpak+tarbz2 files. Gentoo binary +packages are such combined files. diff --git a/man/include/qtbz2.optdesc.yaml b/man/include/qtbz2.optdesc.yaml new file mode 100644 index 000..c1ebcd1 --- /dev/null +++ b/man/include/qtbz2.optdesc.yaml @@ -0,0 +1,2 @@ +verbose: Print some files and sizes while joining and splitting. +quiet: Ignored for compatibility with other qapplets. diff --git a/man/qtbz2.1 b/man/qtbz2.1 index b22c70c..94db0d8 100644 --- a/man/qtbz2.1 +++ b/man/qtbz2.1 @@ -1,53 +1,56 @@ -.TH qtbz2 "1" "Mar 2016" "Gentoo Foundation" "qtbz2" +.\" generated by mkman.py, please do NOT edit! +.TH qtbz2 "1" "Apr 2018" "Gentoo Foundation" "qtbz2" .SH NAME qtbz2 \- manipulate tbz2 packages .SH SYNOPSIS .B qtbz2 \fI[opts] \fR .SH DESCRIPTION - +\fIqtbz2\fR joins and splits combined xpak+tarbz2 files. Gentoo binary +packages are such combined files. .SH OPTIONS .TP \fB\-d\fR \fI\fR, \fB\-\-dir\fR \fI\fR -Change to specified directory +Change to specified directory. .TP \fB\-j\fR, \fB\-\-join\fR -Join: +Join: . .TP \fB\-s\fR, \fB\-\-split\fR -Split a tbz2 into a tar.bz2 + xpak +Split a tbz2 into a tar.bz2 + xpak. .TP \fB\-t\fR, \fB\-\-tarbz2\fR -Just split the tar.bz2 +Just split the tar.bz2. .TP \fB\-x\fR, \fB\-\-xpak\fR -Just split the xpak +Just split the xpak. .TP \fB\-O\fR, \fB\-\-stdout\fR -Write files to stdout +Write files to stdout. .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 +Print some files and sizes while joining and splitting. .TP \fB\-q\fR, \fB\-\-quiet\fR -Tighter output; suppress warnings +Ignored for compatibility with other qapplets. .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 "REPORTING BUGS" Please report bugs via http://bugs.gentoo.org/ .br -Product: Portage Development; Component: Tools +Product: Portage Development; Component: Tools, Assignee: +portage-ut...@gentoo.org .SH AUTHORS .nf Ned Ludd
[gentoo-commits] proj/portage-utils:master commit in: man/include/, man/, /
commit: ea69f8fc6eb1e1ee71eea57b938eac631dedb4de Author: Fabian Groffen gentoo org> AuthorDate: Tue Apr 3 13:39:15 2018 + Commit: Fabian Groffen gentoo org> CommitDate: Tue Apr 3 13:39:15 2018 + URL:https://gitweb.gentoo.org/proj/portage-utils.git/commit/?id=ea69f8fc qsize: improve documentation Bug: https://bugs.gentoo.org/645554 man/include/qpkg.optdesc.yaml | 2 +- man/qsize.1 | 37 + qsize.c | 6 +++--- 3 files changed, 25 insertions(+), 20 deletions(-) diff --git a/man/include/qpkg.optdesc.yaml b/man/include/qpkg.optdesc.yaml index 2da2810..62c0b52 100644 --- a/man/include/qpkg.optdesc.yaml +++ b/man/include/qpkg.optdesc.yaml @@ -1,2 +1,2 @@ verbose: Check and report MD5 hash mismatches during install. -quiet: Ignored for compatability with other qapplets. +quiet: Ignored for compatibility with other qapplets. diff --git a/man/qsize.1 b/man/qsize.1 index aa613f8..a734afd 100644 --- a/man/qsize.1 +++ b/man/qsize.1 @@ -1,56 +1,61 @@ -.TH qsize "1" "Mar 2016" "Gentoo Foundation" "qsize" +.\" generated by mkman.py, please do NOT edit! +.TH qsize "1" "Apr 2018" "Gentoo Foundation" "qsize" .SH NAME qsize \- calculate size usage .SH SYNOPSIS .B qsize \fI[opts] \fR .SH DESCRIPTION - +\fIqsize\fR calculates the storage size taken by an installed package. +The reported sizes can be the recorded exact sizes of all files, or the +storage space they consume given the underlying filesystem. .SH OPTIONS .TP \fB\-f\fR, \fB\-\-filesystem\fR -Show size used on disk +Show size used on disk. .TP \fB\-s\fR, \fB\-\-sum\fR -Include a summary +Include a summary. .TP \fB\-S\fR, \fB\-\-sum\-only\fR -Show just the summary +Show just the summary. .TP \fB\-m\fR, \fB\-\-megabytes\fR -Display size in megabytes +Display all sizes in megabytes. .TP \fB\-k\fR, \fB\-\-kilobytes\fR -Display size in kilobytes +Display all sizes in kilobytes. .TP \fB\-b\fR, \fB\-\-bytes\fR -Display size in bytes +Display all sizes in bytes. .TP \fB\-i\fR \fI\fR, \fB\-\-ignore\fR \fI\fR -Ignore regexp string +Filter out entries matching \fI\fR, which is a regular +expression, before calculating size. .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 +Ignored for compatibility with other qapplets. .TP \fB\-q\fR, \fB\-\-quiet\fR -Tighter output; suppress warnings +Ignored for compatibility with other qapplets. .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 "REPORTING BUGS" Please report bugs via http://bugs.gentoo.org/ .br -Product: Portage Development; Component: Tools +Product: Portage Development; Component: Tools, Assignee: +portage-ut...@gentoo.org .SH AUTHORS .nf Ned Ludd diff --git a/qsize.c b/qsize.c index c485aa6..78b8f88 100644 --- a/qsize.c +++ b/qsize.c @@ -23,9 +23,9 @@ static const char * const qsize_opts_help[] = { "Show size used on disk", "Include a summary", "Show just the summary", - "Display size in megabytes", - "Display size in kilobytes", - "Display size in bytes", + "Display all sizes in megabytes", + "Display all sizes in kilobytes", + "Display all sizes in bytes", "Ignore regexp string", COMMON_OPTS_HELP };
[gentoo-commits] proj/portage-utils:master commit in: man/include/, man/, /
commit: 81df4a8cfbd2998e43842440bb2d57d620b6ff7d Author: Fabian Groffen gentoo org> AuthorDate: Tue Apr 3 13:13:21 2018 + Commit: Fabian Groffen gentoo org> CommitDate: Tue Apr 3 13:13:21 2018 + URL:https://gitweb.gentoo.org/proj/portage-utils.git/commit/?id=81df4a8c qsearch: improve documentation Bug: https://bugs.gentoo.org/645554 man/include/qsearch.desc | 3 +++ man/include/qsearch.optdesc.yaml | 2 ++ man/qsearch.1| 36 qsearch.c| 6 +++--- 4 files changed, 28 insertions(+), 19 deletions(-) diff --git a/man/include/qsearch.desc b/man/include/qsearch.desc new file mode 100644 index 000..281c5a3 --- /dev/null +++ b/man/include/qsearch.desc @@ -0,0 +1,3 @@ +\fIqsearch\fR performs a search over the name and/or description of +packages. By default, a search over all package names is performed over +all ebuilds in the tree. diff --git a/man/include/qsearch.optdesc.yaml b/man/include/qsearch.optdesc.yaml new file mode 100644 index 000..9bbaeaa --- /dev/null +++ b/man/include/qsearch.optdesc.yaml @@ -0,0 +1,2 @@ +verbose: Ignored for compatibility with other qapplets. +quiet: Ignored for compatibility with other qapplets. diff --git a/man/qsearch.1 b/man/qsearch.1 index 5f888ba..3c6032d 100644 --- a/man/qsearch.1 +++ b/man/qsearch.1 @@ -1,56 +1,60 @@ -.TH qsearch "1" "Mar 2016" "Gentoo Foundation" "qsearch" +.\" generated by mkman.py, please do NOT edit! +.TH qsearch "1" "Apr 2018" "Gentoo Foundation" "qsearch" .SH NAME qsearch \- search pkgname/desc .SH SYNOPSIS .B qsearch \fI[opts] \fR .SH DESCRIPTION - +\fIqsearch\fR performs a search over the name and/or description of +packages. By default, a search over all package names is performed over +all ebuilds in the tree. .SH OPTIONS .TP \fB\-a\fR, \fB\-\-all\fR -List the descriptions of every package in the cache +List the descriptions of every package in the cache. .TP \fB\-c\fR, \fB\-\-cache\fR -Use the portage cache (default) +Use the portage cache. .TP \fB\-e\fR, \fB\-\-ebuilds\fR -Use the portage ebuild tree +Use the portage ebuild tree (default). .TP \fB\-s\fR, \fB\-\-search\fR -Regex search package basenames +Regex search package basenames. .TP \fB\-S\fR \fI\fR, \fB\-\-desc\fR \fI\fR -Regex search package descriptions +Regex search package descriptions. .TP \fB\-N\fR, \fB\-\-name\-only\fR -Only show package name +Only show package name. .TP \fB\-H\fR, \fB\-\-homepage\fR -Show homepage info +Show homepage info. .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 +Ignored for compatibility with other qapplets. .TP \fB\-q\fR, \fB\-\-quiet\fR -Tighter output; suppress warnings +Ignored for compatibility with other qapplets. .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 "REPORTING BUGS" Please report bugs via http://bugs.gentoo.org/ .br -Product: Portage Development; Component: Tools +Product: Portage Development; Component: Tools, Assignee: +portage-ut...@gentoo.org .SH AUTHORS .nf Ned Ludd diff --git a/qsearch.c b/qsearch.c index a620f95..4fce4de 100644 --- a/qsearch.c +++ b/qsearch.c @@ -1,5 +1,5 @@ /* - * Copyright 2005-2014 Gentoo Foundation + * Copyright 2005-2018 Gentoo Foundation * Distributed under the terms of the GNU General Public License v2 * * Copyright 2005-2010 Ned Ludd- @@ -21,8 +21,8 @@ static struct option const qsearch_long_opts[] = { }; static const char * const qsearch_opts_help[] = { "List the descriptions of every package in the cache", - "Use the portage cache (default)", - "Use the portage ebuild tree", + "Use the portage cache", + "Use the portage ebuild tree (default)", "Regex search package basenames", "Regex search package descriptions", "Only show package name",
[gentoo-commits] proj/portage-utils:master commit in: man/, man/include/
commit: f24b626027dceb5890b134837c6683f4593f6ce0 Author: Fabian Groffen gentoo org> AuthorDate: Tue Apr 3 12:15:35 2018 + Commit: Fabian Groffen gentoo org> CommitDate: Tue Apr 3 12:15:35 2018 + URL:https://gitweb.gentoo.org/proj/portage-utils.git/commit/?id=f24b6260 qmerge: improve documentation Bug: https://bugs.gentoo.org/645554 man/include/qmerge.desc | 6 ++ man/qmerge.1| 43 +-- 2 files changed, 31 insertions(+), 18 deletions(-) diff --git a/man/include/qmerge.desc b/man/include/qmerge.desc new file mode 100644 index 000..08589ec --- /dev/null +++ b/man/include/qmerge.desc @@ -0,0 +1,6 @@ +\fIqmerge\fR retrieves and installs Gentoo binary packages. Simple +dependency checking is performed, after which \fIqmerge\fR just unpacks +the binpkg onto the filesystem and registers the package in the VDB. + +Retrieval of packages from a remote binhost is currently performed using +\fBwget\fR(1). More specifically, \fIFETCHCOMMAND\fR is ignored. diff --git a/man/qmerge.1 b/man/qmerge.1 index f3d80db..f66908e 100644 --- a/man/qmerge.1 +++ b/man/qmerge.1 @@ -1,65 +1,72 @@ -.TH qmerge "1" "Mar 2016" "Gentoo Foundation" "qmerge" +.\" generated by mkman.py, please do NOT edit! +.TH qmerge "1" "Apr 2018" "Gentoo Foundation" "qmerge" .SH NAME qmerge \- fetch and merge binary package .SH SYNOPSIS .B qmerge \fI[opts] \fR .SH DESCRIPTION +\fIqmerge\fR retrieves and installs Gentoo binary packages. Simple +dependency checking is performed, after which \fIqmerge\fR just unpacks +the binpkg onto the filesystem and registers the package in the VDB. +Retrieval of packages from a remote binhost is currently performed using +\fBwget\fR(1). More specifically, \fIFETCHCOMMAND\fR is ignored. .SH OPTIONS .TP \fB\-f\fR, \fB\-\-fetch\fR -Fetch package and newest Packages metadata +Fetch package and newest Packages metadata. .TP \fB\-F\fR, \fB\-\-force\fR -Fetch package (skipping Packages) +Fetch package (skipping Packages). .TP \fB\-s\fR, \fB\-\-search\fR -Search available packages +Search available packages. .TP \fB\-K\fR, \fB\-\-install\fR -Install package +Install package. .TP \fB\-U\fR, \fB\-\-unmerge\fR -Uninstall package +Uninstall package. .TP \fB\-p\fR, \fB\-\-pretend\fR -Pretend only +Pretend only. .TP \fB\-u\fR, \fB\-\-update\fR -Update only +Update only. .TP \fB\-y\fR, \fB\-\-yes\fR -Don't prompt before overwriting +Don't prompt before overwriting. .TP \fB\-O\fR, \fB\-\-nodeps\fR -Don't merge dependencies +Don't merge dependencies. .TP \fB\-\-debug\fR -Run shell funcs with `set -x` +Run shell funcs with `set -x`. .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 +Make a lot of noise. .TP \fB\-q\fR, \fB\-\-quiet\fR -Tighter output; suppress warnings +Tighter output; suppress warnings. .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 "REPORTING BUGS" Please report bugs via http://bugs.gentoo.org/ .br -Product: Portage Development; Component: Tools +Product: Portage Development; Component: Tools, Assignee: +portage-ut...@gentoo.org .SH AUTHORS .nf Ned Ludd
[gentoo-commits] proj/portage-utils:master commit in: man/, man/include/
commit: 86085691d6a42e497c1a8902cf7c24212a2dd67d Author: Fabian Groffen gentoo org> AuthorDate: Tue Apr 3 12:56:17 2018 + Commit: Fabian Groffen gentoo org> CommitDate: Tue Apr 3 12:56:17 2018 + URL:https://gitweb.gentoo.org/proj/portage-utils.git/commit/?id=86085691 qpkg: improve documentation Bug: https://bugs.gentoo.org/645554 man/include/qpkg.desc | 4 man/include/qpkg.optdesc.yaml | 2 ++ man/qpkg.1| 31 ++- 3 files changed, 24 insertions(+), 13 deletions(-) diff --git a/man/include/qpkg.desc b/man/include/qpkg.desc new file mode 100644 index 000..2bba24b --- /dev/null +++ b/man/include/qpkg.desc @@ -0,0 +1,4 @@ +\fIqpkg\fR creates or cleans up Gentoo binary packages. The default +action is to create a new binpkg for the given package names and store +them in pkgdir, which can be set explicitly using the \fB\-\-pkgdir\fR +option. diff --git a/man/include/qpkg.optdesc.yaml b/man/include/qpkg.optdesc.yaml new file mode 100644 index 000..2da2810 --- /dev/null +++ b/man/include/qpkg.optdesc.yaml @@ -0,0 +1,2 @@ +verbose: Check and report MD5 hash mismatches during install. +quiet: Ignored for compatability with other qapplets. diff --git a/man/qpkg.1 b/man/qpkg.1 index 8bb098a..930d15c 100644 --- a/man/qpkg.1 +++ b/man/qpkg.1 @@ -1,47 +1,52 @@ -.TH qpkg "1" "Mar 2016" "Gentoo Foundation" "qpkg" +.\" generated by mkman.py, please do NOT edit! +.TH qpkg "1" "Apr 2018" "Gentoo Foundation" "qpkg" .SH NAME qpkg \- manipulate Gentoo binpkgs .SH SYNOPSIS .B qpkg \fI[opts] \fR .SH DESCRIPTION - +\fIqpkg\fR creates or cleans up Gentoo binary packages. The default +action is to create a new binpkg for the given package names and store +them in pkgdir, which can be set explicitly using the \fB\-\-pkgdir\fR +option. .SH OPTIONS .TP \fB\-c\fR, \fB\-\-clean\fR -clean pkgdir of unused binary files +clean pkgdir of unused binary files. .TP \fB\-E\fR, \fB\-\-eclean\fR -clean pkgdir of files not in the tree anymore (slow) +clean pkgdir of files not in the tree anymore (slow). .TP \fB\-p\fR, \fB\-\-pretend\fR -pretend only +pretend only. .TP \fB\-P\fR \fI\fR, \fB\-\-pkgdir\fR \fI\fR -alternate package directory +alternate package directory. .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 +Check and report MD5 hash mismatches during install. .TP \fB\-q\fR, \fB\-\-quiet\fR -Tighter output; suppress warnings +Ignored for compatability with other qapplets. .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 "REPORTING BUGS" Please report bugs via http://bugs.gentoo.org/ .br -Product: Portage Development; Component: Tools +Product: Portage Development; Component: Tools, Assignee: +portage-ut...@gentoo.org .SH AUTHORS .nf Ned Ludd
[gentoo-commits] proj/portage-utils:master commit in: man/, man/include/, /
commit: 1def9d468742c0d6d6b24aa1f1d76243be6e24cd Author: Fabian Groffen gentoo org> AuthorDate: Tue Apr 3 11:49:41 2018 + Commit: Fabian Groffen gentoo org> CommitDate: Tue Apr 3 11:49:41 2018 + URL:https://gitweb.gentoo.org/proj/portage-utils.git/commit/?id=1def9d46 qlist: improve documentation Bug: https://bugs.gentoo.org/645554 man/include/qlist.desc | 6 + man/include/qlist.optdesc.yaml | 24 ++ man/qlist.1| 56 +++--- qlist.c| 2 +- 4 files changed, 67 insertions(+), 21 deletions(-) diff --git a/man/include/qlist.desc b/man/include/qlist.desc new file mode 100644 index 000..e02d971 --- /dev/null +++ b/man/include/qlist.desc @@ -0,0 +1,6 @@ +\fIqlist\fR shows the contents, or a subset thereof, of an installed +package. Alternatively, lists whether a package is installed, +optionally with version, USE-flag, SLOT or REPO information. The +\fIpkgname\fR to query for does not have to be an exact match, it may be +part of it, e.g.\ an entire category, or any package with some string in +its name. diff --git a/man/include/qlist.optdesc.yaml b/man/include/qlist.optdesc.yaml new file mode 100644 index 000..a60ef0d --- /dev/null +++ b/man/include/qlist.optdesc.yaml @@ -0,0 +1,24 @@ +installed: | +Instead of listing the contents of a package, just print the package +name if the package is currently installed. +umap: | +List USE-flags enabled when the package was installed. This flag +implies \fB\-I\fR. +slot: | +Display installed packages with slots (use twice for subslots). +This flag implies \fB\-I\fR. +repo: | +Display installed packages with repository the ebuild originated from. +This flag implies \fB\-I\fR. +columns: | +Like \fB\-Iv\fR, but package name and version are separated by a +space for easy consumption by e.g.\ shell scripts which can read +space-separated columns. +verbose: | +When used with \fB\-I\fR, print the package version next to name. +When listing the package contents, a single \fB\-v\fR displays +symlinks with an arrow (\->) to their target. Two or more \fB\-v\fR +adds colour to the entries and prints like \fB\-I\fR before the +listing. +quiet: | +Suppresses the parenthesis around the USE-flags when used with \fB\-U\fR. diff --git a/man/qlist.1 b/man/qlist.1 index 05e9326..f7dd847 100644 --- a/man/qlist.1 +++ b/man/qlist.1 @@ -1,68 +1,84 @@ -.TH qlist "1" "Mar 2016" "Gentoo Foundation" "qlist" +.\" generated by mkman.py, please do NOT edit! +.TH qlist "1" "Apr 2018" "Gentoo Foundation" "qlist" .SH NAME qlist \- list files owned by pkgname .SH SYNOPSIS .B qlist \fI[opts] \fR .SH DESCRIPTION - +\fIqlist\fR shows the contents, or a subset thereof, of an installed +package. Alternatively, lists whether a package is installed, +optionally with version, USE-flag, SLOT or REPO information. The +\fIpkgname\fR to query for does not have to be an exact match, it may be +part of it, e.g.\ an entire category, or any package with some string in +its name. .SH OPTIONS .TP \fB\-I\fR, \fB\-\-installed\fR -Just show installed packages +Instead of listing the contents of a package, just print the package +name if the package is currently installed. .TP \fB\-S\fR, \fB\-\-slots\fR -Display installed packages with slots (use twice for subslots) +Display installed packages with slots (use twice for subslots). .TP \fB\-R\fR, \fB\-\-repo\fR -Display installed packages with repository +Display installed packages with repository the ebuild originated from. +This flag implies \fB\-I\fR. .TP \fB\-U\fR, \fB\-\-umap\fR -Display installed packages with flags used +List USE-flags enabled when the package was installed. This flag +implies \fB\-I\fR. .TP \fB\-c\fR, \fB\-\-columns\fR -Display column view +Like \fB\-Iv\fR, but package name and version are separated by a +space for easy consumption by e.g.\ shell scripts which can read +space-separated columns. .TP \fB\-\-showdebug\fR -Show /usr/lib/debug files +Show /usr/lib/debug and /usr/src/debug files. .TP \fB\-e\fR, \fB\-\-exact\fR -Exact match (only CAT/PN or PN without PV) +Exact match (only CAT/PN or PN without PV). .TP \fB\-a\fR, \fB\-\-all\fR -Show every installed package +Show every installed package. .TP \fB\-d\fR, \fB\-\-dir\fR -Only show directories +Only show directories. .TP \fB\-o\fR, \fB\-\-obj\fR -Only show objects +Only show objects. .TP \fB\-s\fR, \fB\-\-sym\fR -Only show symlinks +Only show symlinks. .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 used with \fB\-I\fR, print the package version next to name. +When listing the package contents, a single \fB\-v\fR displays +symlinks with an arrow (\->) to their target. Two or more \fB\-v\fR +adds colour to the entries and prints like \fB\-I\fR before the +list
[gentoo-commits] proj/portage-utils:master commit in: man/include/, man/
commit: 7de177d7ac1dff248f91e45bfdc3163629dae79e Author: Fabian Groffen gentoo org> AuthorDate: Mon Apr 2 18:59:02 2018 + Commit: Fabian Groffen gentoo org> CommitDate: Mon Apr 2 18:59:02 2018 + URL:https://gitweb.gentoo.org/proj/portage-utils.git/commit/?id=7de177d7 qgrep: improve documentation Bug: https://bugs.gentoo.org/645554 man/include/qgrep.desc | 3 +++ man/include/qgrep.optdesc.yaml | 5 man/qgrep.1| 54 +++--- 3 files changed, 38 insertions(+), 24 deletions(-) diff --git a/man/include/qgrep.desc b/man/include/qgrep.desc new file mode 100644 index 000..c95d35a --- /dev/null +++ b/man/include/qgrep.desc @@ -0,0 +1,3 @@ +\fIqgrep\fR searches for a given pattern in all ebuilds of the current +portage tree. Optionally the search is in all eclasses, or just in the +ebuilds that are currently installed. diff --git a/man/include/qgrep.optdesc.yaml b/man/include/qgrep.optdesc.yaml new file mode 100644 index 000..87b174e --- /dev/null +++ b/man/include/qgrep.optdesc.yaml @@ -0,0 +1,5 @@ +verbose: | +Print multiple matches per files. When this option is given +multiple times, also linenumber are printed for matches next to file +names. +quiet: Ignored for compatibility with other qapplets. diff --git a/man/qgrep.1 b/man/qgrep.1 index e31e45a..bd140b3 100644 --- a/man/qgrep.1 +++ b/man/qgrep.1 @@ -1,80 +1,86 @@ -.TH qgrep "1" "Mar 2016" "Gentoo Foundation" "qgrep" +.\" generated by mkman.py, please do NOT edit! +.TH qgrep "1" "Apr 2018" "Gentoo Foundation" "qgrep" .SH NAME qgrep \- grep in ebuilds .SH SYNOPSIS .B qgrep \fI[opts] \fR .SH DESCRIPTION - +\fIqgrep\fR searches for a given pattern in all ebuilds of the current +portage tree. Optionally the search is in all eclasses, or just in the +ebuilds that are currently installed. .SH OPTIONS .TP \fB\-I\fR, \fB\-\-invert\-match\fR -Select non-matching lines +Select non-matching lines. .TP \fB\-i\fR, \fB\-\-ignore\-case\fR -Ignore case distinctions +Ignore case distinctions. .TP \fB\-H\fR, \fB\-\-with\-filename\fR -Print the filename for each match +Print the filename for each match. .TP \fB\-N\fR, \fB\-\-with\-name\fR -Print the package or eclass name for each match +Print the package or eclass name for each match. .TP \fB\-c\fR, \fB\-\-count\fR -Only print a count of matching lines per FILE +Only print a count of matching lines per FILE. .TP \fB\-l\fR, \fB\-\-list\fR -Only print FILE names containing matches +Only print FILE names containing matches. .TP \fB\-L\fR, \fB\-\-invert\-list\fR -Only print FILE names containing no match +Only print FILE names containing no match. .TP \fB\-e\fR, \fB\-\-regexp\fR -Use PATTERN as a regular expression +Use PATTERN as a regular expression. .TP \fB\-x\fR, \fB\-\-extended\fR -Use PATTERN as an extended regular expression +Use PATTERN as an extended regular expression. .TP \fB\-J\fR, \fB\-\-installed\fR -Search in installed ebuilds instead of the tree +Search in installed ebuilds instead of the tree. .TP \fB\-E\fR, \fB\-\-eclass\fR -Search in eclasses instead of ebuilds +Search in eclasses instead of ebuilds. .TP \fB\-s\fR, \fB\-\-skip\-comments\fR -Skip comments lines +Skip comments lines. .TP \fB\-S\fR \fI\fR, \fB\-\-skip\fR \fI\fR -Skip lines matching +Skip lines matching . .TP \fB\-B\fR \fI\fR, \fB\-\-before\fR \fI\fR -Print lines of leading context +Print lines of leading context. .TP \fB\-A\fR \fI\fR, \fB\-\-after\fR \fI\fR -Print lines of trailing context +Print lines of trailing context. .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 +Print multiple matches per files. When this option is given +multiple times, also linenumber are printed for matches next to file +names. .TP \fB\-q\fR, \fB\-\-quiet\fR -Tighter output; suppress warnings +Ignored for compatibility with other qapplets. .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 "REPORTING BUGS" Please report bugs via http://bugs.gentoo.org/ .br -Product: Portage Development; Component: Tools +Product: Portage Development; Component: Tools, Assignee: +portage-ut...@gentoo.org .SH AUTHORS .nf Ned Ludd
[gentoo-commits] proj/portage-utils:master commit in: man/include/
commit: b7e95e98e237fed7ae4a78698cec0c42adf22f30 Author: Fabian Groffen gentoo org> AuthorDate: Mon Apr 2 17:39:01 2018 + Commit: Fabian Groffen gentoo org> CommitDate: Mon Apr 2 17:39:01 2018 + URL:https://gitweb.gentoo.org/proj/portage-utils.git/commit/?id=b7e95e98 typo man/include/qfile-05-collisions.include | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/man/include/qfile-05-collisions.include b/man/include/qfile-05-collisions.include index dcf0e49..1b8672d 100644 --- a/man/include/qfile-05-collisions.include +++ b/man/include/qfile-05-collisions.include @@ -9,7 +9,7 @@ takes one argument, which can be a package name (\fBbash\fP or packages (ie., comparing the contents of one package with the contents of all the others). .PP -For example, the following script will search collisions beetween all your +For example, the following script will search collisions between all your installed packages. Be careful, this will takes time: .nf\fI #!/bin/bash
[gentoo-commits] proj/portage-utils:master commit in: man/include/, man/
commit: ec9c281b4fd5d4b36927c2b004bbcd0fe11f2d76 Author: Fabian Groffen gentoo org> AuthorDate: Mon Apr 2 17:52:20 2018 + Commit: Fabian Groffen gentoo org> CommitDate: Mon Apr 2 17:52:20 2018 + URL:https://gitweb.gentoo.org/proj/portage-utils.git/commit/?id=ec9c281b qfile: update manpage Bug: https://bugs.gentoo.org/645554 man/include/qfile.desc | 4 man/include/qfile.optdesc.yaml | 7 +++ man/qfile.1| 40 3 files changed, 35 insertions(+), 16 deletions(-) diff --git a/man/include/qfile.desc b/man/include/qfile.desc new file mode 100644 index 000..08d4bb3 --- /dev/null +++ b/man/include/qfile.desc @@ -0,0 +1,4 @@ +\fIqfile\fR searches packages for files they provide. The searched +packages must be installed, thus the search is for any file on the +filesystem, to what package that file belongs. It allows to identify +which package installed a certain file. diff --git a/man/include/qfile.optdesc.yaml b/man/include/qfile.optdesc.yaml new file mode 100644 index 000..cb1cd7a --- /dev/null +++ b/man/include/qfile.optdesc.yaml @@ -0,0 +1,7 @@ +verbose: | +Print package versions to matches, warn about problems with +resolving symlinks or positioning packages under an alternative +root. +quiet: | +Don't print matching file for matches, just the package. Don't +report about orphan files. diff --git a/man/qfile.1 b/man/qfile.1 index 5bd58c7..ff92897 100644 --- a/man/qfile.1 +++ b/man/qfile.1 @@ -1,48 +1,55 @@ -.TH qfile "1" "Jun 2016" "Gentoo Foundation" "qfile" +.\" generated by mkman.py, please do NOT edit! +.TH qfile "1" "Apr 2018" "Gentoo Foundation" "qfile" .SH NAME qfile \- list all pkgs owning files .SH SYNOPSIS .B qfile \fI[opts] \fR .SH DESCRIPTION - +\fIqfile\fR searches packages for files they provide. The searched +packages must be installed, thus the search is for any file on the +filesystem, to what package that file belongs. It allows to identify +which package installed a certain file. .SH OPTIONS .TP \fB\-S\fR, \fB\-\-slots\fR -Display installed packages with slots +Display installed packages with slots. .TP \fB\-R\fR, \fB\-\-root\-prefix\fR -Assume arguments are already prefixed by $ROOT +Assume arguments are already prefixed by $ROOT. .TP \fB\-b\fR, \fB\-\-basename\fR -Match any component of the path +Match any component of the path. .TP \fB\-o\fR, \fB\-\-orphans\fR -List orphan files +List orphan files. .TP \fB\-x\fR \fI\fR, \fB\-\-exclude\fR \fI\fR -Don't look in package (used with --orphans) +Don't look in package (used with --orphans). .TP \fB\-e\fR, \fB\-\-exact\fR -Exact match (used with --exclude) +Exact match (used with --exclude). .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 +Print package versions to matches, warn about problems with +resolving symlinks or positioning packages under an alternative +root. .TP \fB\-q\fR, \fB\-\-quiet\fR -Tighter output; suppress warnings +Don't print matching file for matches, just the package. Don't +report about orphan files. .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 "FINDING FILES OWNERS" .PP This is the default behavior of \fBqfile\fP. It will list the packages which @@ -159,7 +166,7 @@ takes one argument, which can be a package name (\fBbash\fP or packages (ie., comparing the contents of one package with the contents of all the others). .PP -For example, the following script will search collisions beetween all your +For example, the following script will search collisions between all your installed packages. Be careful, this will takes time: .nf\fI #!/bin/bash @@ -202,7 +209,8 @@ TGL degrenier[at]easyconnect.fr .SH "REPORTING BUGS" Please report bugs via http://bugs.gentoo.org/ .br -Product: Portage Development; Component: Tools +Product: Portage Development; Component: Tools, Assignee: +portage-ut...@gentoo.org .SH AUTHORS .nf Ned Ludd
[gentoo-commits] proj/portage-utils:master commit in: man/, man/include/
commit: 9164549006068637d060a23a9a24f657982bfbaf Author: Fabian Groffen gentoo org> AuthorDate: Mon Apr 2 17:26:35 2018 + Commit: Fabian Groffen gentoo org> CommitDate: Mon Apr 2 17:26:35 2018 + URL:https://gitweb.gentoo.org/proj/portage-utils.git/commit/?id=91645490 qatom: improve manpage Bug: https://bugs.gentoo.org/645554 man/include/qatom.desc | 15 + man/include/qatom.optdesc.yaml | 43 man/qatom.1| 74 -- 3 files changed, 122 insertions(+), 10 deletions(-) diff --git a/man/include/qatom.desc b/man/include/qatom.desc new file mode 100644 index 000..10f0c1c --- /dev/null +++ b/man/include/qatom.desc @@ -0,0 +1,15 @@ +\fIqatom\fR parses strings into atoms and optionally compares them. The +parsing into atoms results in CATEGORY, PN (package name), PV (package +version), PR (package revision), SLOT and REPO. Next to these version +qualifiers (e.g.\ >, <, or =) and optional * suffix are extracted. All +but PN are optional. + +Comparison of atoms returns the relationship between two parsed atoms. +\fIqatom\fR does not allow to test conditions. It is possible to +perform multiple comparisons by simply adding more arguments. +Comparisons are, however, always performed two by two, so there must be +an even count of arguments to the compare function. + +The \fIqatom\fR applet is a direct wrapper around the atom parsing +functionalities used by various other applets. As such this applet +allows easy testing or atom parsing and comparison behaviour. diff --git a/man/include/qatom.optdesc.yaml b/man/include/qatom.optdesc.yaml new file mode 100644 index 000..e71dfb7 --- /dev/null +++ b/man/include/qatom.optdesc.yaml @@ -0,0 +1,43 @@ +format: | +Specify a custom output format. The default format is +.nf +%{CATEGORY} %{PN} %{PV} %[PR] %[SLOT] %[pfx] %[sfx] +.fi +Conversion specifiers start with a \fI%\fR symbol and are followed +by either \fI{\fR or \fI[\fR. Next is the name of the field to +expand, followed by a matching \fI}\fR or \fI]\fR. The difference +between \fI{\fR and \fI[\fR is that the latter is only printed if +the field referred is set, while the former prints \fI\fR in +that case. + +The following fields are supported, which are inline with the +variables from \fBebuild\fR(5). +.RS +.IP CATEGORY +The category of the package. +.IP P +The package name and version without the ebuild revision. +.IP PN +The package name. +.IP PV +The package version without the ebuild revision. +.IP PVR +The package version including ebuild revision, which is also printed +when zero, unlike for \fIPF\fR. +.IP PF +The package name, version and revision when not zero. Thus, a zero +revision \fI\-r0\fR is not printed. +.IP PR +The ebuild revision, when force printed, outputs \fI\-r0\fR when unset. +.IP SLOT +The package slot, when force printed, outputs \fI\-\fR when unset. +.IP REPO +The package repository. +.IP pfx +The package prefixes, that is version specifiers. +.IP sfx +The package suffices, currently that is just the asterisk. +.RE +verbose: Force all expansions, basically treat all \fI[\fR like \fI{\fR. +quiet: Ignored for compatibility with other qapplets. +nocolor: Ignored for compatibility with other qapplets. diff --git a/man/qatom.1 b/man/qatom.1 index 4a30343..aeb9629 100644 --- a/man/qatom.1 +++ b/man/qatom.1 @@ -1,41 +1,95 @@ -.TH qatom "1" "Mar 2016" "Gentoo Foundation" "qatom" +.\" generated by mkman.py, please do NOT edit! +.TH qatom "1" "Apr 2018" "Gentoo Foundation" "qatom" .SH NAME qatom \- split atom strings .SH SYNOPSIS .B qatom \fI[opts] \fR .SH DESCRIPTION +\fIqatom\fR parses strings into atoms and optionally compares them. The +parsing into atoms results in CATEGORY, PN (package name), PV (package +version), PR (package revision), SLOT and REPO. Next to these version +qualifiers (e.g.\ >, <, or =) and optional * suffix are extracted. All +but PN are optional. +Comparison of atoms returns the relationship between two parsed atoms. +\fIqatom\fR does not allow to test conditions. It is possible to +perform multiple comparisons by simply adding more arguments. +Comparisons are, however, always performed two by two, so there must be +an even count of arguments to the compare function. + +The \fIqatom\fR applet is a direct wrapper around the atom parsing +functionalities used by various other applets. As such this applet +allows easy testing or atom parsing and comparison behaviour. .SH OPTIONS .TP \fB\-F\fR \fI\fR, \fB\-\-format\fR \fI\fR -Custom output format (default: %{CATEGORY} %{PN} %{PV} %[PR] %[SLOT] %[pfx] %[sfx]) +Specify a custom output format. The default format is +.nf +%{CATEGORY} %{PN} %{PV} %[PR] %[SLOT] %[pfx] %[sfx] +.fi +Conversion specifiers start with a \fI%
[gentoo-commits] proj/portage-utils:master commit in: man/
commit: 684a8118721c28690b74fbdc3e74b351e799ffd8 Author: Fabian Groffen gentoo org> AuthorDate: Sun Apr 1 12:39:17 2018 + Commit: Fabian Groffen gentoo org> CommitDate: Sun Apr 1 12:39:17 2018 + URL:https://gitweb.gentoo.org/proj/portage-utils.git/commit/?id=684a8118 man/mkman: add header, allow argument description override man/mkman.py | 29 - 1 file changed, 24 insertions(+), 5 deletions(-) diff --git a/man/mkman.py b/man/mkman.py index 0751b92..8444311 100755 --- a/man/mkman.py +++ b/man/mkman.py @@ -1,4 +1,4 @@ -#!/usr/bin/python +#!/usr/bin/env python # -*- coding: utf-8 -*- """Generate man pages for the q applets""" @@ -14,6 +14,7 @@ import os import re import subprocess import sys +import yaml MKMAN_DIR = os.path.realpath(os.path.join(__file__, '..')) @@ -33,7 +34,8 @@ COMMON_AUTHORS = [ 'Ned Ludd ', 'Mike Frysinger ', ] -TEMPLATE = r""".TH %(applet)s "1" "%(date)s" "Gentoo Foundation" "%(applet)s" +TEMPLATE = r""".\" generated by mkman.py, please do NOT edit! +.TH %(applet)s "1" "%(date)s" "Gentoo Foundation" "%(applet)s" .SH NAME %(applet)s \- %(short_desc)s .SH SYNOPSIS @@ -47,7 +49,8 @@ TEMPLATE = r""".TH %(applet)s "1" "%(date)s" "Gentoo Foundation" "%(applet)s" .SH "REPORTING BUGS" Please report bugs via http://bugs.gentoo.org/ .br -Product: Portage Development; Component: Tools +Product: Portage Development; Component: Tools, Assignee: +portage-ut...@gentoo.org .SH AUTHORS .nf %(authors)s @@ -74,7 +77,15 @@ def MkMan(applets, applet, output): description = '' desc_file = os.path.join(FRAGS_DIR, '%s.desc' % applet) if os.path.exists(desc_file): -description = open(desc_file).read().rstrip() +fh = open(desc_file) +description = fh.read().rstrip() +fh.close() + +optdescs = [] +desc_file = os.path.join(FRAGS_DIR, '%s.optdesc.yaml' % applet) +if os.path.exists(desc_file): +with open(desc_file) as fh: +optdescs = yaml.load(fh) # Extract all the options options = [] @@ -89,6 +100,11 @@ def MkMan(applets, applet, output): flags += [option[0].rstrip(',')] option.pop(0) +optdesc = None +for x in flags: +if x.lstrip('-') in optdescs: +optdesc = optdescs[x.lstrip('-')].strip() + if option[0] in ('', '[arg]'): flags = [r'\fB%s\fR \fI%s\fR' % (x, option[0]) for x in flags] option.pop(0) @@ -98,10 +114,13 @@ def MkMan(applets, applet, output): assert option[0] == '*', 'help line for %s is broken: %r' % (applet, option) option.pop(0) +if not optdesc: +optdesc = ' '.join(option).rstrip('.') + '.' + options += [ '.TP', ', '.join(flags).replace('-', r'\-'), -' '.join(option), +optdesc, ] break
[gentoo-commits] proj/portage-utils:master commit in: man/, man/include/
commit: b10334e70c272bb554228acea075011925f260fb Author: Fabian Groffen gentoo org> AuthorDate: Sun Apr 1 12:44:30 2018 + Commit: Fabian Groffen gentoo org> CommitDate: Sun Apr 1 12:44:30 2018 + URL:https://gitweb.gentoo.org/proj/portage-utils.git/commit/?id=b10334e7 man/qlop: regen manpage commit fe42f2a99297fed36720e71ba2ed77cf7a9da804 changed the generated file, this commit ensures that future regenerate operations don't lose the changes man/include/qlop.desc | 4 man/include/qlop.optdesc.yaml | 15 +++ man/qlop.1| 26 +++--- 3 files changed, 34 insertions(+), 11 deletions(-) diff --git a/man/include/qlop.desc b/man/include/qlop.desc new file mode 100644 index 000..d99cc94 --- /dev/null +++ b/man/include/qlop.desc @@ -0,0 +1,4 @@ +.I qlop +reads from $EMERGE_LOG_DIR/emerge.log and tries to extract +information about merges, unmerges and syncs. For packages, it can +calculate average merge times or just list them. diff --git a/man/include/qlop.optdesc.yaml b/man/include/qlop.optdesc.yaml new file mode 100644 index 000..7864d6e --- /dev/null +++ b/man/include/qlop.optdesc.yaml @@ -0,0 +1,15 @@ +gauge: | +Gauge number of times a package has been merged. This shows the +merge time for each individual merge of package. +time: | +Calculate merge time for a specific package. This is the average +time for all merges of package. +human: | +Print seconds in human readable format (needs \fB\-t\fR), using +minutes, hours and days instead of just seconds. +current: | +Show current emerging packages. This relies on +.I FEATURES=sandbox +in order to detect running merges. +verbose: | +Print package versions and revisions. diff --git a/man/qlop.1 b/man/qlop.1 index 70fb411..c138054 100644 --- a/man/qlop.1 +++ b/man/qlop.1 @@ -1,26 +1,28 @@ -.TH qlop "1" "Mar 2018" "Gentoo Foundation" "qlop" +.\" generated by mkman.py, please do NOT edit! +.TH qlop "1" "Apr 2018" "Gentoo Foundation" "qlop" .SH NAME qlop \- emerge log analyzer .SH SYNOPSIS .B qlop \fI[opts] \fR .SH DESCRIPTION -qlop reads from $EMERGE_LOG_DIR/emerge.log and tries to extract +.I qlop +reads from $EMERGE_LOG_DIR/emerge.log and tries to extract information about merges, unmerges and syncs. For packages, it can calculate average merge times or just list them. .SH OPTIONS .TP \fB\-g\fR, \fB\-\-gauge\fR -Gauge number of times a package has been merged. This shows the merge -time for each individual merge of package. +Gauge number of times a package has been merged. This shows the +merge time for each individual merge of package. .TP \fB\-t\fR, \fB\-\-time\fR -Calculate merge time for a specific package. This is the average time -for all merges of package. +Calculate merge time for a specific package. This is the average +time for all merges of package. .TP \fB\-H\fR, \fB\-\-human\fR -Print seconds in human readable format (needs -t), using minutes, hours -and days instead of just seconds. +Print seconds in human readable format (needs \fB\-t\fR), using +minutes, hours and days instead of just seconds. .TP \fB\-l\fR, \fB\-\-list\fR Show merge history. @@ -32,8 +34,9 @@ Show unmerge history. Show sync history. .TP \fB\-c\fR, \fB\-\-current\fR -Show current emerging packages. This relies on FEATURES=sandbox in -order to detect running merges. +Show current emerging packages. This relies on +.I FEATURES=sandbox +in order to detect running merges. .TP \fB\-d\fR \fI\fR, \fB\-\-date\fR \fI\fR Limit selection to this time (1st -d is start, 2nd -d is end). @@ -62,7 +65,8 @@ Print version and exit. .SH "REPORTING BUGS" Please report bugs via http://bugs.gentoo.org/ .br -Product: Portage Development; Component: Tools +Product: Portage Development; Component: Tools, Assignee: +portage-ut...@gentoo.org .SH AUTHORS .nf Ned Ludd
[gentoo-commits] proj/portage-utils:master commit in: man/, man/include/
commit: 3b1cb130c9d20ef0d1190d7b7baf25a910765167 Author: Fabian Groffen gentoo org> AuthorDate: Sun Apr 1 13:47:10 2018 + Commit: Fabian Groffen gentoo org> CommitDate: Sun Apr 1 13:47:10 2018 + 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