tech-pkg archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

multi-variant packages and bulk builds



In pkgsrc there are a number of packages (category/package) that can
be built with different PKGNAME depending on a value of some special
variables. For example, www/ap2-* packages, */py-* and many others.

AFAIU in order to buils these packages pbulk uses hardcoded list of
special variables in mk/pbulk/pbulk-index.mk. For multi-variant
packages my distbb currently builds only package, the default one, but
I don't thing the way pbulk works is the right way.

Instead, I propose to introduce one special variable, e.g. VARIANTS,
and to support it in all multi-variant packages.

Example:
  cd /usr/pkgsrc/www/py-clearsilver
  make show-var VARNAME=VARIANTS
  > PYTHON_VERSION_DEFAULT=15,20,21,22,23,25
  cd /usr/pkgsrc/www/ap2-auth-external
  make show-var VARNAME=VARIANTS
  > PKG_APACHE_DEFAULT=apache2,apache22
  cd /usr/pkgsrc/www/ap2-python
  > PKG_APACHE_DEFAULT=apache2,apache22 PYTHON_VERSION_DEFAULT=23,24,25

Using cartesian product of all supported values for all listed
variables, bulk build software can easily build all variants all such
packages. I hope the idea is clear.

Of course the code that sets VARIANTS variable should use appropriate
xxx_ACCEPTED variables.

One of the main benefit of this approch is that pkgsrc itself and bulk
build programs become more isolated and independant from each other
because pkgsrc API becomes clearer and easier.

Any thoughts?

-- 
Best regards, Aleksey Cheusov.


Home | Main Index | Thread Index | Old Index