tags 404057 + patch
thanks

function find_location_of in install/axyl-common-funcs.sh needs to skip
non-existant directories passed as arguments as where to look.
Additionally true needs to be run last, since (ba)sh exists with the
last run programs exitcode as it's own exit code, and I beleive the
functions purpose can never fail.
This solves the reported bug for me when installing axyl in a
pbuilder chroot.

Patch attached.

HTH. HAND.

-- 
Regards,
Andreas Henriksson
--- axyl-2.1.12/install/axyl-common-funcs.sh    2006-09-14 07:26:50.000000000 
+0200
+++ axyl-2.1.12-fixed/install/axyl-common-funcs.sh      2006-12-22 
11:08:29.000000000 +0100
@@ -249,7 +249,10 @@ function find_location_of () {
   fi
   
   for loc in $recog_locs ;  do
-    paths=`find $loc -type $findtype -name "$recog_item_name"`
+    paths=""
+    if [ -e "$loc" ]; then
+         paths=`find $loc -type $findtype -name "$recog_item_name"`
+    fi
     if [ "$paths" != "" ] ; then
          for path in $paths ; do
                if [ "$recog_item_type" = "directory" -a "$validation_flag" = 
"containing" ] ; then
@@ -273,6 +276,7 @@ function find_location_of () {
     fi
     [ "$LOC" != "" ] && break
   done
+  true
 }
 
-# END
\ No newline at end of file
+# END

Reply via email to