[csw-maintainers] Catalog checks via REST
Dagobert Michelsen
dam at opencsw.org
Thu Dec 29 20:52:00 CET 2011
Hi Maciej,
Am 27.12.2011 um 19:23 schrieb Maciej (Matchek) Bliziński:
> This is a follow-up to the recent incident with a dependency loop in
> the package catalog.
>
> During the last camp, we've discussed writing own package checks in
> different languages than Python. To recap, interfacing with other
> languages is possible but requires additional work. As an intermediate
> step, I offered access to the package data via REST, so that people
> can write own checks in any languages they want. If/when there is
> enough traction for checks in other languages, we can go back to the
> idea of creating bindings to other languages.
>
> The same idea can be applied to catalog checks.
>
> I've written a proof-of-concept script in Perl, which pulls catalog
> information and pretty-prints it. To check a catalog, the script would
> do some kind of inspection of the data structure and draw some
> conclusions (e.g. there's a dependency loop).
>
> The script is available from our code repository:
> http://sourceforge.net/apps/trac/gar/browser/csw/mgar/gar/v2/lib/web/examples/catalog_data.pl
>
> One of the concerns were "I don't know REST". The answer is that
> there's nothing to learn. Here's the script body:
I did some fiddling and get results like this for each entry:
{
'catalogname' => 'py_mysql',
'version_string' => '1.2.3,REV=2011.03.13',
'vendor_url' => 'http://pypi.python.org/pypi/MySQL-python',
'md5_sum' => 'b8bd74a346662f8da1edd0f915c1d0ab',
'arch' => 'sparc',
'osrel' => 'SunOS5.9',
'size' => 43319,
'file_basename' => 'py_mysql-1.2.3,REV=2011.03.13-SunOS5.9-sparc-CSW.pkg.gz',
'maintainer_email' => 'maciej at opencsw.org',
'version' => '1.2.3,REV=2011.03.13',
'mtime' => '2011-03-13 07:48:49',
'pkgname' => 'CSWpy-mysql',
'repository_url' => 'https://gar.svn.sourceforge.net/svnroot/gar/csw/mgar/pkg/lang-python/mysql-python/trunk/Makefile',
'basename' => 'py_mysql-1.2.3,REV=2011.03.13-SunOS5.9-sparc-CSW.pkg.gz',
'maintainer_full_name' => 'Maciej Blizinski',
'filename_arch' => 'sparc',
'rev' => '2011.03.13'
},
There is no information about the dependencies. I am really sorry, but I keep forgetting how to
get this information. I suggest adding it to this page so it is easily usable next time:
http://wiki.opencsw.org/restful-interface
Best regards
-- Dago
More information about the maintainers
mailing list