# from Michael G Schwern
# on Monday 19 November 2007 01:35:

>The trick is how do we figure out the version, or even a unified name,
> of any given external utility?  The answer, as far as the META.yml
> approach is concerned is "let the consumers figure it out".  Really.
>  We just need to provide the semantics.  So what would those
> semantics be?

As we discussed at the last pdx.pm, the big drawback of a restricted 
declarative language is that the support code has to always be 
available in advance.  For example, when Ant doesn't have a built-in 
(or extension) for the rule or action, you end up using an 'exec' item.

That is, how do you make the support code extendable and upgradeable?  
Well, openembedded uses a monotone repository for its bitbake files 
(yes, that includes "how to build it" code, but also "what's required" 
specs.)  We have the CPAN repository, so new 'rules' can be easily 
distributed if we can just make the semantics work.

>That's the complete solution.  The alternative small solution, someone
>suggested, is we just ship a "perl.pm" which sets it's $VERSION to be
> the current Perl version.  That's the hack to make "requires: perl"
> "just work" without any special casing on the part of the consumer.
>  I think it piles a hack on top of a hack.

I know it sounds like a hack, but perhaps the complete solution *is* to 
use perl "modules" for identifying all applications.  Can we just have 
an 'external::' namespace or something?

  configure_requires:
    'external::perl': 5.8.8
  requires:
    'external::svn': 1.4.2

This would be similar to 'Alien::*', but the purpose is (initially) to 
just provide a $name->VERSION API.  It could, of course, be extended to 
provide other useful information and/or run a system-specific installer 
(e.g. aptitude) to automatically satisfy the dependency.

I think we would maybe benefit from making the 'external::' namespace 
special.  That is, the consumer could choose not to load the identifier 
as a module, but instead to query a database or etc.  No, I can't stop 
anyone from uploading random code into that namespace (and perhaps we 
need the .pm's for compatibility anyway), but we can specify that the 
consumer has the option to handle the query itself in that namespace.

--Eric
-- 
hobgoblin n 1: (folklore) a small grotesque supernatural creature that
          makes trouble for human beings
---------------------------------------------------
    http://scratchcomputing.com
---------------------------------------------------

Reply via email to