From 10eac210430f998aea3cc57c8008092e5166c76a Mon Sep 17 00:00:00 2001 From: Mark McLoughlin Date: Wed, 4 Dec 2013 17:18:18 +0000 Subject: [PATCH] Log the repository fetches in source-repositories Make the source-repositories element log which repo it's cloning from so it's easier to tell what's going on. Change-Id: I224f7bd98bc3d0ba94313dae9063d4ba4e25bdaa --- .../source-repositories/extra-data.d/98-source-repositories | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/elements/source-repositories/extra-data.d/98-source-repositories b/elements/source-repositories/extra-data.d/98-source-repositories index 4c3390d7..2b603bd0 100755 --- a/elements/source-repositories/extra-data.d/98-source-repositories +++ b/elements/source-repositories/extra-data.d/98-source-repositories @@ -50,8 +50,10 @@ function get_repos_for_element(){ case $REPOTYPE in git) + echo "Fetching $REPONAME git repository from $REPOLOCATION($REPOREF)" sudo mkdir -p $REPO_SUB_DIRECTORY if [ -n "$CACHE_PATH" ] ; then + echo "Caching $REPONAME source repository in $CACHE_PATH" if [ ! -e "$CACHE_PATH" ] ; then git clone $REPOLOCATION $CACHE_PATH.tmp mv ${CACHE_PATH}{.tmp,} @@ -74,11 +76,13 @@ function get_repos_for_element(){ # assume the tarball only contains a single top level directory local tmpdir=$(mktemp --tmpdir=$TMP_MOUNT_PATH/tmp -d) if [ -n "$CACHE_PATH" ] ; then + echo "Caching $REPONAME tarball from $REPOLOCATION in $CACHE_PATH" if [ ! -f "$CACHE_PATH" -o -z "$DIB_OFFLINE" ] ; then $CACHE_URL $REPOLOCATION $CACHE_PATH fi tar -C $tmpdir -xzf $CACHE_PATH else + echo "Fetching $REPONAME tarball from $REPOLOCATION" curl $REPOLOCATION | tar -C $tmpdir -xzf - fi sudo mkdir -p $REPO_DEST @@ -88,11 +92,13 @@ function get_repos_for_element(){ file) sudo mkdir -p $REPO_SUB_DIRECTORY if [ -n "$CACHE_PATH" ] ; then + echo "Caching $REPONAME file from $REPOLOCATION in $CACHE_PATH" if [ ! -f "$CACHE_PATH" -o -z "$DIB_OFFLINE" ] ; then $CACHE_URL $REPOLOCATION $CACHE_PATH fi sudo cp $CACHE_PATH $REPO_DEST else + echo "Fetching $REPONAME file from $REPOLOCATION" sudo curl $REPOLOCATION -o $REPO_DEST fi ;;