summaryrefslogtreecommitdiffstats
path: root/libcompat
diff options
context:
space:
mode:
authorJaka Kranjc2008-08-25 18:42:24 +0200
committerAndraž 'ruskie' Levstik2008-08-25 18:49:33 +0200
commit02aa6c66d7433198a6c231edc634d5ab61678e4a (patch)
tree12cc98edc700bfef7d7885a0275bbdfb45490103 /libcompat
parent30014ddf7394b2a7b3a737ccf84bab3ac3761b7d (diff)
Cherry pick from master
libcompat: added runtime_depends_2 which is a noop on system without runtime_depends and the same as runtime_depends on others
Diffstat (limited to 'libcompat')
-rwxr-xr-xlibcompat17
1 files changed, 13 insertions, 4 deletions
diff --git a/libcompat b/libcompat
index 7f3b5530c2..736a7daba2 100755
--- a/libcompat
+++ b/libcompat
@@ -52,10 +52,19 @@ else
fi
# fall back to depends if runtime_depends isn't implemented
-declare -f runtime_depends &> /dev/null ||
-function runtime_depends() {
- depends "$@"
-}
+if declare -f runtime_depends &> /dev/null; then
+ function runtime_depends_2() {
+ runtime_depends "$@"
+ }
+else
+ function runtime_depends() {
+ depends "$@"
+ }
+
+ function runtime_depends_2() {
+ true
+ }
+fi
declare -f is_depends_enabled &>/dev/null ||
function is_depends_enabled() {