Gentoo Archives: gentoo-commits

From: Magnus Granberg <zorry@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] dev/zorry:master commit in: gobs/bin/, gobs/pym/
Date: Wed, 28 Sep 2011 10:54:03
Message-Id: 3b8ee5e9c27cadccaf4f4571d67bc06a6e401fc7.zorry@gentoo
1 commit: 3b8ee5e9c27cadccaf4f4571d67bc06a6e401fc7
2 Author: Magnus Granberg <zorry <AT> gentoo <DOT> org>
3 AuthorDate: Wed Sep 28 10:53:41 2011 +0000
4 Commit: Magnus Granberg <zorry <AT> gentoo <DOT> org>
5 CommitDate: Wed Sep 28 10:53:41 2011 +0000
6 URL: http://git.overlays.gentoo.org/gitweb/?p=dev/zorry.git;a=commit;h=3b8ee5e9
7
8 add CM.putConnection(conn)
9
10 ---
11 gobs/bin/gobs_buildquerys | 1 -
12 gobs/pym/build_queru.py | 6 ++++++
13 gobs/pym/check_setup.py | 7 +++++--
14 3 files changed, 11 insertions(+), 3 deletions(-)
15
16 diff --git a/gobs/bin/gobs_buildquerys b/gobs/bin/gobs_buildquerys
17 index 81c0f26..c2e1923 100755
18 --- a/gobs/bin/gobs_buildquerys
19 +++ b/gobs/bin/gobs_buildquerys
20 @@ -28,7 +28,6 @@ def main_loop(config_profile):
21 continue # retunr to the start of the function
22 else:
23 init_queru.procces_qureru()
24 - continue # retunr to the start of the function
25
26 def main():
27 # Main
28
29 diff --git a/gobs/pym/build_queru.py b/gobs/pym/build_queru.py
30 index e1de617..88eed9f 100644
31 --- a/gobs/pym/build_queru.py
32 +++ b/gobs/pym/build_queru.py
33 @@ -105,6 +105,7 @@ class queruaction(object):
34 else:
35 build_log_dict['logfilename'] = ""
36 move_queru_buildlog(conn, build_dict['queue_id'], build_error, summary_error, build_log_dict)
37 + CM.putConnection(conn)
38
39 def action_build(self, settings, trees, mtimedb, myopts, myaction, myfiles, spinner, build_dict):
40
41 @@ -692,17 +693,22 @@ class queruaction(object):
42 settings, trees, mtimedb = load_emerge_config()
43 portdb = trees[settings["ROOT"]]["porttree"].dbapi
44 if build_dict is None:
45 + CM.putConnection(conn)
46 return
47 print("build_dict", build_dict)
48 if not build_dict['ebuild_id'] is None and build_dict['checksum'] is not None:
49 buildqueru_cpv_dict = self.make_build_list(build_dict, settings, portdb)
50 print('buildqueru_cpv_dict', buildqueru_cpv_dict)
51 if buildqueru_cpv_dict is None:
52 + CM.putConnection(conn)
53 return
54 fail_build_procces = self.build_procces(buildqueru_cpv_dict, build_dict, settings, portdb)
55 + CM.putConnection(conn)
56 return
57 if not build_dict['post_message'] is [] and build_dict['ebuild_id'] is None:
58 + CM.putConnection(conn)
59 return
60 if not build_dict['ebuild_id'] is None and build_dict['checksum'] is None:
61 del_old_queue(conn, build_dict['queue_id'])
62 + CM.putConnection(conn)
63 return
64
65 diff --git a/gobs/pym/check_setup.py b/gobs/pym/check_setup.py
66 index 58948ec..cc9b55b 100644
67 --- a/gobs/pym/check_setup.py
68 +++ b/gobs/pym/check_setup.py
69 @@ -51,6 +51,7 @@ def check_make_conf():
70 attDict['make_conf_checksum_tree'] = make_conf_checksum_tree
71 configsDict[config_id]=attDict
72 update__make_conf(conn,configsDict)
73 + CM.putConnection(conn)
74 print("Updated configurtions")
75
76 def check_make_conf_guest(config_profile):
77 @@ -59,11 +60,13 @@ def check_make_conf_guest(config_profile):
78 make_conf_checksum_db = get_profile_checksum(conn,config_profile)
79 print('make_conf_checksum_db', make_conf_checksum_db)
80 if make_conf_checksum_db is None:
81 + CM.putConnection(conn)
82 return "1"
83 make_conf_file = "/etc/portage/make.conf"
84 make_conf_checksum_tree = portage.checksum.sha256hash(make_conf_file)[0]
85 print('make_conf_checksum_tree', make_conf_checksum_tree)
86 if make_conf_checksum_tree != make_conf_checksum_db[0]:
87 + CM.putConnection(conn)
88 return "2"
89 # Check if we can open the file and close it
90 # Check if we have some error in the file (portage.util.getconfig)
91 @@ -76,11 +79,12 @@ def check_make_conf_guest(config_profile):
92 mysettings.validate()
93 # With errors we return false
94 except Exception as e:
95 + CM.putConnection(conn)
96 return "3"
97 + CM.putConnection(conn)
98 return "4"
99
100 def check_configure_guest(config_profile):
101 - conn=CM.getConnection()
102 pass_make_conf = check_make_conf_guest(config_profile)
103 print(pass_make_conf)
104 if pass_make_conf == "1":
105 @@ -91,7 +95,6 @@ def check_configure_guest(config_profile):
106 return False
107 elif pass_make_conf == "3":
108 # set the config as no working
109 - make_conf_error(conn, config_profile)
110 return False
111 elif pass_make_conf == "4":
112 # make.conf check OK