In order to make package management easier, it may be useful to
support the idea of conditional dependencies. These dependencies
would have the same semantics as require type dependencies, except
that they would only be active if another package was installed at the
specified level or higher. As with the other types of dependencies,
these would be re-evaluated during any packaging changes.
Suppose the following was specified in package a...@1:
depend type=conditional fmri=pkg:/b...@2 predicate=pkg:/c...@2
This would mean that if package C was present (at version
two or higher), package B would also need to be present.
The logic (assuming 3 versions of B & C) is expressed
as:
if a...@1 and (c...@2 | c...@3)) then (b...@2 | b...@3)
which maps to the following SAT solver clauses for pkg A1:
!a1 | !c2 | b2
!a1 | !c3 | b2
!a1 | !c2 | b3
!a1 | !c3 | b3
Some use cases:
* Supporting separately packaged multiple version language modules from
a single wrapper package.
For example, SUNWpython-pycurl might contain:
depend type=conditional fmri=pkg:/SUNWpython-pycurl2.6 \
predicate=pkg:/SUNWPython26
depend type=conditional fmri=pkg:/SUNWpython-pycurl2.4 \
predicate=pkg:/SUNWPython24
* Supporting multiple language-bindings for a package
that would not be included unless that language was
included. Thus, when an optional language package
was added, support for that language could appear
in other components.
SUNWpostgr might contain the following:
depend type=conditional fmri=pkg:/SUNWpostgr-tcl \
predicate=pkg/SUNWTcl
- Bart
--
Bart Smaalders Solaris Kernel Performance
[email protected] http://blogs.sun.com/barts
"You will contribute more with mercurial than with thunderbird."
_______________________________________________
pkg-discuss mailing list
[email protected]
http://mail.opensolaris.org/mailman/listinfo/pkg-discuss