Merge branch 'master' of ssh://kebab.indexdata.dk:222/home/git/pub/git-tools
[git-tools-moved-to-github.git] / update-archive / update-yum-archive.sh
index 482fc09..f280e64 100755 (executable)
@@ -31,7 +31,7 @@ signage=8000
 confdir=`pwd`
 architectures="i386 x86_64"
 dirs_to_upd=""
-for vdist in centos/5.5 rhel/5.5; do
+for vdist in centos/5.5 rhel/5.5 centos/6; do
   dist=`basename $vdist`
   vendor=`dirname $vdist`
   ftpdir=/home/ftp/pub/yum/$vendor/$dist
@@ -86,9 +86,17 @@ for vdist in centos/5.5 rhel/5.5; 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"