summaryrefslogtreecommitdiffstats
path: root/bin/repoman
diff options
context:
space:
mode:
authorZac Medico <zmedico@gentoo.org>2007-12-13 05:40:46 +0000
committerZac Medico <zmedico@gentoo.org>2007-12-13 05:40:46 +0000
commitfcc332a75cf153b9912bc4b26f1d4f028daa7ff3 (patch)
treea8ba486de325ba8c93f15920d6ca5be583fc8983 /bin/repoman
parentf74cdc93a623f02936a5b3f94d016f874ceb350f (diff)
downloadportage-fcc332a75cf153b9912bc4b26f1d4f028daa7ff3.tar.gz
portage-fcc332a75cf153b9912bc4b26f1d4f028daa7ff3.tar.bz2
portage-fcc332a75cf153b9912bc4b26f1d4f028daa7ff3.zip
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
Diffstat (limited to 'bin/repoman')
-rwxr-xr-xbin/repoman18
1 files changed, 18 insertions, 0 deletions
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: