From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 2155) id 61E043858C2F; Sun, 29 Jan 2023 16:53:02 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 61E043858C2F DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1675011182; bh=cb1s5gdrQHt+fSOySOIqFNihn96xEyHT+WJYuCXK7ck=; h=From:To:Subject:Date:From; b=jZy5gVGwvsqqORrFnIUk8GDhdRoRaI7Kq4bUBaqba03RH8Xel7CXhzsVCz5C782Dq m3R9hV3WcNyw8iSVocSex7DBwEzhsWwejwN8y0nu7PqYF0SN40uMu9w5u4jS8F2EHm GmOQZCKEXMEl/iYiqOO2sE+I+H/OmOLbtfmLk0r0= Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable From: Corinna Vinschen To: cygwin-cvs@sourceware.org Subject: [newlib-cygwin/main] Cygwin: cygcheck: improve documentation X-Act-Checkin: newlib-cygwin X-Git-Author: Corinna Vinschen X-Git-Refname: refs/heads/main X-Git-Oldrev: 603f880cb7d3c15a4ac25e976dbc4b721f5a2922 X-Git-Newrev: 784a141e0f96150abd91e71164aa5415d2a1aa82 Message-Id: <20230129165302.61E043858C2F@sourceware.org> Date: Sun, 29 Jan 2023 16:53:02 +0000 (GMT) List-Id: https://sourceware.org/git/gitweb.cgi?p=3Dnewlib-cygwin.git;h=3D784a141e0f9= 6150abd91e71164aa5415d2a1aa82 commit 784a141e0f96150abd91e71164aa5415d2a1aa82 Author: Corinna Vinschen AuthorDate: Sun Jan 29 17:52:13 2023 +0100 Commit: Corinna Vinschen CommitDate: Sun Jan 29 17:52:13 2023 +0100 Cygwin: cygcheck: improve documentation =20 Signed-off-by: Corinna Vinschen Diff: --- winsup/doc/utils.xml | 85 ++++++++++++++++++++++++++++++++++++++= ++-- winsup/utils/mingw/cygcheck.cc | 11 +++--- 2 files changed, 87 insertions(+), 9 deletions(-) diff --git a/winsup/doc/utils.xml b/winsup/doc/utils.xml index 71c220d3006d..8e698ac4c1fa 100644 --- a/winsup/doc/utils.xml +++ b/winsup/doc/utils.xml @@ -131,6 +131,20 @@ cygcheck -k + + cygcheck + -e + PATTERN= + + + cygcheck + -i + --inst + --curr + --prev + --test + PATTERN= + cygcheck -f @@ -171,6 +185,16 @@ At least one command option or a PROGRAM is required, = as shown above. -r, --registry also scan registry for Cygwin settings (with -s) -k, --keycheck perform a keyboard check session (must be run from a plain console only, not from a pty/rxvt/xterm) + -e, --search-package list all available packages matching PATTERN + PATTERN is a glob pattern with * and ? as wildcard = chars + -i, --info-package print full info on packages matching PATTERN, insta= lled + and available packages + PATTERN is a glob pattern with * and ? as wildcard = chars + info selection specifiers (multiple allowed): + --inst only print info on installed package + --curr only print info on most recent available package + --prev only print info on older, but still available pack= ages + --test only print info on test packages -f, --find-package find the package to which FILE belongs -l, --list-package list contents of PACKAGE (or all packages if none g= iven) -p, --package-query search for REGEXP in the entire cygwin.com package @@ -184,9 +208,11 @@ At least one command option or a PROGRAM is required, = as shown above. with another command, otherwise print this help -V, --version print the version of cygcheck and exit =20 -Note: -c, -f, and -l only report on packages that are currently installed.= To - search all official Cygwin packages use -p instead. The -p REGEXP match= es - package names, descriptions, and names of files/paths within all package= s. +Notes: + -c, -f, and -l only report on packages that are currently installed. + -i and -e report on available packages, too. To search for files within + uninstalled Cygwin packages, use -p. The -p REGEXP matches package name= s, + descriptions, and names of files/paths within all packages. =20 @@ -218,6 +244,57 @@ Note: -c, -f, and -l only report on packages that are = currently installed. To list one or more programs on the command line and specify -s, cygcheck will report on both. + The -e option allows to seach for available + packages in the Cygwin distribution. PATTERN is + a glob pattern, using * and ? as wildcard characters, just as in + filename patterns. PATTERN is searched for in + the package name and the summary of a package. + The -i option prints a lot of information + available for installed packages, as well as for available packages + in the Cygwin distribution. PATTERN is a glob + pattern, using * and ? as wildcard characters, just as in filename + patterns. PATTERN is compared against the + package name as well as against the combined package name and versio= n. + With additional info selectors, --inst, + --curr, --prev, and + --test, allow to specify that only information + in terms of installed, current latest available, older available, + as well as test packages respectively, is requested. + + Example <command>cygcheck</command= > -e/-i + usage + +$ cygcheck -e grep +grep : search for regular expression matches in text files +grep-debuginfo : Debug info for grep +grepmail : search mailboxes for mail matching an expression +pdfgrep : Command-line utility for searching text in PDFs +pdfgrep-debuginfo : Debug info for pdfgrep +sgrep : Search indexed text regions like SGML,XML and HTML files + +$ cygcheck -i --curr grep +Latest available package: +------------------------- + +Name : grep +Version : 3.8 +Release : 2 +Architecture: x86_64 +Size : 401340 (392 K) +Source : grep-3.8-2-src.tar.xz +Summary : search for regular expression matches in text files +Description : +GNU grep searches one or more input files for lines containing a +match to a specified pattern. By default, grep outputs the matching lines. +The GNU implementation includes several useful extensions over POSIX. + + + + + Note that -e and -i + options fetch info from a distribution db file. This file will be + downloading on demand and refreshed if it's older than 24 hours. The -f option helps you to track down which package a file came from, and -l lists all files = in a package. For example, to find out about @@ -225,7 +302,7 @@ Note: -c, -f, and -l only report on packages that are c= urrently installed. To =20 Example <command>cygcheck</command> + id=3D"utils-cygcheck-ex"><title>Example <command>cygcheck</command> = -f/-l usage $ cygcheck -f /usr/bin/less diff --git a/winsup/utils/mingw/cygcheck.cc b/winsup/utils/mingw/cygcheck.cc index 7386ff9f7910..f4107176fd01 100644 --- a/winsup/utils/mingw/cygcheck.cc +++ b/winsup/utils/mingw/cygcheck.cc @@ -2738,7 +2738,7 @@ Usage: cygcheck [-v] [-h] PROGRAM\n\ cygcheck -k\n\ cygcheck -f FILE [FILE]...\n\ cygcheck -l [PACKAGE]...\n\ - cygcheck -i [--inst,--curr,--prev,--test] [PATTERN]...\n\ + cygcheck -i [--inst] [--curr] [--prev] [--test] [PATTERN]...\n\ cygcheck -e [PATTERN]...\n\ cygcheck -p REGEXP\n\ cygcheck --delete-orphaned-installation-keys\n\ @@ -2760,7 +2760,7 @@ At least one command option or a PROGRAM is required,= as shown above.\n\ -i, --info-package print full info on packages matching PATTERN, insta= lled\n\ and available packages\n\ PATTERN is a glob pattern with * and ? as wildcard = chars\n\ - info selection specifiers (multiple allowed):\n\ + info selection specifiers (multiple allowed):\n\ --inst only print info on installed package\n\ --curr only print info on most recent available package\n\ --prev only print info on older, but still available pack= ages\n\ @@ -2780,9 +2780,10 @@ At least one command option or a PROGRAM is required= , as shown above.\n\ -V, --version print the version of cygcheck and exit\n\ \n\ Notes:\n\ - -c, -f, and -l only report on packages that are currently installed. To\= n\ - search all official Cygwin packages use -p instead. The -p REGEXP match= es\n\ - package names, descriptions, and names of files/paths within all package= s.\n\ + -c, -f, and -l only report on packages that are currently installed.\n\ + -i and -e report on available packages, too. To search for files within= \n\ + uninstalled Cygwin packages, use -p. The -p REGEXP matches package name= s,\n\ + descriptions, and names of files/paths within all packages.\n\ \n"); exit (status); }