![Davlet Panech](/assets/img/avatar_default.png)
Currently "stx build prepare" is required opon (re-)starting builder pods; that command always calls "repo sync", which may trigger git merge's and upgrade the current source tree, disrupting any uncommitted work. Solution: call "stx build prepare" only when the source tree doesn't exist (ie the very first time). TESTS ===== Re-start pods, then call "stx build prepare" twice. Make sure first call invokes "repo sync", and subsequent calls don't. Story: 2008846 Task: 44910 Signed-off-by: Davlet Panech <davlet.panech@windriver.com> Change-Id: Ic3647b4364d1294b5b99033c4fb66a8fce5da630
65 lines
2.2 KiB
Bash
Executable File
65 lines
2.2 KiB
Bash
Executable File
#!/bin/bash
|
|
|
|
git config --global user.name "$GITUSER"
|
|
git config --global user.email "$GITEMAIL"
|
|
git config --global color.ui false
|
|
|
|
cd $MY_REPO_ROOT_DIR
|
|
if [[ x"$PROXY" == x"true" ]]; then
|
|
ps aux|grep ssh|grep qTfnN 2>&1>/dev/null
|
|
ret=$?
|
|
if [[ x"$ret" != x"0" ]];then
|
|
echo "*************************************************************************************"
|
|
echo "Note: Next we will create the proxy and connect the proxyserver $PROXYSERVER!!!"
|
|
echo ""
|
|
echo ""
|
|
echo "*************************************************************************************"
|
|
ssh -D 8080 -qTfnN $HOSTUSERNAME@$PROXYSERVER
|
|
fi
|
|
|
|
if [[ ! -f .repo-init-done ]] ; then
|
|
proxychains repo init -u https://opendev.org/starlingx/manifest -b $BUILD_BRANCH -m ${MANIFEST} && \
|
|
proxychains repo sync --force-sync && \
|
|
touch .repo-init-done
|
|
fi
|
|
else
|
|
if [[ ! -f .repo-init-done ]] ; then
|
|
repo init -u https://opendev.org/starlingx/manifest -b $BUILD_BRANCH -m ${MANIFEST} && \
|
|
repo sync --force-sync && \
|
|
touch .repo-init-done
|
|
fi
|
|
fi
|
|
|
|
sudo apt-get update
|
|
|
|
# create deb-local-binary empty repo for building first package, certainly the developer
|
|
# also could select to download the other binary list in deb-mirror-tools directory with
|
|
# debdownloader command, for example we download the base-bullseye.lst before building
|
|
# image.
|
|
TMPLIST=`mktemp /tmp/XXXXXX.lst`
|
|
debdownloader $TMPLIST
|
|
rm $TMPLIST
|
|
|
|
if [[ x"$SOURCESLIST" != x"" ]]; then
|
|
if [[ x"$DEBLIST" == x"" ]]; then
|
|
if [[ x"$DSCLIST" == x"" ]]; then
|
|
echo "Either deblist or dsclist must not NULL!!!!"
|
|
return 1
|
|
else
|
|
repo_manage.py download --sources_list=$SOURCESLIST --dsc_list=$DSCLIST
|
|
fi
|
|
else
|
|
if [[ x"$DSCLIST" == x"" ]]; then
|
|
repo_manage.py download --sources_list=$SOURCESLIST --deb_list=$DEBLIST
|
|
else
|
|
repo_manage.py download --sources_list=$SOURCESLIST --deb_list=$DEBLIST --dsc_list=$DSCLIST
|
|
fi
|
|
fi
|
|
fi
|
|
|
|
touch /home/$MYUNAME/prepare-build.done
|
|
|
|
echo "************************************************************************************************"
|
|
echo "Prepare Done!"
|
|
echo "************************************************************************************************"
|