1 |
Updating the ChangeLog file may be desirable in more repos than just the |
2 |
one named 'gentoo', like e.g. the Prefix one. Hence, make this default |
3 |
configurable though metadata/layout.conf. |
4 |
|
5 |
This commit must go accompanied by a commit to |
6 |
gentoo-x86/metadata/layout.conf that adds the following bit: |
7 |
|
8 |
# Bug #337853 - gentoo's council says to enable |
9 |
# --echangelog by default for the "gentoo" repo |
10 |
update-changelog = true |
11 |
|
12 |
diff --git a/bin/repoman b/bin/repoman |
13 |
--- a/bin/repoman |
14 |
+++ b/bin/repoman |
15 |
@@ -644,10 +644,7 @@ |
16 |
print(prefix + line) |
17 |
sys.exit(1) |
18 |
|
19 |
-if options.echangelog is None and \ |
20 |
- repo_config.name == "gentoo": |
21 |
- # Bug #337853 - gentoo's council says to enable |
22 |
- # --echangelog by default for the "gentoo" repo |
23 |
+if options.echangelog is None and repo_config.update_changelog: |
24 |
options.echangelog = 'y' |
25 |
|
26 |
if vcs is None: |
27 |
diff --git a/pym/portage/repository/config.py b/pym/portage/repository/config.py |
28 |
--- a/pym/portage/repository/config.py |
29 |
+++ b/pym/portage/repository/config.py |
30 |
@@ -48,7 +48,7 @@ |
31 |
'eclass_overrides', 'eclass_locations', 'format', 'location', |
32 |
'main_repo', 'manifest_hashes', 'masters', 'missing_repo_name', |
33 |
'name', 'priority', 'sign_manifest', 'sync', 'thin_manifest', |
34 |
- 'user_location') |
35 |
+ 'update_changelog', 'user_location') |
36 |
|
37 |
def __init__(self, name, repo_opts): |
38 |
"""Build a RepoConfig with options in repo_opts |
39 |
@@ -126,6 +126,7 @@ |
40 |
self.create_manifest = True |
41 |
self.disable_manifest = False |
42 |
self.manifest_hashes = None |
43 |
+ self.update_changelog = False |
44 |
self.cache_format = None |
45 |
|
46 |
def get_pregenerated_cache(self, auxdbkeys, readonly=True, force=False): |
47 |
@@ -431,6 +432,9 @@ |
48 |
DeprecationWarning) |
49 |
repo.manifest_hashes = manifest_hashes |
50 |
|
51 |
+ if layout_data.get('update-changelog', '').lower() == 'true': |
52 |
+ repo.update_changelog = True |
53 |
+ |
54 |
#Take aliases into account. |
55 |
new_prepos = {} |
56 |
for repo_name, repo in prepos.items(): |