From f8295afdf0f0dfa3c6405ff67c4d73b34e818920 Mon Sep 17 00:00:00 2001 From: Marcela Rosales Date: Mon, 6 Aug 2018 16:03:39 -0500 Subject: [PATCH] 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 --- centos-mirror-tools/download_mirror.sh | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/centos-mirror-tools/download_mirror.sh b/centos-mirror-tools/download_mirror.sh index 7de7fb8f..cced3322 100755 --- a/centos-mirror-tools/download_mirror.sh +++ b/centos-mirror-tools/download_mirror.sh @@ -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