tech-pkg archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
new search tool based on pkg_summary again
New part of wip/pkg_summary-utils - pkg_grep_summary, multifield
searcher for pkgsrc, of course based on pkg_summary.
hint: pkgsrc binary repository is (IMHO should be) described by
packages summary in pkg_summary(5) format. Tools operating with
summaries are actually oriented (but not limited) to binary pkgsrc
repositories.
--------------------------------------------------------------------
pkg_grep_summary - output summaries about packages that matches
the specified condition.
In other words, pkg_grep_summary is a search tool,
just like PKGSRCDIR/pkglocate, pkg_find etc. but it is multifield
searcher and is very fast because it uses summaries.
usage: pkg_grep_summary [OPTIONS] <FIELD> <AWK_CONDITION>
<FIELD> - PKGNAME, PKGPATH, DEPENDS etc.
<AWK_CONDITION> - boolean expression written in AWK language
OPTIONS:
-h|--help display this message
examples:
pkg_grep_summary 'PKGNAME' '$2 ~ /judy/' \
< /usr/pkgsrc/packages/pkg_summary.txt
pkg_grep_summary 'PKGPATH' '$2 ~ /^lang\//' \
< /usr/pkgsrc/packages/pkg_summary.txt
pkg_grep_summary 'DEPENDS' '$2 ~ /libX/' \
< /usr/pkgsrc/pkg_src_summary.txt
pkg_grep_summary 'COMMENT' 'toupper($2) ~ /DNS/' \
< /usr/pkgsrc/pkg_src_summary.txt
--------------------------------------------------------------------
P.S.
Plans for nearest future: rfc822_to_summary.
The information about Debian packages are in RFC822 format.
--
Best regards, Aleksey Cheusov.
Home |
Main Index |
Thread Index |
Old Index