Only call find on libdirs that actually exist. Thanks to Kristoffer <krek6597@student...
authorAndrew Gaffney <agaffney@gentoo.org>
Wed, 20 Feb 2008 15:18:08 +0000 (15:18 +0000)
committerAndrew Gaffney <agaffney@gentoo.org>
Wed, 20 Feb 2008 15:18:08 +0000 (15:18 +0000)
git-svn-id: svn+ssh://svn.gentoo.org/var/svnroot/catalyst/trunk@1310 d1e1f19c-881f-0410-ab34-b69fee027534

ChangeLog
targets/livecd-stage2/livecd-stage2-controller.sh

index 3558b7bdd4210aec7650ca11437362af4767be73..c761bed7b3cf9de16301ae1a119d466c6fbe6b9f 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,6 +1,11 @@
 # Copyright 2002-2008 Gentoo Foundation; Distributed under the GPL v2
 # $Id: $
 
+  20 Feb 2008; Andrew Gaffney <agaffney@gentoo.org>
+  targets/livecd-stage2/livecd-stage2-controller.sh:
+  Only call find on libdirs that actually exist. Thanks to Kristoffer
+  <krek6597@student.uu.se> in bug 210807
+
   20 Feb 2008; Andrew Gaffney <agaffney@gentoo.org>
   modules/generic_stage_target.py:
   Add warning about -* in foo/use in the spec
index e5877247093b6b46378b0dc3700ca8ce89bf1f4d..ca2bc1ceb970e8bc4af7d037e1123cc1225ec1c6 100755 (executable)
@@ -94,9 +94,13 @@ case $1 in
                exec_in_chroot ${clst_fsscript}
                ;;
        clean)
-               find ${clst_chroot_path}/usr/lib -iname "*.pyc" -exec rm -f {} \;
-               find ${clst_chroot_path}/usr/lib32 -iname "*.pyc" -exec rm -f {} \;
-               find ${clst_chroot_path}/usr/lib64 -iname "*.pyc" -exec rm -f {} \;
+               for x in lib lib32 lib64
+               do
+                       if [ -d "${clst_chroot_path}/usr/${x}" ]
+                       then
+                               find "${clst_chroot_path}/usr/${x}" -iname "*.pyc" -exec rm -f {} \;
+                       fi
+               done
                ;;
        bootloader)
                shift