Hi,
As requested on cygwin-developers@ and cygwin@, this patch adds a flag
("-d", or "--dump-only") that instructs cygcheck to not check for the
presense of all package files on "-c". So, to get the "old" "cygcheck -c"
functionality, call "cygcheck -cd".
Igor
==============================================================================
ChangeLog:
2003-09-11 Igor Pechtchanski <[EMAIL PROTECTED]>
* cygcheck.cc (dump_only): New global variable.
(usage): Add "--dump-only" option, fix "--verbose" line.
(longopts, opts): Add "--dump-only" option.
(main): Process the "--dump-only" flag. Add new semantic check.
Pass dump_only information to dump_setup().
--
http://cs.nyu.edu/~pechtcha/
|\ _,,,---,,_ [EMAIL PROTECTED]
ZZZzz /,`.-'`' -. ;-;;,_ [EMAIL PROTECTED]
|,4- ) )-,_. ,\ ( `'-' Igor Pechtchanski, Ph.D.
'---''(_/--' `-'\_) fL a.k.a JaguaR-R-R-r-r-r-.-.-. Meow!
"I have since come to realize that being between your mentor and his route
to the bathroom is a major career booster." -- Patrick Naughton
Index: winsup/utils/cygcheck.cc
===================================================================
RCS file: /cvs/src/src/winsup/utils/cygcheck.cc,v
retrieving revision 1.37
diff -u -p -r1.37 cygcheck.cc
--- winsup/utils/cygcheck.cc 11 Sep 2003 02:56:40 -0000 1.37
+++ winsup/utils/cygcheck.cc 11 Sep 2003 15:04:07 -0000
@@ -26,6 +26,7 @@ int sysinfo = 0;
int givehelp = 0;
int keycheck = 0;
int check_setup = 0;
+int dump_only = 0;
int find_package = 0;
int list_package = 0;
@@ -1322,8 +1323,9 @@ Usage: cygcheck [OPTIONS] [PROGRAM...]\n
Check system information or PROGRAM library dependencies\n\
\n\
-c, --check-setup check packages installed via setup.exe\n\
+ -d, --dump-only no integrity checking of package contents (requires -c)\n\
-s, --sysinfo system information (not with -k)\n\
- -v, --verbose verbose output (indented) (for -s or programs)\n\
+ -v, --verbose verbose output (indented) (for -[cfls] or programs)\n\
-r, --registry registry search (requires -s)\n\
-k, --keycheck perform a keyboard check session (not with -[scfl])\n\
-f, --find-package find installed packages containing files (not with -[cl])\n\
@@ -1336,6 +1338,7 @@ You must at least give either -s or -k o
struct option longopts[] = {
{"check-setup", no_argument, NULL, 'c'},
+ {"dump-only", no_argument, NULL, 'd'},
{"sysinfo", no_argument, NULL, 's'},
{"registry", no_argument, NULL, 'r'},
{"verbose", no_argument, NULL, 'v'},
@@ -1347,7 +1350,7 @@ struct option longopts[] = {
{0, no_argument, NULL, 0}
};
-static char opts[] = "cfhklrsvV";
+static char opts[] = "cdfhklrsvV";
static void
print_version ()
@@ -1386,6 +1389,9 @@ main (int argc, char **argv)
case 'c':
check_setup = 1;
break;
+ case 'd':
+ dump_only = 1;
+ break;
case 'r':
registry = 1;
break;
@@ -1425,6 +1431,9 @@ main (int argc, char **argv)
if ((find_package || list_package) && check_setup)
usage (stderr, 1);
+ if (dump_only && !check_setup)
+ usage (stderr, 1);
+
if (find_package && list_package)
usage (stderr, 1);
@@ -1446,7 +1455,7 @@ main (int argc, char **argv)
if (check_setup)
{
- dump_setup (verbose, argv, true);
+ dump_setup (verbose, argv, !dump_only);
}
else if (find_package)
{