1 |
commit: fea6b4f419731b39317ba39d980edc84abbac4e7 |
2 |
Author: Magnus Granberg <zorry <AT> gentoo <DOT> org> |
3 |
AuthorDate: Wed May 2 14:32:50 2012 +0000 |
4 |
Commit: Magnus Granberg <zorry <AT> gentoo <DOT> org> |
5 |
CommitDate: Wed May 2 14:32:50 2012 +0000 |
6 |
URL: http://git.overlays.gentoo.org/gitweb/?p=dev/zorry.git;a=commit;h=fea6b4f4 |
7 |
|
8 |
logfile testing |
9 |
|
10 |
--- |
11 |
gobs/pym/build_log.py | 3 +++ |
12 |
gobs/pym/build_queru.py | 4 +--- |
13 |
gobs/pym/updatedb.py | 1 + |
14 |
3 files changed, 5 insertions(+), 3 deletions(-) |
15 |
|
16 |
diff --git a/gobs/pym/build_log.py b/gobs/pym/build_log.py |
17 |
index 5eff107..0e0f834 100644 |
18 |
--- a/gobs/pym/build_log.py |
19 |
+++ b/gobs/pym/build_log.py |
20 |
@@ -548,7 +548,10 @@ class gobs_buildlog(object): |
21 |
if sum_build_log_list != []: |
22 |
for sum_log_line in sum_build_log_list: |
23 |
summary_error = summary_error + " " + sum_log_line |
24 |
+ # FIXME: use port_logdir in stead of the \/var\/log\/portage\/ string |
25 |
+ logging.info("logdir: %s", settings.get("PORT_LOGDIR")) |
26 |
build_log_dict['logfilename'] = re.sub("\/var\/log\/portage\/", "", settings.get("PORTAGE_LOG_FILE")) |
27 |
+ logging.info("Logfile name: %s", settings.get("PORTAGE_LOG_FILE")) |
28 |
if build_dict['queue_id'] is None: |
29 |
build_id = self.add_new_ebuild_buildlog(settings, pkg, build_dict, build_error, summary_error, build_log_dict) |
30 |
else: |
31 |
|
32 |
diff --git a/gobs/pym/build_queru.py b/gobs/pym/build_queru.py |
33 |
index 64d5ba3..373bb8e 100644 |
34 |
--- a/gobs/pym/build_queru.py |
35 |
+++ b/gobs/pym/build_queru.py |
36 |
@@ -58,8 +58,6 @@ class queruaction(object): |
37 |
self._mysettings = portage.config(config_root = "/") |
38 |
self._config_profile = config_profile |
39 |
self._myportdb = portage.portdb |
40 |
- logging.basicConfig(filename=gobs_settings_dict['gobs_logfile'], \ |
41 |
- format='%(levelname)s: %(asctime)s %(message)s', level=logging.INFO) |
42 |
|
43 |
def log_fail_queru(self, build_dict, settings): |
44 |
conn=CM.getConnection() |
45 |
@@ -107,7 +105,7 @@ class queruaction(object): |
46 |
summary_error = summary_error + " " + sum_log_line |
47 |
if settings.get("PORTAGE_LOG_FILE") is not None: |
48 |
build_log_dict['logfilename'] = re.sub("\/var\/log\/portage\/", "", settings.get("PORTAGE_LOG_FILE")) |
49 |
- # os.chmode(settings.get("PORTAGE_LOG_FILE"), 224) |
50 |
+ os.chmod(settings.get("PORTAGE_LOG_FILE"), 0o224) |
51 |
else: |
52 |
build_log_dict['logfilename'] = "" |
53 |
move_queru_buildlog(conn, build_dict['queue_id'], build_error, summary_error, build_log_dict) |
54 |
|
55 |
diff --git a/gobs/pym/updatedb.py b/gobs/pym/updatedb.py |
56 |
index f718bc4..2e369b3 100755 |
57 |
--- a/gobs/pym/updatedb.py |
58 |
+++ b/gobs/pym/updatedb.py |
59 |
@@ -104,6 +104,7 @@ def update_cpv_db(mysettings): |
60 |
# a multiprocessing pool |
61 |
for package_line in sorted(package_list_tree): |
62 |
update_cpv_db_pool(mysettings, package_line) |
63 |
+ # FIXME: Mem prob with the multiprocessing |
64 |
# pool.apply_async(update_cpv_db_pool, (mysettings, package_line,)) |
65 |
# pool.close() |
66 |
# pool.join() |