From: Adam Dickmeiss Date: Thu, 14 Mar 2013 10:38:49 +0000 (+0100) Subject: Merge branch 'master' of ssh://git.indexdata.com/home/git/pub/git-tools X-Git-Url: http://git.indexdata.com/?a=commitdiff_plain;h=1c4bc62a01356a456568cc5fb3b0c947b1f7bbc2;hp=73bbf1f4dbaa7af73c73477241c057a68bdd32b9;p=git-tools-moved-to-github.git Merge branch 'master' of ssh://git.indexdata.com/home/git/pub/git-tools --- diff --git a/update-archive/update-yum-archive.sh b/update-archive/update-yum-archive.sh index 1e3f633..4983186 100755 --- a/update-archive/update-yum-archive.sh +++ b/update-archive/update-yum-archive.sh @@ -86,11 +86,19 @@ 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 + if rpm -K $f|grep -q 'GPG' >/dev/null; then echo "Already signed $f" else expect << __EOF @@ -115,7 +123,10 @@ echo "Updating repository meta:" for rdir in ${dirs_to_upd}; do echo "Section ${rdir}" if test -d $rdir && ls -A $rdir; then - createrepo --update ${rdir} + # Get rid of createrepo warnings + # https://bugs.launchpad.net/ubuntu/+source/createrepo/+bug/530015 + createrepo --update ${rdir} 2>&1 | + grep -v DeprecationWarning:|grep -v ' import' if test -f ${rdir}/repodata/repomd.xml.asc; then rm ${rdir}/repodata/repomd.xml.asc fi