From ee3f28f267466f65640bb95cb5cea9e1fa903fee Mon Sep 17 00:00:00 2001 From: Adam Dickmeiss Date: Mon, 4 Feb 2013 10:08:06 +0000 Subject: [PATCH] Check for presence of RPM symlink Besides age, check for presence of symlink from RPM Packages directory. --- update-archive/update-yum-archive.sh | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/update-archive/update-yum-archive.sh b/update-archive/update-yum-archive.sh index 1e3f633..f280e64 100755 --- a/update-archive/update-yum-archive.sh +++ b/update-archive/update-yum-archive.sh @@ -86,9 +86,17 @@ for vdist in centos/5.5 rhel/5.5 centos/6; do for arch in $architectures; do mkdir -p $d/${arch}/Packages for f in $distdir/RPMS/${arch}/*.rpm $distdir/RPMS/noarch/*.rpm; do + b=`basename $f` if test -f $f; then + mustsign=false age=`stat --printf='%Y' $f` if expr $now - $age \< $signage >/dev/null; then + mustsign=true + fi + if test ! -f $d/${arch}/Packages/$b; then + mustsign=true + fi + if $mustsign; then ln -sf $f $d/${arch}/Packages/ if rpm -K $f|grep -q ' gpg' >/dev/null; then echo "Already signed $f" -- 1.7.10.4