From fec3baeca6117d62e9d0238dd41cdb67315cb540 Mon Sep 17 00:00:00 2001 From: "Yann E. MORIN\"" Date: Wed, 4 Mar 2009 18:25:58 +0000 Subject: Check that a pacakge was previously extracted prior to patching. Fix a comment. /trunk/scripts/functions | 8 5 3 0 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/scripts/functions b/scripts/functions index 3dc35f4..19acaed 100644 --- a/scripts/functions +++ b/scripts/functions @@ -180,8 +180,8 @@ CT_HasOrAbort() { } # 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_GetLocal() { 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 @@ CT_Patch() { 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}'" -- cgit v0.10.2-6-g49f6