Index: bin/repoman =================================================================== --- bin/repoman (revision 2704) +++ bin/repoman (working copy) @@ -221,6 +221,7 @@ repoman_settings = portage.config(clone=portage.settings) verbose=0 quiet=0 +gpg_attempts=0 def valid_ebuild_name(name): """(name) --- Checks to ensure that the package name meets portage specs. @@ -1576,6 +1577,12 @@ # Setup the GPG commands def gpgsign(filename): + if gpg_attempts > 10: + portage.writemsg("MAX gpg signging attempts reach. The key you are using is invalid and or expired or so other error which we have not encountered yet" + sys.exit(1) + + gpg_attempts += 1 + gpgcmd = "gpg --sign --clearsign --yes " gpgcmd+= "--default-key "+repoman_settings["PORTAGE_GPG_KEY"] if repoman_settings.has_key("PORTAGE_GPG_DIR"):