On Fri, Aug 15, 2003 at 03:38:30PM -0400, Igor Pechtchanski wrote: > > On Cygwin: > > > > $ cygcheck -f /usr/bin/tcsh.exe > > /usr/bin/tcsh.exe: found in package tcsh-6.12.00-6 > > > > On Linux: > > > > $ rpm -qf /usr/bin/tcsh > > tcsh-6.12.00-134 > > > > Shouldn't we also just print the package name? It doesn't really matter, > > just a question... > > Fixed.
I'm happy! Another difference to Linux is when using -l. rpm -ql doesn't prepend the package version to each file list, it just prints a list of files of all packages on the command line: $ rpm -ql bash tcsh /bin/bash [more bash files] /usr/bin/tcsh [more tcsh files] $ On Cygwin: $ cygcheck -l bash tcsh Package: bash-2.05b-12 /usr/bin/bash.exe [more bash files] Package: tcsh-6.12.00-7 /usr/bin/tcsh.exe [more tcsh files] $ Should we do it also like rpm or do you like it better as it is? > Well, I agree with all the above points, so here's another iteration. > Same ChangeLog (except for the date -- reposting just in case). > Igor > ============================================================================== > ChangeLog: > 2003-08-15 Igor Pechtchanski <[EMAIL PROTECTED]> > > * cygcheck.cc (find_package,list_package): New global > variables. > (usage): Add "--find-package" and "--list-package" options, > reformat output. > (longopts, opts): Add "--find-package" and "--list-package" > options. > (main): Process the "--find-package" and "--list-package" > flags. Add new semantic checks. Add calls to find_package() > and list_package(). > * dump_setup.cc: Fix header comment. > (match_argv): Change return type to int to distinguish > between real matches and default ones. > (open_package_list): New static function. > (check_package_files): Factor out opening the package list > file into open_package_list(). > (get_packages): New static function. > (dump_setup): Factor out getting a list of packages into > get_packages(). > (package_list, package_find): New global functions. I've checked it in and added some formatting changes. I removed most of the `puts("");' lines and the "Use -h to see..." is now only printed where it belongs to, to the end of a sysinfo dump. Oh, and the other helptext ("Here is where the OS will...") would have been printed also on -f -h or -l -h, I've fixed the if clause appropriately. Thanks for the patch, it's really cool, Corinna -- Corinna Vinschen Please, send mails regarding Cygwin to Cygwin Developer mailto:[EMAIL PROTECTED] Red Hat, Inc.