Check if a package is installed

marco atzeri
Mon Oct 1 12:34:00 GMT 2012

On 10/1/2012 1:38 PM, Vincent Rivière wrote:
> On 01/10/2012 13:24, marco atzeri wrote:
>> cygcheck -c <package>
> Thanks, this is what I looked for.
> However, I notice that:
> 1) If the .lst.gz file is missing, "cygcheck -c <package>" still reports
> OK.

a package with a missing .lst.gz , should be a obsolete and empty.
Usually are package labels left to pull in the alternative package.

> 2) When testing a missing package, "cygcheck -c <package>" does not
> output any status line, but its return code is still 0. This is not easy
> to use from scripts.

try using grep.

I damaged the xv package as following:

$ cygcheck -c  -v xz
Cygwin Package Information
Last downloaded files to: e:\downloads\cygwin_cache
Last downloaded files from:

Package              Version              Status
Missing file: /usr/bin/xz.exe from package xz
xz                   5.0.2_20110517-1     Incomplete

using grep I can find the failing package

$ cygcheck -c xz |grep OK ; echo $?

while usually I have

$ cygcheck -c xz |grep OK ; echo $?
xz                   5.0.2_20110517-1     OK


Problem reports:
Unsubscribe info:

More information about the Cygwin mailing list