summaryrefslogtreecommitdiffstats
path: root/bin/repoman
diff options
context:
space:
mode:
authorZac Medico <zmedico@gentoo.org>2007-12-13 05:37:52 +0000
committerZac Medico <zmedico@gentoo.org>2007-12-13 05:37:52 +0000
commit87c0bcdb732b2542d16de40d996cd556becaca2e (patch)
tree95986f8bd005ad760bf6bd651ddb2c5fb17289f2 /bin/repoman
parent8073c5d103ca766d8115c026746ce8fcb898f5e9 (diff)
downloadportage-87c0bcdb732b2542d16de40d996cd556becaca2e.tar.gz
portage-87c0bcdb732b2542d16de40d996cd556becaca2e.tar.bz2
portage-87c0bcdb732b2542d16de40d996cd556becaca2e.zip
Do the sanity check for bug #198398 as early as possible.
svn path=/main/trunk/; revision=8897
Diffstat (limited to 'bin/repoman')
-rwxr-xr-xbin/repoman33
1 files changed, 18 insertions, 15 deletions
diff --git a/bin/repoman b/bin/repoman
index c921234fd..96937a073 100755
--- a/bin/repoman
+++ b/bin/repoman
@@ -418,6 +418,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 options.mode == 'commit' and not options.pretend and not isCvs:
logging.info("Not in a CVS repository; enabling pretend mode.")
options.pretend = True
@@ -809,21 +827,6 @@ 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 \
- "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)
dofail = 0
arch_caches={}