summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorZac Medico <zmedico@gentoo.org>2007-12-12 08:06:01 +0000
committerZac Medico <zmedico@gentoo.org>2007-12-12 08:06:01 +0000
commit56a40197202500ced89f44a572cec6be62dbaa7a (patch)
tree40b079d0e512f3ef08439834f6ad0f43df3aaecb
parent5b3135413d200e58e602a74a6816e48380e53433 (diff)
downloadportage-56a40197202500ced89f44a572cec6be62dbaa7a.tar.gz
portage-56a40197202500ced89f44a572cec6be62dbaa7a.tar.bz2
portage-56a40197202500ced89f44a572cec6be62dbaa7a.zip
Bug #198398 - Make repoman bail out if support for RMD160 hash
creation appears to be missing. svn path=/main/trunk/; revision=8887
-rwxr-xr-xbin/repoman14
1 files changed, 14 insertions, 0 deletions
diff --git a/bin/repoman b/bin/repoman
index f6ab04dc9..783b4fb79 100755
--- a/bin/repoman
+++ b/bin/repoman
@@ -809,6 +809,20 @@ if isCvs:
mynew = cvstree.findnew(mycvstree, recursive=1, basedir="./")
new_ebuilds.update(x for x in mynew if x.endswith(".ebuild"))
del mycvstree, mynew
+ if "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 repo_lines[0].startswith("gentoo-x86/"):
+ 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)
dofail = 0
arch_caches={}