Gentoo Archives: gentoo-commits

From: Zac Medico <zmedico@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] proj/portage:master commit in: bin/
Date: Mon, 03 Oct 2011 10:02:32
Message-Id: 7b537c443c83b7ad297d4a027d902d8459a75490.zmedico@gentoo
1 commit: 7b537c443c83b7ad297d4a027d902d8459a75490
2 Author: Zac Medico <zmedico <AT> gentoo <DOT> org>
3 AuthorDate: Mon Oct 3 10:02:10 2011 +0000
4 Commit: Zac Medico <zmedico <AT> gentoo <DOT> org>
5 CommitDate: Mon Oct 3 10:02:10 2011 +0000
6 URL: http://git.overlays.gentoo.org/gitweb/?p=proj/portage.git;a=commit;h=7b537c44
7
8 repoman: account for GLEP 59 in RMD160 check
9
10 ---
11 bin/repoman | 40 ++++++++++++++++++++--------------------
12 1 files changed, 20 insertions(+), 20 deletions(-)
13
14 diff --git a/bin/repoman b/bin/repoman
15 index 20f4b15..711fce9 100755
16 --- a/bin/repoman
17 +++ b/bin/repoman
18 @@ -20,6 +20,7 @@ import signal
19 import stat
20 import sys
21 import tempfile
22 +import textwrap
23 import time
24 import platform
25
26 @@ -547,24 +548,6 @@ if vcs_global_opts is None:
27 vcs_global_opts = ""
28 vcs_global_opts = vcs_global_opts.split()
29
30 -if vcs == "cvs" and \
31 - "commit" == options.mode and \
32 - "RMD160" not in portage.checksum.hashorigin_map:
33 - from portage.util import grablines
34 - repo_lines = grablines("./CVS/Repository")
35 - if repo_lines and \
36 - "gentoo-x86" == repo_lines[0].strip().split(os.path.sep)[0]:
37 - msg = "Please install " \
38 - "pycrypto or enable python's ssl USE flag in order " \
39 - "to enable RMD160 hash support. See bug #198398 for " \
40 - "more information."
41 - prefix = bad(" * ")
42 - from textwrap import wrap
43 - for line in wrap(msg, 70):
44 - print(prefix + line)
45 - sys.exit(1)
46 - del repo_lines
47 -
48 if options.mode == 'commit' and not options.pretend and not vcs:
49 logging.info("Not in a version controlled repository; enabling pretend mode.")
50 options.pretend = True
51 @@ -588,6 +571,7 @@ portdb = trees[root]['porttree'].dbapi
52 # Constrain dependency resolution to the master(s)
53 # that are specified in layout.conf.
54 repodir = os.path.realpath(portdir_overlay)
55 +repo_config = repoman_settings.repositories.get_repo_for_location(repodir)
56 repo_info = portdb._repo_info[repodir]
57 portdb.porttrees = list(repo_info.eclass_db.porttrees)
58 portdir = portdb.porttrees[0]
59 @@ -597,8 +581,24 @@ portdir = portdb.porttrees[0]
60 # can be used to prevent merge conflicts like those that
61 # thin-manifests is designed to prevent.
62 sign_manifests = "sign" in repoman_settings.features and \
63 - repoman_settings.repositories.get_repo_for_location(
64 - repodir).sign_manifest
65 + repo_config.sign_manifest
66 +
67 +manifest_hashes = repo_config.manifest_hashes
68 +if manifest_hashes is None:
69 + manifest_hashes = portage.const.MANIFEST2_HASH_DEFAULTS
70 +
71 +if "commit" == options.mode and \
72 + repo_config.name == "gentoo" and \
73 + "RMD160" in manifest_hashes and \
74 + "RMD160" not in portage.checksum.hashorigin_map:
75 + msg = "Please install " \
76 + "pycrypto or enable python's ssl USE flag in order " \
77 + "to enable RMD160 hash support. See bug #198398 for " \
78 + "more information."
79 + prefix = bad(" * ")
80 + for line in textwrap.wrap(msg, 70):
81 + print(prefix + line)
82 + sys.exit(1)
83
84 # Generate an appropriate PORTDIR_OVERLAY value for passing into the
85 # profile-specific config constructor calls.