1 |
--- |
2 |
bin/egencache | 14 +++++++++++--- |
3 |
man/egencache.1 | 6 ++++++ |
4 |
2 files changed, 17 insertions(+), 3 deletions(-) |
5 |
|
6 |
diff --git a/bin/egencache b/bin/egencache |
7 |
index 30311eb..984d9f2 100755 |
8 |
--- a/bin/egencache |
9 |
+++ b/bin/egencache |
10 |
@@ -170,6 +170,12 @@ def parse_args(args): |
11 |
help="output file for use.local.desc data (or '-' for stdout)", |
12 |
dest="uld_output") |
13 |
|
14 |
+ uc = parser.add_argument_group('--update-changelogs options') |
15 |
+ uc.add_argument("--changelog-output", |
16 |
+ help="output filename for change logs", |
17 |
+ dest="changelog_output", |
18 |
+ default="ChangeLog") |
19 |
+ |
20 |
options, args = parser.parse_known_args(args) |
21 |
|
22 |
if options.jobs: |
23 |
@@ -739,7 +745,7 @@ class _special_filename(_filename_base): |
24 |
return self.file_name < other.file_name |
25 |
|
26 |
class GenChangeLogs(object): |
27 |
- def __init__(self, portdb): |
28 |
+ def __init__(self, portdb, changelog_output): |
29 |
self.returncode = os.EX_OK |
30 |
self._portdb = portdb |
31 |
self._wrapper = textwrap.TextWrapper( |
32 |
@@ -747,6 +753,7 @@ class GenChangeLogs(object): |
33 |
initial_indent = ' ', |
34 |
subsequent_indent = ' ' |
35 |
) |
36 |
+ self._changelog_output = changelog_output |
37 |
|
38 |
@staticmethod |
39 |
def grab(cmd): |
40 |
@@ -756,7 +763,7 @@ class GenChangeLogs(object): |
41 |
|
42 |
def generate_changelog(self, cp): |
43 |
try: |
44 |
- output = io.open('ChangeLog', |
45 |
+ output = io.open(self._changelog_output, |
46 |
mode='w', encoding=_encodings['repo.content'], |
47 |
errors='backslashreplace') |
48 |
except IOError as e: |
49 |
@@ -1132,7 +1139,8 @@ def egencache_main(args): |
50 |
ret.append(gen_desc.returncode) |
51 |
|
52 |
if options.update_changelogs: |
53 |
- gen_clogs = GenChangeLogs(portdb) |
54 |
+ gen_clogs = GenChangeLogs(portdb, |
55 |
+ changelog_output=options.changelog_output) |
56 |
gen_clogs.run() |
57 |
ret.append(gen_clogs.returncode) |
58 |
|
59 |
diff --git a/man/egencache.1 b/man/egencache.1 |
60 |
index abbbdb9..b4a95b3 100644 |
61 |
--- a/man/egencache.1 |
62 |
+++ b/man/egencache.1 |
63 |
@@ -40,6 +40,12 @@ information about why this is necessary. |
64 |
.br |
65 |
Defaults to /var/cache/edb/dep. |
66 |
.TP |
67 |
+.BR "\-\-changelog\-output=FILENAME" |
68 |
+Specifies the file name used to store autogenerated ChangeLogs inside |
69 |
+the package directories. |
70 |
+.br |
71 |
+Defaults to ChangeLog. |
72 |
+.TP |
73 |
.BR "\-\-config\-root=PORTAGE_CONFIGROOT" |
74 |
Location of portage config files. |
75 |
.br |
76 |
-- |
77 |
2.6.2 |