# HG changeset patch # User Rob Landley # Date 1448392020 21600 # Node ID 40c2fe006fcfe9d77cc6b6602e47e0ec9e3e7c24 # Parent 78bdf7e5f5b385beedb4213f4fab5b4f183dbbf8 Add EXTRACT_ALL=force to populate page cache even for repositories. (Needed by control-image build). diff -r 78bdf7e5f5b3 -r 40c2fe006fcf sources/download_functions.sh --- a/sources/download_functions.sh Mon Nov 23 18:47:57 2015 -0600 +++ b/sources/download_functions.sh Tue Nov 24 13:07:00 2015 -0600 @@ -284,8 +284,17 @@ # Give package name, minus file's version number and archive extension. BASENAME="$(noversion "$FILENAME")" - ! is_in_list "$BASENAME" "$IGNORE_REPOS" && - [ -d "$SRCDIR/$BASENAME" ] && echo "Using $SRCDIR/$BASENAME" && return 0 + if ! is_in_list "$BASENAME" "$IGNORE_REPOS" && [ -d "$SRCDIR/$BASENAME" ] + then + echo "Using $SRCDIR/$BASENAME" + if [ "$EXTRACT_ALL" == force ] + then + rm -rf "$SRCTREE/$BASENAME" && + cp -a "$SRCDIR/$BASENAME" "$SRCTREE/$BASENAME" || dienow + fi + + return 0 + fi # If environment variable specifies a preferred mirror, try that first.