This is the mail archive of the cygwin-patches@cygwin.com mailing list for the Cygwin project.
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |
Other format: | [Raw text] |
Corinna, Thanks for the feedback. Replies inline below. On Fri, 15 Aug 2003, Corinna Vinschen wrote: > On Thu, Aug 14, 2003 at 03:30:44PM -0400, Igor Pechtchanski wrote: > > This patch adds the functionality to cygcheck to list (using the "-l" or > > "--list-package" flag) the contents of and search (using the "-f" or > > "--find-package" flag and passing the absolute paths to the files) for > > files in the *installed* packages. Please test this and feel free to give > > feedback. I've done some refactoring of the code in dump_setup.cc as > > Cool, especially the -f which allows the same as `rpm -qf'. However, > you asked for feedback... (I dropped the "Use -h to see..." from below > examples, we should get rid of it anyway) > > 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. > But we have two problems which are no problems in Linux and it would be > nice(TM) to have a neat solution for them. Example: > > $ cygcheck -f /usr/bin/tcsh > $ > > Huh? No .exe, no package :-( > > $ cygcheck -f /bin/tcsh > $ Fixed. One thing left to do is to verify that /usr/bin is indeed an alias for /bin (and /usr/lib an alias for /lib) -- although I think plenty of other things will break if this is not the case. > Do you see what I mean? Since /bin and /usr/bin (same for /lib) are > the same directory, one could ask for the same file in /bin and would > not get the package reply. Bummer. I don't see that as a big problem > for files in /lib but I guess you should expect that a good bunch of > people don't get the idea to ask for the same file in /usr/bin again. > > Corinna 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 <pechtcha@cs.nyu.edu> * 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. -- http://cs.nyu.edu/~pechtcha/ |\ _,,,---,,_ pechtcha@cs.nyu.edu ZZZzz /,`.-'`' -. ;-;;,_ igor@watson.ibm.com |,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
Attachment:
cygcheck-list-packages.patch
Description: Text document
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |