From 9f073c265d539dbdf4521939d7e0f15b0ef2ce9d Mon Sep 17 00:00:00 2001 From: Andrew Gaffney Date: Wed, 20 Feb 2008 15:18:08 +0000 Subject: [PATCH] Only call find on libdirs that actually exist. Thanks to Kristoffer in bug 210807 git-svn-id: svn+ssh://svn.gentoo.org/var/svnroot/catalyst/trunk@1310 d1e1f19c-881f-0410-ab34-b69fee027534 --- ChangeLog | 5 +++++ targets/livecd-stage2/livecd-stage2-controller.sh | 10 +++++++--- 2 files changed, 12 insertions(+), 3 deletions(-) diff --git a/ChangeLog b/ChangeLog index 3558b7bd..c761bed7 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,6 +1,11 @@ # Copyright 2002-2008 Gentoo Foundation; Distributed under the GPL v2 # $Id: $ + 20 Feb 2008; Andrew Gaffney + targets/livecd-stage2/livecd-stage2-controller.sh: + Only call find on libdirs that actually exist. Thanks to Kristoffer + in bug 210807 + 20 Feb 2008; Andrew Gaffney modules/generic_stage_target.py: Add warning about -* in foo/use in the spec diff --git a/targets/livecd-stage2/livecd-stage2-controller.sh b/targets/livecd-stage2/livecd-stage2-controller.sh index e5877247..ca2bc1ce 100755 --- a/targets/livecd-stage2/livecd-stage2-controller.sh +++ b/targets/livecd-stage2/livecd-stage2-controller.sh @@ -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 -- 2.26.2