Chkcat

Check the catalog

There's also a simple check that the catalog is correct. It checks that every line is eight fields and that the dependency and category fields begin and end with chars. It also warns if packages are not compressed (normal for gzip and pkg-get). It also checks for duplicates and missing or circular dependencies.

Test run on a manipulated catalog:

# chkcat
chkcat, check CSW catalogs for problems.

Usage: chkcat [-veqfh] <catalog file>

  -v, --verbose         Verbose mode
  -e, --erroronly       Only show errors (supress warnings)
  -q, --quiet           No output (only return codes)
  -f, --format=x        Set catalog format ([8]|9)
  -h, --help            Show this help

Written and maintained by Peter Bonivart.
# chkcat /var/opt/csw/pkgutil/catalog
Skipping signature.
Skipping comment.
Skipping comment.
Skipping comment.

ERROR! 7 fields instead of normal 8.
2.2.4,REV=2008.10.01 CSWlibtoolrt libtool_rt-2.2.4,REV=2008.10.01-SunOS5.8-sparc-CSW.pkg.gz 72ae2f64521df6e18b7d665bbf11e984 82427 CSWisaexec|CSWcommon none

ERROR! 7 fields instead of normal 8.
rubydoc 1.8.7,REV=2008.09.19_p72 CSWrubydoc rubydoc-1.8.7,REV=2008.09.19_p72-SunOS5.8-i386-CSW.pkg.gz d47700240d7c675e5f843b03a937c28e 3032323 none

WARNING! Package CSWrubytk is not compressed.
rubytk 1.8.7,REV=2008.09.19_p72 CSWrubytk rubytk-1.8.7,REV=2008.09.19_p72-SunOS5.8-i386-CSW.pkg 2215ac92175922c593245ef577e92fc9 317259 CSWruby|CSWtcl|CSWtk|CSWcommon none

ERROR! The category field of package CSWspamassassin begins with a non-char.
spamassassin 3.2.5,REV=2008.10.21 CSWspamassassin spamassassin-3.2.5,REV=2008.10.21-SunOS5.8-i386-CSW.pkg.gz e5bd858be4a67023b02ee1e5e760295b 896877 CSWosslrt|CSWperl|CSWpmarchivetar|CSWpmdbi|CSWpmdigestsha1|CSWpmiosocketinet6|CSWpmiosocketssl|CSWpmiozlib|CSWpmipcountry|CSWpmldap|CSWpmlibwww|CSWpmmaildkim|CSWpmmailspf|CSWpmmailtools|CSWpmmimebase64|CSWpmnetdns|CSWpmuri|CSWpmhtmlparser|CSWzlib|CSWcommon +none

ERROR! The dependency field of package CSWxv ends with a pipe char.
xv 3.10a,REV=2008.10.17 CSWxv xv-3.10a,REV=2008.10.17-SunOS5.8-i386-CSW.pkg.gz 9de3c40048fc8c9f79616ee388fc98f1 1731846 CSWcommon|CSWtiff|CSWpng|CSWjpeg|CSWzlib| none

Skipping signature. Exiting.

The script is a part of the official pkgutilplus package.

Unless otherwise stated, the content of this page is licensed under Creative Commons Attribution-ShareAlike 3.0 License