Zhixiong Chi 60548a0b71 stx tool: Drop the previous way to sync cengn mirror in prepare task
Now we set the default value for the CENGNURL as the commit
https://review.opendev.org/c/starlingx/tools/+/821535 mentioned.
Since the mirrors of the debian packages are not initialized yet in
cengn server, we will encounter 400 Bad Request result in prepare task.

Just drop the mirror work for prepare task now.
We will implement the detailed program to download the debian binary
and source packages to replace it later.
Or once the specific directory structure for debian packages in cengn
server was created, we can recover it with the more accurate path if
necessary.

Story: 2008862
Task: 44219

Signed-off-by: Zhixiong Chi <zhixiong.chi@windriver.com>
Change-Id: I0c02e52aa4febe5de0a267ec88c9243e191208a8
2021-12-21 21:05:40 -05:00

59 lines
2.0 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
proxychains repo init -u https://opendev.org/starlingx/manifest -b $BUILD_BRANCH -m ${MANIFEST}
proxychains repo sync --force-sync
else
repo init -u https://opendev.org/starlingx/manifest -b $BUILD_BRANCH -m ${MANIFEST}
repo sync --force-sync
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 "************************************************************************************************"