From: Massimiliano Mirra Date: 2002-01-08T01:08:33+09:00 Subject: Re: APT-like RAA? (was: Re: snippet exchange) On Mon, Jan 07, 2002 at 01:37:56PM +0900, Jack Dempsey wrote: > The way i was thinking of this working would be this: someone has heard of a > good library to use but doesn't want to spend the time finding it > downloading etc...this little function will do it...basically, automate the > process of finding, downloading and using...not very ambitious,and it would > definitely need to be well thought out, but i think the idea could be useful > in the end...perhaps a function that searches for a module and downloads it > but doens't require it at the same time...whatever it is, this discussion > can only help... Sorry to keep quoting Debian, but the way we say that, over here, is: apt-get install program-name Next thing you know is that docs, libs, binaries, configs and headers are all installed in the proper places and ready to use. Now, that doesn't require any web service, just an http:// or ftp:// source set up in apt's config files. The source also contains a list of what it holds (with name, description and other data about packages), that apt downloads and you use locally to select what you will install. This is an example of a list query: $ apt-cache search ruby xml librexml-ruby - pure Ruby non-validating XML parser supporting Namespaces, XPath libxml-parser-ruby - The interface of expat for the scripting language Ruby. nqxml - pure Ruby implementation of a non-validating XML processor xmlrpc4r - XML-RPC support for Ruby This is an example of a list entry: $ apt-cache show xmlrpc4r Package: xmlrpc4r Priority: optional Section: interpreters Installed-Size: 512 Maintainer: akira yamada Architecture: i386 Version: 1.7.8-1 Depends: libruby (>= 1.6.0), nqxml | libxml-parser-ruby (>= 0.6.1), ruby-eserver Filename: pool/main/x/xmlrpc4r/xmlrpc4r_1.7.8-1_i386.deb Size: 70558 MD5sum: 9f91173b68784837e39dc0ed949008c6 Description: XML-RPC support for Ruby XML-RPC provides remote procedure calls over HTTP with XML. It is like SOAP but much easier. For more information see the XML-RPC homepage . This package provides XML-RPC support for Ruby. This is how you update the locally cached list: $ apt-get update All of this is done locally. Such a system would be a real breeze to implement on top of RAA, *if* everything was kept at the same place and was organized in a well-thought out directory structure. (Yes, there's more to APT than this, it also shines at dipendence handling, but let's KIS(S).) Now, what about: $ raa-get update ...gets the list of available software. $ raa-cache search ruby xml ...displays a similar list as above. $ raa-cache show xmlrpc4r ...displays a description as above. $ raa-get install xmlrpc4r ...fetch and install xmlrpc4r, requiring you no extra step to use it than to read the manual and type require 'xmlrpc/...' in your scripts. Massimiliano