feature for reverse virtual dependency
This feature is supposed to solve the following problems:
apk add iscistarget. Needs kernel driver. User might have installed linux-grsec kernel or linux-vserver kernel or linux-anyotherkernelflavor, so we cannot say in iscsitarget package that we depend on linux-grsec or linux-vserver or anything else.
language packages for xorg applications. apk add midori xfce. currently will pull in all kinds of languages. most likely user only needs 1 or 2 or 3. So we put language files in separate package (midori-fr, midori-en, xfce-fr, xfce-en for french and english forexample). But how does apk pull them in properly? and uninstall properly?
Solution: “install_if” or reverse conditional viritual dependency or what we shuold call it.
The package has an “install_if” field, where you can have apk-tools pull in this package in the dependency tree if all the specified packages are installed.
If we take iscsitarget as example, then would the iscsitarget-grsec package have: install_if=“linux-grsec iscsitarget”. When linux-grsec and iscitarget are in the dependency tree, the iscsitarget-grsec also gets pulled in.
To be done:
- decide what to call this feature
- implement it in apk-tools
(from redmine: issue id 443, created on 2010-10-12, closed on 2011-07-11)
- Revision 28dcd5d3 by Timo Teräs on 2011-01-04T08:05:20Z:
pkg: recognize install_if Parse install_if from package metadata and include it in the indexes. Also setup the reverse install_if dependencies when loading a database. ref #443. Actual install_if functionality is not yet implemented.
- Revision 0f6475b8 by Timo Teräs on 2011-03-29T13:36:10Z:
state, info: implement install_if (fixes #443) Implement the logic for install_if lines. Update info applet to also display the install_if related fields.