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
This commit is contained in:
parent
d7e43c0861
commit
10eac21043
@ -50,8 +50,10 @@ function get_repos_for_element(){
|
|||||||
|
|
||||||
case $REPOTYPE in
|
case $REPOTYPE in
|
||||||
git)
|
git)
|
||||||
|
echo "Fetching $REPONAME git repository from $REPOLOCATION($REPOREF)"
|
||||||
sudo mkdir -p $REPO_SUB_DIRECTORY
|
sudo mkdir -p $REPO_SUB_DIRECTORY
|
||||||
if [ -n "$CACHE_PATH" ] ; then
|
if [ -n "$CACHE_PATH" ] ; then
|
||||||
|
echo "Caching $REPONAME source repository in $CACHE_PATH"
|
||||||
if [ ! -e "$CACHE_PATH" ] ; then
|
if [ ! -e "$CACHE_PATH" ] ; then
|
||||||
git clone $REPOLOCATION $CACHE_PATH.tmp
|
git clone $REPOLOCATION $CACHE_PATH.tmp
|
||||||
mv ${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
|
# assume the tarball only contains a single top level directory
|
||||||
local tmpdir=$(mktemp --tmpdir=$TMP_MOUNT_PATH/tmp -d)
|
local tmpdir=$(mktemp --tmpdir=$TMP_MOUNT_PATH/tmp -d)
|
||||||
if [ -n "$CACHE_PATH" ] ; then
|
if [ -n "$CACHE_PATH" ] ; then
|
||||||
|
echo "Caching $REPONAME tarball from $REPOLOCATION in $CACHE_PATH"
|
||||||
if [ ! -f "$CACHE_PATH" -o -z "$DIB_OFFLINE" ] ; then
|
if [ ! -f "$CACHE_PATH" -o -z "$DIB_OFFLINE" ] ; then
|
||||||
$CACHE_URL $REPOLOCATION $CACHE_PATH
|
$CACHE_URL $REPOLOCATION $CACHE_PATH
|
||||||
fi
|
fi
|
||||||
tar -C $tmpdir -xzf $CACHE_PATH
|
tar -C $tmpdir -xzf $CACHE_PATH
|
||||||
else
|
else
|
||||||
|
echo "Fetching $REPONAME tarball from $REPOLOCATION"
|
||||||
curl $REPOLOCATION | tar -C $tmpdir -xzf -
|
curl $REPOLOCATION | tar -C $tmpdir -xzf -
|
||||||
fi
|
fi
|
||||||
sudo mkdir -p $REPO_DEST
|
sudo mkdir -p $REPO_DEST
|
||||||
@ -88,11 +92,13 @@ function get_repos_for_element(){
|
|||||||
file)
|
file)
|
||||||
sudo mkdir -p $REPO_SUB_DIRECTORY
|
sudo mkdir -p $REPO_SUB_DIRECTORY
|
||||||
if [ -n "$CACHE_PATH" ] ; then
|
if [ -n "$CACHE_PATH" ] ; then
|
||||||
|
echo "Caching $REPONAME file from $REPOLOCATION in $CACHE_PATH"
|
||||||
if [ ! -f "$CACHE_PATH" -o -z "$DIB_OFFLINE" ] ; then
|
if [ ! -f "$CACHE_PATH" -o -z "$DIB_OFFLINE" ] ; then
|
||||||
$CACHE_URL $REPOLOCATION $CACHE_PATH
|
$CACHE_URL $REPOLOCATION $CACHE_PATH
|
||||||
fi
|
fi
|
||||||
sudo cp $CACHE_PATH $REPO_DEST
|
sudo cp $CACHE_PATH $REPO_DEST
|
||||||
else
|
else
|
||||||
|
echo "Fetching $REPONAME file from $REPOLOCATION"
|
||||||
sudo curl $REPOLOCATION -o $REPO_DEST
|
sudo curl $REPOLOCATION -o $REPO_DEST
|
||||||
fi
|
fi
|
||||||
;;
|
;;
|
||||||
|
Loading…
Reference in New Issue
Block a user