From fcc332a75cf153b9912bc4b26f1d4f028daa7ff3 Mon Sep 17 00:00:00 2001 From: Zac Medico Date: Thu, 13 Dec 2007 05:40:46 +0000 Subject: [PATCH] Bug #198398 - Make repoman bail out if support for RMD160 hash creation appears to be missing. (trunk r8886:8888 and r8897) svn path=/main/branches/2.1.2/; revision=8898 --- bin/repoman | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/bin/repoman b/bin/repoman index 387a1382f..7ca861e78 100755 --- a/bin/repoman +++ b/bin/repoman @@ -412,6 +412,24 @@ myreporoot=None if os.path.isdir("CVS"): isCvs = True +if isCvs and \ + "commit" == options.mode and \ + "RMD160" not in portage.checksum.hashorigin_map: + from portage_util import grablines + repo_lines = grablines("./CVS/Repository") + if repo_lines and \ + "gentoo-x86" == repo_lines[0].strip().split(os.path.sep)[0]: + msg = "Please install " \ + "pycrypto or enable python's ssl USE flag in order " \ + "to enable RMD160 hash support. See bug #198398 for " \ + "more information." + prefix = red(" * ") + from textwrap import wrap + for line in wrap(msg, 70): + print prefix + line + sys.exit(1) + del repo_lines + if mymode == "commit" and \ not isCvs and \ "--pretend" not in myoptions: -- 2.26.2