[Cuis] A small variation to use provides / requires
Ken Dickey
Ken.Dickey at whidbey.com
Sun Aug 25 05:37:01 CDT 2013
On Sat, 24 Aug 2013 17:44:30 -0300
Germán Arduino <garduino at gmail.com> wrote:
> In complex packages that have many prerequisites, it is sometimes
> uncomfortable place them in the package.
...
> Then, to install Swazoo you must evaluate: Feature require:
> 'Swazoo-Installer' and from others installer packages that require Swazoo,
> you only must add the #requires for Swazoo-Installer, and the real code
> packages (Swazoo and others related to network in this case) remain
> untouched and can be used from different installers.
This confuses me.
Why would I not just
!requires: 'Swazoo' 1 0 nil! "Feature require: 'Swazoo'"
for any packages that require Swazoo?
Say I create a set of unit tests for Aida, and I want to pull in the networking tests as well.
I should be able to do something like
!provides: 'Aida-Tests' 1 0!
!requires: 'Cuis-NetworkTests-UUID' 1 0 nil!
!requires: 'Cuis-NetworkTests-RFC822' 1 0 nil!
!requires: 'Aida 1 0!
Then I just
Feature require: 'Aida-Tests'.
and everything I need gets loaded in the right order.
If I don't want the network tests, I just do
!provides: 'Aida-Tests' 1 0!
!requires: 'Aida 1 0!
So
Feature require: 'Aida-Tests'.
provides everything required to run Aida unit tests.
Why create a separate 'Aida-Tests-Installer' ???
I think it must be more simple than a separate installer so I will not be confused.
-Ken
More information about the Cuis
mailing list