diff -r 4b065e7e2130 -r b5db8db61f93 scripts/functions --- a/scripts/functions Wed Mar 04 17:59:35 2009 +0000 +++ b/scripts/functions Wed Mar 04 18:25:58 2009 +0000 @@ -180,8 +180,8 @@ } # Search a program: wrap "which" for those system where -# "which" verbosely says there is no match (Mdk are such -# suckers...) +# "which" verbosely says there is no match (Mandriva is +# such a sucker...) # Usage: CT_Which CT_Which() { which "$1" 2>/dev/null || true @@ -445,7 +445,6 @@ CT_DoLog DEBUG "Trying to retrieve an already downloaded copy of '${basename}'" # We'd rather have a bzip2'ed tarball, then gzipped tarball, plain tarball, # or, as a failover, a file without extension. - # Try local copy first, if it exists for ext in ${first_ext} .tar.bz2 .tar.gz .tgz .tar ''; do CT_DoLog DEBUG "Trying '${CT_LOCAL_TARBALLS_DIR}/${basename}${ext}'" if [ -r "${CT_LOCAL_TARBALLS_DIR}/${basename}${ext}" -a \ @@ -636,6 +635,9 @@ return 0 fi + # Check if already extracted + CT_TestOrAbort "'${basename}' is not yet extracted while attempting to patch" -e "${CT_SRC_DIR}/.${basename}.extracted" + [ "${nochdir}" = "nochdir" ] || CT_Pushd "${CT_SRC_DIR}/${basename}" CT_DoLog EXTRA "Patching '${basename}'"