summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
Diffstat (limited to 'lib')
-rw-r--r--lib/deps.sh19
1 files changed, 19 insertions, 0 deletions
diff --git a/lib/deps.sh b/lib/deps.sh
index 7a63a31..02bdf8c 100644
--- a/lib/deps.sh
+++ b/lib/deps.sh
@@ -184,6 +184,25 @@ ob_parse_dep()
return 0
}
+## @brief Reduce dependencies to a given architecture and platform
+## @details \fBob_reduce_deps\fP reduces a list of dependencies to only those
+## that apply to a given architecture and platform. A list is either a
+## "normal" list or a "union" list. A normal list is an "AND" list
+## composed of "OR" lists, which in turn are composed of simple
+## dependencies. A union list is an AND list composed of only simple
+## dependencies. That is, a normal list is of the form
+## \fIdep\ |\ dep,\ dep\fP, and a union list is of the form
+## \fIdep,\ dep\fP. The "Conflicts", "Provides", and "Replaces"
+## package relationships are union lists.
+## @option -a host_arch The architecture to which dependencies should be
+## reduced. Required.
+## @option -P host_plat The platform to which dependencies should be reduced.
+## Required.
+## @option -u - Treat \fIdeps\fP as a union list.
+## @operand deps req The list of dependencies to reduce.
+## @return Returns 0 on success or 125 on invalid option or missing \fIdeps\fP.
+## @stdout Prints the reduced list of dependencies.
+## @pure yes This function has no side effects.
ob_reduce_deps()
{
local opt=