[Exherbo-dev] CONTAINS/CONTAINED_IN

Mike Kelly pioto at pioto.org
Thu Sep 24 16:26:56 BST 2009


There're some packages, like dev-perl/autodie, dev-perl/Module-Build,
etc, which exist both as separate packages, and as part of core perl
itself. To make things more confusing, not all versions of perl contain
them. And you can't even just do a simple ">=5.10" for some, since
there's 5.8.9 which came out later.

So, one solution that has been suggested is to add 2 new metadata keys,
CONTAINS and CONTAINED_IN. They would each be space-separated lists of
packages.

CONTAINS would be for dev-lang/perl, and would look something like:

dev-lang/perl/perl-5.10.1.exheres-0:
  ...
  CONTAINS="dev-perl/Module-Build[=0.340201] ..."
  ...

  # Not sure I like using the [=version] syntax here, but not sure of a
  # better one.

Then, we would have a dev-perl/Module-Build like:

dev-perl/Module-Build/Module-Build-0.340201.exheres-0
  ...
  CONTAINED_IN="dev-lang/perl[=5.10.1]"
  ...

Finally, a package that needs a particular version of Module-Build
would simply dep upon it as if it were just a stand-alone package:

dev-perl/foo/foo-123.exheres-0
  DEPENDENCIES="
     build:
       dev-perl/Module-Build[>=0.340201]
       ...
  "

If perl 5.10.1 is already installed, and 0.340201 is the best available
version of Module-Build around, then nothing will need to be pulled in.
Otherwise, the newest Module-Build would be installed.

-- 
Mike Kelly



More information about the Exherbo-dev mailing list