Change RPMs counting error message when downloading the mirror

download_mirror.sh has an ERROR message about RPMs downloaded being different
than the RPMs in output directory. I'm chaning this to WARNING since this
inconsistency could be worked around.
Also I'm adding to the total count the RPMs in rpms_from_centos_3rd_parties.lst
so the counting considers all the RPMs in the lists.

Change-Id: Ic3e3b3548e343fd28cc18219fa0057af268004d6
Signed-off-by: Marcela Rosales <marcela.a.rosales.jimenez@intel.com>
This commit is contained in:
Marcela Rosales 2018-08-06 16:03:39 -05:00
parent fd635e1d4d
commit f8295afdf0
1 changed files with 6 additions and 6 deletions

View File

@ -80,13 +80,13 @@ find ./output -name "*.i686.rpm" | xargs rm -f
line1=`wc -l rpms_from_3rd_parties.lst | cut -d " " -f1-1`
line2=`wc -l rpms_from_centos_repo.lst | cut -d " " -f1-1`
let total_line=$line1+$line2
echo "We expect to download $total_line RPMs!"
line3=`wc -l rpms_from_centos_3rd_parties.lst | cut -d " " -f1-1`
let total_line=$line1+$line2+$line3
echo "We expect to download $total_line RPMs."
num_of_downloaded_rpms=`find ./output -type f -name "*.rpm" | wc -l | cut -d" " -f1-1`
echo "Actually we downloaded $num_of_downloaded_rpms RPMs."
if [ "$total_line" != "$num_of_downloaded_rpms" ];then
echo "ERROR: some RPM downloading failed, need to check outputs and logs"
echo "There are $num_of_downloaded_rpms RPMs in output directory."
if [ "$total_line" != "$num_of_downloaded_rpms" ]; then
echo "WARNING: Not the same number of RPMs in output as RPMs expected to be downloaded, need to check outputs and logs."
fi
# change "./output" and sub-folders to 751 (cgcs) group