From: Adam Dickmeiss Date: Mon, 4 Feb 2013 10:08:06 +0000 (+0000) Subject: Check for presence of RPM symlink X-Git-Url: http://lists.indexdata.dk/?a=commitdiff_plain;h=ee3f28f267466f65640bb95cb5cea9e1fa903fee;p=git-tools-moved-to-github.git Check for presence of RPM symlink Besides age, check for presence of symlink from RPM Packages directory. --- 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"