From 6035aa3274cde06f6e2904129b33b83952f86d16 Mon Sep 17 00:00:00 2001 From: Christian Wiese Date: Wed, 31 Mar 2010 23:57:21 +0200 Subject: [PATCH] util-vserver: provide the right path to 'cp', 'mv' and ln' from coreutils Note: Because we mangle the install path for certain binaries from '/usr/bin' to '/bin' we cannot use `pkgprefix bindir coreutils` to determine the path because it will return '/usr/bin'. To solve this kind of issue we set a fixed path fori those special cases. --- security/util-vserver/util-vserver.conf | 32 +++++++++++++++---------- 1 file changed, 20 insertions(+), 12 deletions(-) diff --git a/security/util-vserver/util-vserver.conf b/security/util-vserver/util-vserver.conf index 74a871c80..3814cd571 100644 --- a/security/util-vserver/util-vserver.conf +++ b/security/util-vserver/util-vserver.conf @@ -2,7 +2,7 @@ # This copyright note is auto-generated by ./scripts/Create-CopyPatch. # # Filename: package/.../util-vserver/util-vserver.conf -# Copyright (C) 2006 - 2009 The OpenSDE Project +# Copyright (C) 2006 - 2010 The OpenSDE Project # Copyright (C) 2004 - 2006 The T2 SDE Project # # More information can be found in the files COPYING and README. @@ -34,27 +34,35 @@ var_remove_regex makeopt ' ' 'CC=.*' # some help to crosscompile # -for x in ip iptables vconfig wget; do - # which package? +for x in ip iptables vconfig wget cp mv ln; do + # which package or fixed path? + x_path= case "$x" in ip) y="iproute2" ;; vconfig) y="vlan" ;; + cp|mv|ln) + x_path="/bin" ;; *) y="$x" ;; esac z=$( echo "$x" | tr '[a-z]' '[A-Z]' ) - pkgprefix -t $y + # if no fixed path was provided by setting $x_path use pkgprefix + if [ -z "$x_path" ]; then + pkgprefix -t $y - # where is it? - case "$x" in - wget|vconfig) - x_path=bindir ;; - *) - x_path=sbindir ;; - esac - var_append configcache ' ' ac_cv_path_$z=$( pkgprefix $x_path $y )/$x + # where is it? + case "$x" in + wget|vconfig) + x_path=bindir ;; + *) + x_path=sbindir ;; + esac + x_path="$( pkgprefix $x_path $y )" + fi + + var_append configcache ' ' ac_cv_path_$z=$x_path/$x done