1 |
--- |
2 |
bin/egencache | 14 +++++++++++--- |
3 |
1 file changed, 11 insertions(+), 3 deletions(-) |
4 |
|
5 |
diff --git a/bin/egencache b/bin/egencache |
6 |
index 6407a44..11f49c6 100755 |
7 |
--- a/bin/egencache |
8 |
+++ b/bin/egencache |
9 |
@@ -170,6 +170,12 @@ def parse_args(args): |
10 |
help="output file for use.local.desc data (or '-' for stdout)", |
11 |
dest="uld_output") |
12 |
|
13 |
+ uc = parser.add_argument_group('--update-changelogs options') |
14 |
+ uc.add_argument("--changelog-output", |
15 |
+ help="output filename for change logs", |
16 |
+ dest="changelog_output", |
17 |
+ default="ChangeLog") |
18 |
+ |
19 |
options, args = parser.parse_known_args(args) |
20 |
|
21 |
if options.jobs: |
22 |
@@ -739,7 +745,7 @@ class _special_filename(_filename_base): |
23 |
return self.file_name < other.file_name |
24 |
|
25 |
class GenChangeLogs(object): |
26 |
- def __init__(self, portdb): |
27 |
+ def __init__(self, portdb, changelog_output): |
28 |
self.returncode = os.EX_OK |
29 |
self._portdb = portdb |
30 |
self._wrapper = textwrap.TextWrapper( |
31 |
@@ -747,6 +753,7 @@ class GenChangeLogs(object): |
32 |
initial_indent = ' ', |
33 |
subsequent_indent = ' ' |
34 |
) |
35 |
+ self._changelog_output = changelog_output |
36 |
|
37 |
@staticmethod |
38 |
def grab(cmd): |
39 |
@@ -756,7 +763,7 @@ class GenChangeLogs(object): |
40 |
|
41 |
def generate_changelog(self, cp): |
42 |
try: |
43 |
- output = io.open('ChangeLog', |
44 |
+ output = io.open(self._changelog_output, |
45 |
mode='w', encoding=_encodings['repo.content'], |
46 |
errors='backslashreplace') |
47 |
except IOError as e: |
48 |
@@ -1132,7 +1139,8 @@ def egencache_main(args): |
49 |
ret.append(gen_desc.returncode) |
50 |
|
51 |
if options.update_changelogs: |
52 |
- gen_clogs = GenChangeLogs(portdb) |
53 |
+ gen_clogs = GenChangeLogs(portdb, |
54 |
+ changelog_output=options.changelog_output) |
55 |
gen_clogs.run() |
56 |
ret.append(gen_clogs.returncode) |
57 |
|
58 |
-- |
59 |
2.6.2 |