I think I solved the repo-closure/deps scripts issues. Now it should be back to sending only one email, (instead of 6). Also, there was an indentation issue in the reporting program that was causing the dependencies problems to be cleared. Please test this once before putting in production. I tested the best I could on publictest16 and my home systems, but I didn't have full access to all yum repos anywhere. Additionally, I changed the shell script to reference local copies of yum.conf and rc-report.cfg. I think that is probably ok, but somebody should verify. stahnma
From f63228eec5268bebd1bb70370523db5a43a2a9be Mon Sep 17 00:00:00 2001 From: stahnma <stahnma@xxxxxxxxxxxxxxxxx> Date: Fri, 31 Oct 2008 04:17:18 +0000 Subject: [PATCH] Fixed checkEpel.sh to send only one email instead of 6. Now has some testing comments in it also. Also changed several paths to reference local copy of files. In rc-report.py -- fixed an indentation bug that was causing the report to be emptied. --- scripts/epel-repoclosure/checkEpel.sh | 49 +++++++++++++++++++++++---------- scripts/epel-repoclosure/rc-report.py | 4 +- 2 files changed, 36 insertions(+), 17 deletions(-) diff --git a/scripts/epel-repoclosure/checkEpel.sh b/scripts/epel-repoclosure/checkEpel.sh index 14f4fc7..042fe2f 100755 --- a/scripts/epel-repoclosure/checkEpel.sh +++ b/scripts/epel-repoclosure/checkEpel.sh @@ -1,35 +1,54 @@ #!/bin/bash DATE=`date +%Y%m%d` -YUM_CONF_LOC=/etc/yum.repos.d/yum.epel.conf +YUM_CONF_LOC=yum.epel.conf OUTPUT_DIR=$HOME -RC_REPORT_CFG=/etc/rc-report-epel.cfg +RC_REPORT_CFG=./rc-report-epel.cfg +PATH=$PATH:. + +OUTFILE=./epel-deps-$DATE.txt +>$OUTFILE + +SEND_EMAIL="yes" + process_deps() { release=$1 arch=$2 testing=$3 - mail=$4 - [ -z $4 ] && mail="no" || mail="yes" [ $arch = "ppc" ] && arch_label=ppc64 || arch_label=$arch - command="/usr/local/bin/rc-modified -d mdcache -n -c $YUM_CONF_LOC -a $arch_label -r rhel-$release-$arch -r fedora-epel-$release-$arch -r buildsys-$release-$arch -r rhel-$arch-server-productivity-$release" + # On publictestXX boxes, you can't work with several repos, so ou can use the following to test + ## command="rc-modified -d mdcache -n -c $YUM_CONF_LOC -a $arch_label -r rhel-$release-$arch -r -r buildsys-$release-$arch " + + # Production command string +command="rc-modified -d mdcache -n -c $YUM_CONF_LOC -a $arch_label -r rhel-$release-$arch -r fedora-epel-$release-$arch -r buildsys-$release-$arch -r rhel-$arch-server-productivity-$release" [ $release -eq 5 ] && command="$command -r rhel-$release-$arch-vt " [ "$testing" = "testing" ] && command="$command -r fedora-epel-testing-$release-$arch " - OUTFILE=$OUTPUT_DIR/epel${release}${arch}-$DATE.txt - $command > $OUTFILE - [ "$4" = "yes" ] && /usr/local/bin/rc-report.py $OUTFILE -k epel -c $RC_REPORT_CFG -w testing -m summary -m owner + $command >> $OUTFILE +} + +mailer() +{ + rc-report.py $OUTFILE -k epel -c $RC_REPORT_CFG -w testing -m summary -m owner + # This works nicely when testing and you can't get metadata for all repos + #rc-report.py $OUTFILE -c $RC_REPORT_CFG -w testing -m summary --noowners } -# process_deps RHEL_RELEASE ARCH INCLUDE_TESTING? MAIL? + +# process_deps RHEL_RELEASE ARCH INCLUDE_TESTING? # RHEL 5 -process_deps 5 i386 testing yes -process_deps 5 x86_64 testing yes -process_deps 5 ppc testing yes +process_deps 5 i386 testing +process_deps 5 x86_64 testing +process_deps 5 ppc testing # RHEL 4 -process_deps 4 i386 testing yes -process_deps 4 x86_64 testing yes -process_deps 4 ppc testing yes +process_deps 4 i386 testing +process_deps 4 x86_64 testing +process_deps 4 ppc testing + +if [ "$SEND_EMAIL" = "yes" ] ; then + mailer +fi diff --git a/scripts/epel-repoclosure/rc-report.py b/scripts/epel-repoclosure/rc-report.py index 491c92c..a694f24 100755 --- a/scripts/epel-repoclosure/rc-report.py +++ b/scripts/epel-repoclosure/rc-report.py @@ -245,8 +245,8 @@ for b in list(brokendeps): for needle in opts.keyword: if b.repoid.find( needle ) >= 0: # wanted? break - else: - brokendeps.remove(b) + else: + brokendeps.remove(b) # Filter out entries from whitelist. for b in list(brokendeps): -- 1.5.5.1
_______________________________________________ Fedora-infrastructure-list mailing list Fedora-infrastructure-list@xxxxxxxxxx https://www.redhat.com/mailman/listinfo/fedora-infrastructure-list