pkg_grep_summary:
- update manual page - fix for PKGPATHe - ++patchlevel - one more regression test
This commit is contained in:
parent
8ef59d92ce
commit
3c6dd17086
6 changed files with 67 additions and 35 deletions
|
@ -1,4 +1,4 @@
|
|||
.\" $NetBSD: pkg_grep_summary.1,v 1.10 2010/03/24 14:27:05 cheusov Exp $
|
||||
.\" $NetBSD: pkg_grep_summary.1,v 1.11 2010/03/27 21:45:33 cheusov Exp $
|
||||
.\"
|
||||
.\" Copyright (c) 2008 by Aleksey Cheusov (vle@gmx.net)
|
||||
.\" Absolutely no warranty.
|
||||
|
@ -20,7 +20,7 @@ pkg_grep_summary \- tool for grepping pkgsrc summary file
|
|||
.SH SYNOPSIS
|
||||
.B "pkg_grep_summary -h"
|
||||
.br
|
||||
.BI pkg_grep_summary " field awk_condition"
|
||||
.BI pkg_grep_summary " field awk_expression"
|
||||
.br
|
||||
.BI "pkg_grep_summary -e" " field"
|
||||
.br
|
||||
|
@ -32,18 +32,28 @@ pkg_grep_summary \- tool for grepping pkgsrc summary file
|
|||
.br
|
||||
.SH DESCRIPTION
|
||||
.B pkg_grep_summary
|
||||
outputs a summary information about packages that matches
|
||||
the specified condition.
|
||||
takes package summaries on stdin and
|
||||
outputs those matching the specified condition.
|
||||
Format of summary is described in
|
||||
.BR pkg_summary(5) .
|
||||
Fields are PKGPATH, PKGNAME, DEPENDS, MAINTAINER
|
||||
and so on, actually anything present in input.
|
||||
In addition to fields really present in input two artificial fields
|
||||
are supported: PKGBASE and PKGPATHe. PKGBASE
|
||||
is a PKGNAME with package version stripped. PKGPATHe (enriched PKGPATH)
|
||||
is PKGPATH with ASSIGNMENTS
|
||||
(if present) separated by colon symbol.
|
||||
One may think that
|
||||
.B pkg_grep_summary
|
||||
is a search tool
|
||||
somewhat similar to
|
||||
grep, PKGSRCDIR/pkglocate, pkg_find
|
||||
etc. but it is a multifield
|
||||
searcher and is fast because it uses summaries instead
|
||||
of pkgsrc packages source tree.
|
||||
In addition to fields really present in input, PKGBASE is also supported,
|
||||
it is a PKGNAME with package version stripped.
|
||||
is a search tool somewhat similar to
|
||||
.BR grep(1) ", " PKGSRCDIR/pkglocate ", " pkgfind
|
||||
etc. but it is different. Unlike
|
||||
.B grep(1)
|
||||
.B pkg_grep_summary
|
||||
uses a summary for one package instead of line of text as a basic element.
|
||||
Unlike
|
||||
.B pkgfind
|
||||
it doesn't scan pkgsrc source and therefore works drammatically faster.
|
||||
.SH OPTIONS
|
||||
.TP
|
||||
.B "-h|--help"
|
||||
|
@ -74,26 +84,26 @@ one string per line, and outputs summary given on stdin if
|
|||
is equal to one of read strings.
|
||||
.SH EXAMPLES
|
||||
.VB
|
||||
pkg_grep_summary -s 'PKGPATH' 'devel/libjudy'
|
||||
pkg_grep_summary -s PKGPATH 'devel/libjudy'
|
||||
|
||||
pkg_grep_summary -m 'PKGPATH' '^wip/'
|
||||
pkg_grep_summary -m PKGPATH '^wip/'
|
||||
|
||||
pkg_info -Xa | pkg_grep_summary SIZE_PKG 'fvalue+0 > 100000000'
|
||||
|
||||
pkg_grep_summary 'PKGNAME' 'fvalue ~ /judy/' \\
|
||||
pkg_grep_summary PKGNAME 'fvalue ~ /judy/' \\
|
||||
< /usr/pkgsrc/packages/pkg_summary.txt
|
||||
|
||||
pkg_grep_summary 'PKGPATH' 'fvalue ~ /^lang\\//' \\
|
||||
pkg_grep_summary PKGPATH 'fvalue ~ /^lang\\//' \\
|
||||
< /usr/pkgsrc/packages/pkg_summary.txt
|
||||
|
||||
pkg_grep_summary 'DEPENDS' 'fvalue ~ /libX11/' \\
|
||||
pkg_grep_summary DEPENDS 'fvalue ~ /libX11/' \\
|
||||
< /usr/pkgsrc/pkg_src_summary.txt
|
||||
|
||||
pkg_grep_summary 'COMMENT' 'toupper(fvalue) ~ /DNS/' \\
|
||||
pkg_grep_summary COMMENT 'toupper(fvalue) ~ /DNS/' \\
|
||||
< /usr/pkgsrc/pkg_src_summary.txt
|
||||
|
||||
pkg_info -QPKGPATH -a > /tmp/wanted_pkgpaths.txt
|
||||
pkg_grep_summary -S 'PKGPATH' /tmp/wanted_pkgpaths.txt \\
|
||||
pkg_grep_summary -S PKGPATH /tmp/wanted_pkgpaths.txt \\
|
||||
< /usr/pkgsrc/packages/pkg_summary.txt
|
||||
.VE
|
||||
.SH SEE ALSO
|
||||
|
|
|
@ -49,7 +49,7 @@ function check_PKGPATHe (){
|
|||
}
|
||||
}
|
||||
|
||||
grep_summary__skip == -1{
|
||||
grep_summary__skip == -1 {
|
||||
if (grep_summary__field == "PKGBASE"){
|
||||
if (fname == "PKGNAME"){
|
||||
fname = "PKGBASE"
|
||||
|
@ -89,6 +89,11 @@ grep_summary__skip == -1 && NF > 0 {
|
|||
}
|
||||
|
||||
NF == 0 {
|
||||
if (grep_summary__skip == -1 && grep_summary__field == "PKGPATHe"){
|
||||
fvalue = pkgpath
|
||||
update_skip()
|
||||
fvalue = ""
|
||||
}
|
||||
if (grep_summary__skip == -1){
|
||||
update_skip()
|
||||
}
|
||||
|
|
|
@ -48,19 +48,6 @@ OPTIONS:
|
|||
-s matches <field> equal to <string>
|
||||
-S matches <field> equal to any string in <file>,
|
||||
one string per line
|
||||
EXAMPLES:
|
||||
pkg_grep_summary -s PKGBASE distbb
|
||||
pkg_grep_summary -s 'PKGPATH' 'devel/libjudy'
|
||||
pkg_grep_summary -m 'PKGPATH' '^wip/'
|
||||
pkg_grep_summary 'PKGNAME' 'fvalue ~ /judy/'
|
||||
pkg_grep_summary 'PKGPATH' 'fvalue ~ /^lang\//' \\
|
||||
< /usr/pkgsrc/packages/pkg_summary.txt
|
||||
pkg_grep_summary 'DEPENDS' 'fvalue ~ /libX/'
|
||||
pkg_grep_summary 'COMMENT' 'toupper(fvalue) ~ /DNS/' \\
|
||||
pkg_grep_summary -e 'NO_BIN_ON_FTP' \\
|
||||
< /usr/pkgsrc/pkg_src_summary.txt
|
||||
pkg_grep_summary -e 'NO_BIN_ON_CDROM'
|
||||
pkg_grep_summary -S 'PKGPATH' wanted_pkgpaths.txt
|
||||
EOF
|
||||
}
|
||||
|
||||
|
|
|
@ -284,6 +284,35 @@ COMMENT=Apache 2 module LDAP Virtual Hosts support
|
|||
MAINTAINER=imil@gcu.info
|
||||
CATEGORIES=www databases
|
||||
|
||||
--------------------------------------------------
|
||||
------- args: 'pkg_grep_summary' '-S' 'PKGPATHe' 'pkgs.txt'
|
||||
PKGNAME=distbb-0.22.0
|
||||
PKGPATH=wip/distbb
|
||||
DEPENDS=pkg_summary-utils>=0.18.1:../../wip/pkg_summary-utils paexec>=0.10.0:../../wip/paexec runawk>=0.13.0:../../wip/runawk
|
||||
BUILD_DEPENDS= checkperms>=1.1:../../sysutils/checkperms
|
||||
HOMEPAGE=http://mova.org/~cheusov/pub/distbb/
|
||||
COMMENT=DISTributed Bulk Build tool for pkgsrc
|
||||
MAINTAINER=cheusov@tut.by
|
||||
CATEGORIES=pkgtools
|
||||
EXFIELD=XVALUE1
|
||||
|
||||
BUILD_DEPENDS= libtool-base>=1.5.18nb5:../../devel/libtool-base gmake>=3.81:../../devel/gmake checkperms>=1.1:../../sysutils/checkperms
|
||||
PKGNAME=dict-server-1.10.11nb2
|
||||
PKGPATH=wip/dict-server
|
||||
DEPENDS= libmaa>=1.2:../../devel/libmaa
|
||||
HOMEPAGE=http://www.dict.org/
|
||||
COMMENT=Dictionary Service Protocol server
|
||||
MAINTAINER=cheusov@tut.by
|
||||
CATEGORIES=textproc
|
||||
|
||||
PKGNAME=png-1.2.32beta01
|
||||
PKGPATH=graphics/png
|
||||
BUILD_DEPENDS= libtool-base>=1.5.18nb5:../../devel/libtool-base checkperms>=1.1:../../sysutils/checkperms
|
||||
HOMEPAGE=http://www.libpng.org/pub/png/
|
||||
COMMENT=Library for manipulating PNG images
|
||||
MAINTAINER=wiz@NetBSD.org
|
||||
CATEGORIES=graphics
|
||||
|
||||
--------------------------------------------------
|
||||
------- pkg_cmp_summary #1.1
|
||||
- ap2-vhost-ldap 1.2.0nb1
|
||||
|
|
|
@ -68,7 +68,8 @@ runtest pkg_grep_summary -s PKGPATHe www/ap2-vhost-ldap:PKG_APACHE=apache2 \
|
|||
runtest pkg_grep_summary -s PKGPATH www/ap22-vhost-ldap < src_summary.txt
|
||||
runtest pkg_grep_summary -s PKGPATH www/ap2-vhost-ldap < src_summary.txt
|
||||
|
||||
runtest pkg_grep_summary -S PKGPATH pkgs.txt < src_summary.txt
|
||||
runtest pkg_grep_summary -S PKGPATH pkgs.txt < src_summary.txt
|
||||
runtest pkg_grep_summary -S PKGPATHe pkgs.txt < src_summary.txt
|
||||
|
||||
|
||||
|
||||
|
|
|
@ -1 +1 @@
|
|||
VERSION= 0.37.0
|
||||
VERSION= 0.37.1
|
||||
|
|
Loading…
Reference in a new issue