diff options
author | Nicolas Vigier <boklm@mageia.org> | 2011-02-11 20:11:55 +0000 |
---|---|---|
committer | Nicolas Vigier <boklm@mageia.org> | 2011-02-11 20:11:55 +0000 |
commit | 6340ada6232e4ee004dc8c39d8ec3ad11a23250e (patch) | |
tree | d017d7467cfe935f9f3a07d6fd036e9c59025cee | |
parent | 9664ae0d79e9b7018387fae41ef7da586c84bc75 (diff) | |
download | puppet-6340ada6232e4ee004dc8c39d8ec3ad11a23250e.tar puppet-6340ada6232e4ee004dc8c39d8ec3ad11a23250e.tar.gz puppet-6340ada6232e4ee004dc8c39d8ec3ad11a23250e.tar.bz2 puppet-6340ada6232e4ee004dc8c39d8ec3ad11a23250e.tar.xz puppet-6340ada6232e4ee004dc8c39d8ec3ad11a23250e.zip |
- Stop if signature doesn't work after 15 try
- remove signature before trying to add it again
-rw-r--r-- | modules/buildsystem/templates/sign-check-package | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/modules/buildsystem/templates/sign-check-package b/modules/buildsystem/templates/sign-check-package index 6d16aa87..ebb81f61 100644 --- a/modules/buildsystem/templates/sign-check-package +++ b/modules/buildsystem/templates/sign-check-package @@ -8,9 +8,16 @@ tmpfile=`mktemp` cp -pf "$file" "$tmpfile" rpm --delsign "$tmpfile" /usr/bin/mga-signpackage "$tmpfile" "$key" "$keydir" +nbtry=0 while rpmsign -Kv "$tmpfile" 2>&1 | grep BAD do + nbtry=$(($nbtry + 1)) + if [ $nbtry -ge 15 ] + then + exit 1 + fi cp -pf "$file" "$tmpfile" + rpm --delsign "$tmpfile" /usr/bin/mga-signpackage "$tmpfile" "$key" "$keydir" done mv -f "$tmpfile" "$file" |