tech-pkg archive

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

Re: multi-variant packages and bulk builds



 >> One place in pbulk, one place in distbb, one place in bb framework etc.
 >> Three places in total. Is this still "one place"?

> Nothing stops you from extracting the same data.

I have already explained several times why it is bad to copy-paste the
same code (CHANGEABLE list of special variables) to many places.
1) It is bad design/hardcode
2) If the list of these special variables is changed, all
   "one places" should be changed too. I don't see any reason for this.

The really good "one place" is ONE special variable that keeps
all PYTHONs, PHPs, APACHEs and all variations for this particular package.

Again. This "constant list" is not as constant as you may think.
You've completely ignored my arguments about emacs.

 >> So, "this list" is not constant and may be extended in the future.

> Just because this list can be extended doesn't mean it changes
> during one scan.
How "one scan" is connected with my proposal and all this discussion? :-)

 >> A few weeks ago you've added new variable BOOTSTRAP_PKG to pkgsrc
 >> which is set to "yes" for bootstrap packages. I guess this is for your
 >> pbulk. Right? Why you don't keep this constant list in "one place"? ;-)

> BOOTSTRAP_PKG is inherently a package attribute. It is not specific
> to pbulk

BOOTSTRAP_PKG is a package attribute just like VARIANTS.

BOOTSTRAP_PKG says "this package is bootstrap package, handle it specially".

VARIANTS says "this package can generate a list of binaries, value of this
               variable says what variables can be changed to what values"

VARIANTS is also not specific to distbb, just like BOOTSTRAP_PKG.

As you may know I've created and maintain wip/pkg_online - client/server
tool for search in pkgsrc packages. The following command

  pkg_online_find n:<search_strategy>:<query>
   or
  pkg_online_find PKGNAME:<search_strategy>:<query>

searches for packages by PKGNAME field. Raw data for pkg_online server
is generated by pkg_src_summary program, also a part of pkg_summary-utils.
Currently pkg_src_summary tool generates summaries (pkg_src_summary)
only for "default" variant of multi-variant packages. VARIANTS variable
allows me EASILY adapt pkg_src_summary to generate summaries for all
packages and therefore I'll be able to match not only emacs22-dictem,
but also dictem21-dictem and xemacs-dictem.

This ability is needed for those who prefer binary upgrades
and uses pkg_online.

Another examples is ability to build all packages by running, e.g.,
'make all-packages' or third party tool implemented outside pkgsrc.
By using VARIANTS variable you can implement this for years without
extra knowledge about pkgsrc.

If case "constant list" will change, you should not change
pkg_src_summary, "make all-packages", distbb or anything else.

-- 
Best regards, Aleksey Cheusov.


Home | Main Index | Thread Index | Old Index